Changeset 25733


Ignore:
Timestamp:
11/03/20 12:17:53 (4 years ago)
Author:
dlcheng
Message:

CHG: dlcheng contrib.

Location:
issm/trunk-jpl/src/m/contrib
Files:
5 added
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/contrib/morlighem/modeldata/interpBedmachineGreenland.m

    r24747 r25733  
    5454                morlighem2013nc=['/home/ModelData/Greenland/BedMachine/' basename '-' ncdate '.nc'];
    5555        otherwise
    56                 error('machine not supported yet');
     56                morlighem2013nc=['/Users/larour/ModelData/BedMachine/' basename '-' ncdate '.nc'];
     57                disp('machine not supported yet, using default path /Users/larour/ModelData/BedMachine/');
    5758end
    5859
     
    8182data(find(data==-9999))=NaN;
    8283
     84ydata=flipud(ydata);
     85data=flipud(data);
     86   
    8387disp(['   -- BedMachine Greenland: interpolating ' string]);
    8488if strcmp(string,'mask') | strcmp(string,'source'),
    8589        %Need nearest neighbor to avoid interpolation between 0 and 2
    86         output = InterpFromGrid(xdata,ydata,data,double(X),double(Y),'nearest');
     90        output = InterpFromGridToMesh(xdata,ydata,data,double(X),double(Y),'nearest');
    8791else
    88         output = InterpFromGrid(xdata,ydata,data,double(X),double(Y));
     92   
     93        output = InterpFromGridToMesh(xdata,ydata,data,double(X),double(Y),NaN);
    8994end
    9095
Note: See TracChangeset for help on using the changeset viewer.