Changeset 6488
- Timestamp:
- 11/04/10 07:53:15 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/model/radarpower.m
r6286 r6488 1 function md=radarpower(md, hemisphere,xlim,ylim,highres)1 function md=radarpower(md,xlim,ylim,highres) 2 2 %RADARPOWER - overlay a power radar image on an existing mesh 3 3 % … … 7 7 % 8 8 % Usage: 9 % md=radarpower(md,hemisphere,xlim,ylim,highres) 9 % md=radarpower(md,xlim,ylim,highres) 10 % md=radarpower(md,xlim,ylim) 11 % md=radarpower(md) 10 12 11 13 global ISSM_TIER … … 15 17 if isempty(MODELDATA), MODELDATA='/u/astrid-r1b/larour/ModelData'; end 16 18 19 %Parse inputs 20 if nargin<4, 21 highres=0; 22 end 23 if nargin<3, 24 xlim=[min(md.x) max(md.x)]; 25 ylim=[min(md.y) max(md.y)]; 26 end 27 17 28 %find gdal coordinates 18 x0=min(xlim); 19 x1=max(xlim); 20 21 y0=min(ylim); 22 y1=max(ylim); 29 x0=min(xlim); x1=max(xlim); 30 y0=min(ylim); y1=max(ylim); 23 31 24 32 %the geotiff image is either 200m or 1km accuracy. 25 if strcmpi( hemisphere,'n'),33 if strcmpi(md.hemisphere,'n'), 26 34 if ~exist([MODELDATA '/MOG/mog150_greenland_map.jpg']), 27 35 error(['radarpower error message: file ' MODELDATA '/MOG/mog150_greenland_map.jpg not found. Check MODELDATA variable..']); … … 35 43 36 44 %Read and crop file 45 disp('Warning: expecting coordinates in polar stereographic (Std Latitude: 70ºN Meridian: 45º)'); 37 46 im=imread(jpgim); 38 47 im=im(toplefty:toplefty+sizey,topleftx:topleftx+sizex); … … 41 50 md.sarym=(y0:(y1-y0)/(size(md.sarpwr,1)-1):y1); 42 51 43 else 52 elseif strcmpi(md.hemisphere,'s'), 44 53 if highres, 45 54 if ~exist([MODELDATA '/MosaicTiffRsat/amm125m_v2_200m.tif']), … … 66 75 system('rm -rf ./temp.tif'); 67 76 77 else 78 error('field hemisphere should either be ''n'' or ''s'''); 68 79 end
Note:
See TracChangeset
for help on using the changeset viewer.