Changeset 27714
- Timestamp:
- 04/27/23 14:08:32 (23 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/contrib/badgeley/interpICESat2ATL1415.m
r27711 r27714 1 function hout = interpICESat2ATL1415(X,Y) 1 function 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 2 19 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'; 20 if nargin==3 21 filename_h = ncfile14; 22 else 23 filename_h = '/totten_1/ModelData/Greenland/ICESat2_ATL1415/ATL14_GL_0314_100m_002_01.nc'; 24 end 25 if nargin==4 26 filename_dh = ncfile15; 27 else 28 filename_dh = '/totten_1/ModelData/Greenland/ICESat2_ATL1415/ATL15_GL_0314_01km_002_01.nc'; 29 end 5 30 6 31 xh = ncread(filename_h,'x'); … … 10 35 ydh = ncread(filename_dh,'delta_h/y'); 11 36 tdh = ncread(filename_dh,'delta_h/time'); 37 38 tref = datetime('2018-01-01-00-00-00','format','yyyy-MM-dd-hh-mm-ss'); 39 ths = datenum(tref + days(tdh))./365.25; 12 40 13 41 offset=2; … … 39 67 ydh = ydh(id1ydh:id2ydh); 40 68 69 disp(' --ICESat2 ATL1415: loading surface elevations'); 41 70 h = double(ncread(filename_h,'h',[id1xh id1yh],[id2xh-id1xh+1 id2yh-id1yh+1],[1 1])); 42 71 dh = double(ncread(filename_dh,'delta_h/delta_h',[id1xdh id1ydh 1],[id2xdh-id1xdh+1 id2ydh-id1ydh+1 length(tdh)],[1 1 1])); 43 72 geoid = interpBedmachineGreenland(X,Y,'geoid'); 44 73 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; 74 disp(' --ICESat2 ATL1415: interpolating'); 75 href = InterpFromGrid(xh,yh,h',X,Y) - geoid; %this reference DEM is for 2020.0, but it is not currently included in hout 50 76 51 77 hout = ones([length(Y)+1,length(tdh)]);
Note:
See TracChangeset
for help on using the changeset viewer.