source: issm/trunk-jpl/src/m/contrib/morlighem/modeldata/interpJoughinMosaic.m@ 26680

Last change on this file since 26680 was 26680, checked in by Cheng Gong, 3 years ago

CHG: set data path to totten

File size: 919 bytes
Line 
1function [vxout vyout] = interpJoughinMosaic(X,Y),
2
3switch oshostname(),
4 case {'ronne'}
5 filename = '/home/ModelData/Greenland/VelJoughin/IanGreenVel.mat';
6 case {'totten'}
7 filename = '/totten_1/ModelData/Greenland/VelJoughin/IanGreenVel.mat';
8 otherwise
9 error('machine not supported yet');
10end
11verbose = 1;
12
13%Figure out what subset of the matrix should be read
14load(filename,'x_m','y_m');
15velfile = matfile(filename);
16
17offset=2;
18
19xmin=min(X(:)); xmax=max(X(:));
20posx=find(x_m<=xmax);
21id1x=max(1,find(x_m>=xmin,1)-offset);
22id2x=min(numel(x_m),posx(end)+offset);
23
24ymin=min(Y(:)); ymax=max(Y(:));
25posy=find(y_m>=ymin);
26id1y=max(1,find(y_m<=ymax,1)-offset);
27id2y=min(numel(y_m),posy(end)+offset);
28
29vx = velfile.vx(id1y:id2y,id1x:id2x);
30vy = velfile.vy(id1y:id2y,id1x:id2x);
31x_m = x_m(id1x:id2x);
32y_m = y_m(id1y:id2y);
33
34%load(filename);
35vxout = InterpFromGrid(x_m,y_m,vx,X,Y);
36vyout = InterpFromGrid(x_m,y_m,vy,X,Y);
Note: See TracBrowser for help on using the repository browser.