Changeset 20013
- Timestamp:
- 01/29/16 12:16:20 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/coordsystems/gmtmask.m
r20005 r20013 1 function mask = gmtmask(lat,long )1 function mask = gmtmask(lat,long,varargin) 2 2 %GMTMASK - figure out which lat,long points are on the ocean 3 3 % … … 6 6 % 7 7 8 disp(sprintf('gmtmask: num vertices %i',length(lat))); 8 %are we doing a recursive call? 9 if nargin==3, 10 recursive=1; 11 else 12 recursive=0; 13 end 14 15 if(recursive)disp(sprintf(' recursing: num vertices %i',length(lat))); 16 else disp(sprintf('gmtmask: num vertices %i',length(lat))); 17 end 9 18 10 19 %Check lat and long size is not more than 50,000; If so, recursively call gmtmask: … … 15 24 j=length(lat); 16 25 end 17 mask(i:j)=gmtmask(lat(i:j),long(i:j) );26 mask(i:j)=gmtmask(lat(i:j),long(i:j),1); 18 27 end 19 28 return … … 31 40 32 41 %figure out which vertices are on the ocean, which one on the continent: 33 system('gmt gmtselect ./all_vertices.txt -h0 -Df -R0/360/-90/90 -A0 -JQ180/200 -Nk/s/ k/s/k> ./oce_vertices.txt');42 system('gmt gmtselect ./all_vertices.txt -h0 -Df -R0/360/-90/90 -A0 -JQ180/200 -Nk/s/s/k/s > ./oce_vertices.txt'); 34 43 35 44 %reset DYLD_LIBRARY_PATH to what it was: … … 53 62 54 63 system('rm -rf ./all_vertices.txt ./oce_vertices.txt ./gmt.history'); 55 disp(sprintf('gmtmask: done'));64 if ~recursive, disp(sprintf('gmtmask: done')); end;
Note:
See TracChangeset
for help on using the changeset viewer.