Changeset 21455


Ignore:
Timestamp:
12/26/16 18:37:55 (8 years ago)
Author:
Eric.Larour
Message:

CHG: more documentation and minor fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/miscellaneous/diagnostics.m

    r21447 r21455  
    11function diagnostics(md,varargin)
    2 %DIAGNOSTICS: output all sort of information as shape files.
     2%DIAGNOSTICS - output diagnostics for use in qgis
     3%
     4%
     5%   Usage:
     6%      diagnostics(md,options)
     7%   
     8%      where options include:
     9%            'path': where are the diagnostics file output
     10%            'mesh': 0 or 1 (output mesh?, default 0)
     11%            'gl': 0 or 1 (output grounding line position?, default 0)
     12%            'vel': defaults to md.initialization.vel (can suplly another field if need be)
     13%                Suboptions include:
     14%                 'velposting': resolution at which the tiff file will be printed.
     15%            'hotspots' (0 or 1, default 0). spots where md.results.TransientSolution(i).Vel>threshold
     16%                Suboptions include:
     17%                 'threshold': vel value
     18%                 'hotspotsi': index into results.TransientSolution
     19%
     20%           
     21%
     22%   Examples:
     23%      diagnostics(md,'vel',md.initialization.vel,'gl',1,'hotspots',1,'hotspotsi',10,'threshold',500);
     24
    325
    426        %process options:
     
    3153                vel=uint16(flipud(vel));
    3254
    33                 imwrite(vel,[path '/vel.tif'],'tiff');
     55                imwrite(vel,[path '/veltemp.tif'],'tiff');
    3456
    35                 string=sprintf('!gdal_translate -a_srs EPSG:3031 -a_ullr %g %g %g %g %s/vel.tif %s/velg.tif',...
     57                string=sprintf('!gdal_translate -a_srs EPSG:3031 -a_ullr %g %g %g %g %s/veltemp.tif %s/vel.tif',...
    3658                min(md.mesh.x),max(md.mesh.y),max(md.mesh.x),min(md.mesh.y),path,path);
    3759                eval(string);
    38 
     60                delete([path '/veltemp.tif']);
    3961        end
    4062
Note: See TracChangeset for help on using the changeset viewer.