Changeset 22781


Ignore:
Timestamp:
05/15/18 13:55:45 (7 years ago)
Author:
Mathieu Morlighem
Message:

CHG: gmt might not be installed in externalpackages

Location:
issm/trunk/src/m/coordsystems
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/coordsystems/gmtmask.m

    r22758 r22781  
    4141        end
    4242
     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   
    4355        %figure out which vertices are on the ocean, which one on the continent:
    44         [status,result] = system(['gmt gmtselect ./' 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]);
    4557        if status~=0,
    4658                error(result);
  • issm/trunk/src/m/coordsystems/gmtmaskparallel.m

    r20500 r22781  
    2323        end
    2424
     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
    2537        %Build xjobs script:
    2638        fid=fopen('xjobs.script','w');
    2739        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);
    2941        end
    3042        fclose(fid);
Note: See TracChangeset for help on using the changeset viewer.