Changeset 26975


Ignore:
Timestamp:
04/29/22 04:22:16 (3 years ago)
Author:
Cheng Gong
Message:

add post-processing codes

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

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/contrib/chenggong/interpFromMEaSUREsGeotiff.m

    r26701 r26975  
    1 % This function calls src/m/contrib/morlighem/modeldata/interpFromGeotiff.m for multiple times to load all avaliable
    2 % tif data in  /totten_1/ModelData/Greenland/VelMEaSUREs/Jakobshavn_2008_2021/ within the given time period (in decimal years)
    3 % For some reason, each .tif file in this folder contains two sets of data, only the first dataset is useful
     1function dataout = interpFromMEaSUREsGeotiff(X,Y,Tstart,Tend,varargin)
     2%interpFromMEaSUREsGeotiff:
     3%       This function calls src/m/contrib/morlighem/modeldata/interpFromGeotiff.m for multiple times to load all avaliable
     4%       tif data in  /totten_1/ModelData/Greenland/VelMEaSUREs/Jakobshavn_2008_2021/ within the given time period (in decimal years)
     5%       For some reason, each .tif file in this folder contains two sets of data, only the first dataset is useful
     6%
     7%   Usage:
     8%                dataout = interpFromMEaSUREsGeotiff(X,Y,Tstart,Tend, varargin)
     9%
     10%       X, Y are the coordinates of the mesh
     11%       Tstart and Tend decimal year of the start and end time
     12%
     13%   Example:
     14%                       obsData = interpFromMEaSUREsGeotiff(md.mesh.x,md.mesh.y, tstart, tend);
     15%
     16%   Options:
     17%      - 'glacier':  which glacier to look for
     18options    = pairoptions(varargin{:});
     19glacier    = getfieldvalue(options,'glacier','Jakobshavn');
    420
    5 function dataout = interpFromMEaSUREsGeotiff(X,Y,Tstart,Tend)
    6 
    7 foldername = '/totten_1/ModelData/Greenland/VelMEaSUREs/Jakobshavn_2008_2021/';
     21if strcmp(glacier, 'Jakobshavn')
     22        foldername = '/totten_1/ModelData/Greenland/VelMEaSUREs/Jakobshavn_2008_2021/';
     23elseif strcmp(glacier, 'Kangerlussuaq')
     24        foldername = '/totten_1/ModelData/Greenland/VelMEaSUREs/Kangerlussuaq_2006_2021/';
     25elseif strcmp(glacier, 'Store')
     26        foldername = '/totten_1/ModelData/Greenland/VelMEaSUREs/Store_2008_2021/';
     27elseif strcmp(glacier, 'Rink')
     28        foldername = '/totten_1/ModelData/Greenland/VelMEaSUREs/Rink_2008_2022/';
     29else
     30        error(['The velocity data for ', glacier, ' is not available, please download from NSIDC first.']);
     31end
    832
    933% get the time info from file names
Note: See TracChangeset for help on using the changeset viewer.