source: issm/trunk-jpl/src/m/psl/xxlm.m@ 19296

Last change on this file since 19296 was 19296, checked in by adhikari, 10 years ago

a new folder with functions related to PSL model (elastic earth)

  • Property svn:executable set to *
File size: 932 bytes
Line 
1function x_lm = xxlm(lMax,nPix,rho_i,rho_e,ice_pq,oce_pq,ocean,sh,loveH,loveK)
2
3%---------------------------------------------------------------------
4% xxlm :: a function to compute SH coefficient for X
5%---------------------------------------------------------------------
6% This code is written as a part of the ISSM-PSL project
7% (c) S. Adhikari
8% Jet Propulsion Laboratory, Caltech
9% November 3, 2014
10%---------------------------------------------------------------------
11
12q1 = 0;
13q2 = 0;
14
15% obtain xp_pq
16xp_pq = xplm(lMax,nPix,rho_i,rho_e,ice_pq,oce_pq,loveH,loveK);
17
18% compute xp, i.e. x'
19xp = zeros(1,nPix);
20for p=0:lMax
21 for q = -p:p
22 xp = xp + xp_pq(1+q1).*sh(:,1+q1)';
23 q1 = q1 + 1;
24 end
25end
26
27x_lm = zeros(1,(lMax+1)^2);
28for l=0:lMax
29 for m=-l:l
30 x_lm(1+q2) = sum((xp'.*sh(:,1+q2)).*ocean');
31 q2 = q2+1;
32 end
33end
34%
35x_lm = x_lm*4*pi/nPix;
36
Note: See TracBrowser for help on using the repository browser.