Changeset 23875


Ignore:
Timestamp:
04/19/19 16:02:30 (6 years ago)
Author:
Mathieu Morlighem
Message:

CHG: some minor changes

Location:
issm/trunk-jpl/src/m/contrib/morlighem/ronne
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/contrib/morlighem/ronne/interpBedmachineAntarctica.m

    r23873 r23875  
    2727        ncdate='2018-09-26';
    2828        ncdate='2018-11-14';
    29         ncdate='2019-01-24';
    3029        ncdate='2019-01-30';
    31         ncdate='2019-02-15';
    32         ncdate='2019-02-21'; % no need of firn correction
    33         ncdate='2019-02-22'; % no need of firn correction
    34         ncdate='2019-02-24'; % no need of firn correction
     30        ncdate='2019-03-12';
     31        ncdate='2019-04-02';
     32        ncdate='2019-04-15';
    3533        ncdate='2019-04-15'; % no need of firn correction
    3634end
    3735
    38 date1 = sscanf(ncdate,'%d-%d-%d');
    39 date2 = datetime(date1(1),date1(2),date1(3));
    40 
    41 if date2<datetime(2016,10,24),
    42         basename = 'AntarcticaMCdataset';
    43 else
    44   basename = 'BedMachineAntarctica';
    45 end
     36basename = 'BedMachineAntarctica';
    4637
    4738%read data
  • issm/trunk-jpl/src/m/contrib/morlighem/ronne/interpBedmachineGreenland.m

    r23873 r23875  
    3232        ncdate='2017-09-25'; %BedMachine v3
    3333        ncdate='2018-06-01';
    34         ncdate='2018-08-27';
     34        ncdate='2019-04-18';
    3535end
    3636
  • issm/trunk-jpl/src/m/contrib/morlighem/ronne/interpBedmap2.m

    r23873 r23875  
    99%      5. rockmask                     is a mask file showing rock outcrops
    1010%      6. lakemask_vostok              is a mask file showing the extent of the lake cavity of Lake Vostok
    11 %      7. bed_uncertainty              is the bed uncertainty grid shown in figure 12 of the manuscript
     11%      7. grounded_bed_uncertainty     is the bed uncertainty grid shown in figure 12 of the manuscript
    1212%      8. thickness_uncertainty_5km    is the thickness uncertainty grid shown in figure 11 of the manuscript
    1313%      9. coverage                     is a binary grid showing the distribution of ice thickness data used in the grid of ice thickness
     
    1919
    2020nc = '/home/ModelData/Antarctica/BedMap2/bedmap2_bin/Bedmap2.nc';
    21 nc = '/Users/mmorligh/temp/Bedmap2.nc';
    2221
    23 xdata = double(ncread(nc,'x'));
    24 ydata = double(ncread(nc,'y'));
     22if strcmp(string,'thickness_uncertainty_5km')
     23        xdata = double(ncread(nc,'x_5km'));
     24        ydata = double(ncread(nc,'y_5km'));
     25else
     26        xdata = double(ncread(nc,'x'));
     27        ydata = double(ncread(nc,'y'));
     28end
    2529
    2630offset=2;
  • issm/trunk-jpl/src/m/contrib/morlighem/ronne/interpMouginotAnt2017.m

    r23873 r23875  
    1 function [vxout vyout]= interpRignot2012(X,Y),
     1function [vxout vyout]= interpMouginotAnt2017(X,Y),
    22
    3 filename = '/home/ModelData/Greenland/VelMouginot/RignotGreenland2012Vel.mat';
     3%read data
     4switch (oshostname()),
     5        case {'ronne'}
     6                nc = '/home/ModelData/Antarctica/MouginotVel/vel_nsidc.CF16_2.nc';
     7        otherwise
     8                error('hostname not supported yet');
     9end
    410
    5 
    6 %Figure out what subset of the matrix should be read
    7 load(filename,'x','y');
    8 velfile = matfile(filename);
     11xdata = double(ncread(nc,'x'));
     12ydata = double(ncread(nc,'y'));
    913
    1014offset=2;
    1115
    1216xmin=min(X(:)); xmax=max(X(:));
    13 posx=find(x<=xmax);
    14 id1x=max(1,find(x>=xmin,1)-offset);
    15 id2x=min(numel(x),posx(end)+offset);
     17posx=find(xdata<=xmax);
     18id1x=max(1,find(xdata>=xmin,1)-offset);
     19id2x=min(numel(xdata),posx(end)+offset);
    1620
    1721ymin=min(Y(:)); ymax=max(Y(:));
    18 %posy=find(y>=ymin);
    19 %id1y=max(1,find(y<=ymax,1)-offset);
    20 %id2y=min(numel(y),posy(end)+offset);
    21 posy=find(y<=ymax);
    22 id1y=max(1,find(y>=ymin,1)-offset);
    23 id2y=min(numel(y),posy(end)+offset);
     22posy=find(ydata>=ymin);
     23id1y=max(1,find(ydata<=ymax,1)-offset);
     24id2y=min(numel(ydata),posy(end)+offset);
    2425
    25 vx = velfile.vx(id1y:id2y,id1x:id2x);
    26 vy = velfile.vy(id1y:id2y,id1x:id2x);
    27 x = x(id1x:id2x);
    28 y = y(id1y:id2y);
     26disp(['   -- Mouginot 2017: loading velocities']);
     27vxdata = double(ncread(nc,'VX',[id1x id1y],[id2x-id1x+1 id2y-id1y+1],[1 1]))';
     28vydata = double(ncread(nc,'VY',[id1x id1y],[id2x-id1x+1 id2y-id1y+1],[1 1]))';
     29xdata=xdata(id1x:id2x);
     30ydata=ydata(id1y:id2y);
    2931
    30 %load(filename);
    31 vxout = InterpFromGrid(x,y,double(vx),X,Y);
    32 vyout = InterpFromGrid(x,y,double(vy),X,Y);
     32disp(['   -- Mouginot 2017: interpolating ']);
     33vxout = InterpFromGrid(xdata,ydata,vxdata,double(X),double(Y));
     34vyout = InterpFromGrid(xdata,ydata,vydata,double(X),double(Y));
    3335
     36%return vel if only one output is requested
    3437if nargout==1,
    3538        vxout = sqrt(vxout.^2+vyout.^2);
Note: See TracChangeset for help on using the changeset viewer.