Changeset 27714


Ignore:
Timestamp:
04/27/23 14:08:32 (23 months ago)
Author:
badgeley
Message:

CHG: updated documentation for interpICESat2ATL1415.m

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/contrib/badgeley/interpICESat2ATL1415.m

    r27711 r27714  
    1 function hout = interpICESat2ATL1415(X,Y)
     1function hout = interpICESat2ATL1415(X,Y,ncfile14,ncfile15)
     2%interpICESat2ATL1415 - interpolate ICESat2 ATL14 + ATL15 data onto X and Y
     3%
     4%   Input:
     5%     - optional 3rd input argument: path to ATL14 dataset
     6%     - optional 4th input argument: path to ATL15 dataset
     7%
     8%   Output:
     9%     - hout: matrix of size number_of_vertices+1 x ATL15_num_timesteps
     10%             it is a P1 timeseries
     11%     NOTE: The output does not include ATL14 directly. ATL14 is only used
     12%           as a reference for getting absolute surface values from ATL15.
     13%
     14%   Examples:
     15%      surface = interpICESat2ATL1415(md.mesh.x,md.mesh.y);
     16%      surface = interpICESat2ATL1415(md.mesh.x,md.mesh.y,'~/ATL14_GL_0314_100m_002_01.nc','~/ATL15_GL_0314_01km_002_01.nc');
     17%
     18% Version 04/27/2023 Jessica Badgeley jessica.a.badgeley@dartmouth.edu
    219
    3 filename_h = '/totten_1/ModelData/Greenland/ICESat2_ATL1415/ATL14_GL_0314_100m_002_01.nc';
    4 filename_dh = '/totten_1/ModelData/Greenland/ICESat2_ATL1415/ATL15_GL_0314_01km_002_01.nc';
     20if nargin==3
     21   filename_h = ncfile14;
     22else
     23   filename_h = '/totten_1/ModelData/Greenland/ICESat2_ATL1415/ATL14_GL_0314_100m_002_01.nc';
     24end
     25if nargin==4
     26        filename_dh = ncfile15;
     27else
     28   filename_dh = '/totten_1/ModelData/Greenland/ICESat2_ATL1415/ATL15_GL_0314_01km_002_01.nc';
     29end
    530
    631xh = ncread(filename_h,'x');
     
    1035ydh = ncread(filename_dh,'delta_h/y');
    1136tdh = ncread(filename_dh,'delta_h/time');
     37
     38tref = datetime('2018-01-01-00-00-00','format','yyyy-MM-dd-hh-mm-ss');
     39ths = datenum(tref + days(tdh))./365.25;
    1240
    1341offset=2;
     
    3967ydh = ydh(id1ydh:id2ydh);
    4068
     69disp('   --ICESat2 ATL1415: loading surface elevations');
    4170h = double(ncread(filename_h,'h',[id1xh id1yh],[id2xh-id1xh+1 id2yh-id1yh+1],[1 1]));
    4271dh = double(ncread(filename_dh,'delta_h/delta_h',[id1xdh id1ydh 1],[id2xdh-id1xdh+1 id2ydh-id1ydh+1 length(tdh)],[1 1 1]));
    4372geoid = interpBedmachineGreenland(X,Y,'geoid');
    4473
    45 href = InterpFromGrid(xh,yh,h',X,Y) - geoid;
    46 %hout(end+1) = 2020.0; %Data is the 2020 DEM
    47 
    48 tref = datetime('2018-01-01-00-00-00','format','yyyy-MM-dd-hh-mm-ss');
    49 ths = datenum(tref + days(tdh))./365.25;
     74disp('   --ICESat2 ATL1415: interpolating');
     75href = InterpFromGrid(xh,yh,h',X,Y) - geoid; %this reference DEM is for 2020.0, but it is not currently included in hout
    5076
    5177hout = ones([length(Y)+1,length(tdh)]);
Note: See TracChangeset for help on using the changeset viewer.