Changeset 21941


Ignore:
Timestamp:
08/11/17 16:05:48 (8 years ago)
Author:
adhikari
Message:

CHG: file renaming

File:
1 edited

Legend:

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

    r21080 r21941  
    3131        %First, write our lat,long file for gmt:
    3232        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
    3436
    3537        %Avoid bypassing of the ld library path by Matlab (:()
     
    4042
    4143        %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']);
    4345        if status~=0,
    4446                error(result);
     
    6466        mask(oce_vertices)=1;
    6567       
    66         system('rm -rf ./all_vertices.txt ./oce_vertices.txt ./gmt.history');
     68        system(['rm -rf ./' filename ' ./oce_vertices.txt ./gmt.history']);
    6769        if ~recursive, disp(sprintf('gmtmask: done')); end;
Note: See TracChangeset for help on using the changeset viewer.