Changeset 22781
- Timestamp:
- 05/15/18 13:55:45 (7 years ago)
- Location:
- issm/trunk/src/m/coordsystems
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/coordsystems/gmtmask.m
r22758 r22781 41 41 end 42 42 43 %Find path to gmt 44 paths = {[issmdir() '/bin/gmt'],[issmdir() '/externalpackages/gmt/install/bin/gmt'],'/Applications/GMT-5.4.3.app/Contents/Resources/bin/gmt'}; 45 gmtpath = ''; 46 for i=paths 47 if exist(i{1},'file'), 48 gmtpath = i{1}; 49 end 50 end 51 if isempty(gmtpath), 52 error('gmt not found, make sure it is properly installed'); 53 end 54 43 55 %figure out which vertices are on the ocean, which one on the continent: 44 [status,result] = system([ 'gmtgmtselect ./' filename_all ' -h0 -Df -R0/360/-90/90 -A0 -JQ180/200 -Nk/s/s/k/s > ./' filename_oce]);56 [status,result] = system([gmtpath ' gmtselect ./' filename_all ' -h0 -Df -R0/360/-90/90 -A0 -JQ180/200 -Nk/s/s/k/s > ./' filename_oce]); 45 57 if status~=0, 46 58 error(result); -
issm/trunk/src/m/coordsystems/gmtmaskparallel.m
r20500 r22781 23 23 end 24 24 25 %Find path to gmt 26 paths = {[issmdir() '/bin/gmt'],[issmdir() '/externalpackages/gmt/install/bin/gmt'],'/Applications/GMT-5.4.3.app/Contents/Resources/bin/gmt'}; 27 gmtpath = ''; 28 for i=paths 29 if exist(i{1},'file'), 30 gmtpath = i{1}; 31 end 32 end 33 if isempty(gmtpath), 34 error('gmt not found, make sure it is properly installed'); 35 end 36 25 37 %Build xjobs script: 26 38 fid=fopen('xjobs.script','w'); 27 39 for i=1:length(nnv)-1, 28 fprintf(fid,' gmt gmtselect ./all_vertices%i.txt -h0 -Df -R0/360/-90/90 -A0 -JQ180/200 -Nk/s/s/k/s > ./oce_vertices%i.txt\n',i,i);40 fprintf(fid,'%s gmtselect ./all_vertices%i.txt -h0 -Df -R0/360/-90/90 -A0 -JQ180/200 -Nk/s/s/k/s > ./oce_vertices%i.txt\n',gmtpath,i,i); 29 41 end 30 42 fclose(fid);
Note:
See TracChangeset
for help on using the changeset viewer.