Changeset 21941
- Timestamp:
- 08/11/17 16:05:48 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/coordsystems/gmtmask.m
r21080 r21941 31 31 %First, write our lat,long file for gmt: 32 32 nv=length(lat); 33 dlmwrite('./all_vertices.txt',[long lat (1:nv)'],'delimiter','\t','precision',10); 33 filename = ['all_vertices-' num2str(feature('GetPid')) '.txt'] 34 dlmwrite(filename,[long lat (1:nv)'],'delimiter','\t','precision',10); 35 34 36 35 37 %Avoid bypassing of the ld library path by Matlab (:() … … 40 42 41 43 %figure out which vertices are on the ocean, which one on the continent: 42 [status,result] = system( 'gmt gmtselect ./all_vertices.txt -h0 -Df -R0/360/-90/90 -A0 -JQ180/200 -Nk/s/s/k/s > ./oce_vertices.txt');44 [status,result] = system(['gmt gmtselect ./' filename ' -h0 -Df -R0/360/-90/90 -A0 -JQ180/200 -Nk/s/s/k/s > ./oce_vertices.txt']); 43 45 if status~=0, 44 46 error(result); … … 64 66 mask(oce_vertices)=1; 65 67 66 system( 'rm -rf ./all_vertices.txt ./oce_vertices.txt ./gmt.history');68 system(['rm -rf ./' filename ' ./oce_vertices.txt ./gmt.history']); 67 69 if ~recursive, disp(sprintf('gmtmask: done')); end;
Note:
See TracChangeset
for help on using the changeset viewer.