Changeset 27589 for issm/trunk-jpl/src/m/coordsystems/gmtmask.m
- Timestamp:
- 02/17/23 13:41:46 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/coordsystems/gmtmask.m
r27369 r27589 5 5 % mask.ocean = gmtmask(md.mesh.lat,md.mesh.long); 6 6 % 7 % TODO: Standardize discovery of GMT bin path and whether or not we have GMT 8 % modules (i.e. `gmt select`) between this file, gmtmask.py, and 9 % gmtmaskparallel.m 7 10 8 11 %are we doing a recursive call? … … 31 34 %First, write our lat,long file for gmt: 32 35 nv=length(lat); 33 filename_all = ['all_vertices-' num2str(feature('GetPid')) '.txt']; 34 filename_oce = ['oce_vertices-' num2str(feature('GetPid')) '.txt']; 36 filename_suffix=[num2str(feature('GetPid')) '.txt']; 37 filename_all=['all_vertices-' filename_suffix]; 38 filename_oce=['oce_vertices-' filename_suffix]; 35 39 dlmwrite(filename_all,[long lat (1:nv)'],'delimiter','\t','precision',10); 36 40 37 41 %figure out which vertices are on the ocean, which one on the continent: 38 [status,result] = system(['gmt select ./' filename_all ' -h0 -Df -R0/360/-90/90 -A0 -JQ180/200 -Nk/s/s/k/s > ./' filename_oce]); 42 gmt_select_options='-h0 -Df -R0/360/-90/90 -A0 -JQ180/200 -Nk/s/s/k/s'; 43 [status,result]=system(['gmt select ./' filename_all ' ' gmt_select_options ' > ./' filename_oce]); 39 44 if status~=0, 40 error(result); 45 [status,result] = system(['gmtselect ./' filename_all ' ' gmt_select_options ' > ./' filename_oce]); 46 if status~=0, 47 error(result); 48 end 41 49 end 42 50
Note:
See TracChangeset
for help on using the changeset viewer.