Index: /issm/trunk-jpl/src/m/miscellaneous/diagnostics.m
===================================================================
--- /issm/trunk-jpl/src/m/miscellaneous/diagnostics.m	(revision 21454)
+++ /issm/trunk-jpl/src/m/miscellaneous/diagnostics.m	(revision 21455)
@@ -1,4 +1,26 @@
 function diagnostics(md,varargin) 
-%DIAGNOSTICS: output all sort of information as shape files.
+%DIAGNOSTICS - output diagnostics for use in qgis
+%
+%
+%   Usage:
+%      diagnostics(md,options)
+%   
+%      where options include: 
+%            'path': where are the diagnostics file output
+%            'mesh': 0 or 1 (output mesh?, default 0)
+%            'gl': 0 or 1 (output grounding line position?, default 0)
+%            'vel': defaults to md.initialization.vel (can suplly another field if need be)
+%                Suboptions include:
+%                 'velposting': resolution at which the tiff file will be printed.
+%            'hotspots' (0 or 1, default 0). spots where md.results.TransientSolution(i).Vel>threshold
+%                Suboptions include:
+%                 'threshold': vel value
+%                 'hotspotsi': index into results.TransientSolution
+%
+%           
+%
+%   Examples:
+%      diagnostics(md,'vel',md.initialization.vel,'gl',1,'hotspots',1,'hotspotsi',10,'threshold',500);
+
 
 	%process options: 
@@ -31,10 +53,10 @@
 		vel=uint16(flipud(vel));
 
-		imwrite(vel,[path '/vel.tif'],'tiff');
+		imwrite(vel,[path '/veltemp.tif'],'tiff');
 
-		string=sprintf('!gdal_translate -a_srs EPSG:3031 -a_ullr %g %g %g %g %s/vel.tif %s/velg.tif',...
+		string=sprintf('!gdal_translate -a_srs EPSG:3031 -a_ullr %g %g %g %g %s/veltemp.tif %s/vel.tif',...
 		min(md.mesh.x),max(md.mesh.y),max(md.mesh.x),min(md.mesh.y),path,path);
 		eval(string);
-
+		delete([path '/veltemp.tif']);
 	end
 
