Changeset 20283


Ignore:
Timestamp:
03/01/16 20:18:15 (9 years ago)
Author:
Eric.Larour
Message:

CHG: gmtmask.py: issue with indexing! (matlab bias)
gmtmask.py and .m: increase precision to 10 digits for lat,long! otherwise, gmtmask
is returning biased locations!

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

Legend:

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

    r20013 r20283  
    3131        %First, write our lat,long file for gmt:
    3232        nv=length(lat);
    33         dlmwrite('./all_vertices.txt',[long lat (1:nv)'],'delimiter','\t');
     33        dlmwrite('./all_vertices.txt',[long lat (1:nv)'],'delimiter','\t','precision',10);
    3434
    3535        %Avoid bypassing of the ld library path by Matlab (:()
  • issm/trunk-jpl/src/m/coordsystems/gmtmask.py

    r20225 r20283  
    3939        #First, write our lat,long file for gmt:
    4040        nv=lenlat
    41         savetxt('./all_vertices.txt',[long, lat, arange(1,nv+1)],delimiter='\t')
     41        savetxt('./all_vertices.txt',transpose([long, lat, arange(1,nv+1)]),delimiter='\t',fmt='%.10f')
    4242
    4343        #Avoid bypassing of the ld library path by Matlab (:()
     
    6868        oce_vertices=[]
    6969        while line:
    70                 ind=str2num(line.split()[3])
     70                ind=int(float(line.split()[2]))-1;
    7171                oce_vertices.append(ind)
    7272                line=fid.readline()
Note: See TracChangeset for help on using the changeset viewer.