source:
issm/oecreview/Archive/19101-20495/ISSM-19323-19324.diff@
20498
Last change on this file since 20498 was 20498, checked in by , 9 years ago | |
---|---|
File size: 1.7 KB |
-
../trunk-jpl/src/m/psl/icelm.m
1 function ice_lm = icelm(lMax,nPix,ice,sh)2 3 %---------------------------------------------------------------------4 % icelm :: a function to compute SH coefficients of "ice load function"5 %---------------------------------------------------------------------6 % This code is written as a part of the ISSM-PSL project7 % (c) S. Adhikari8 % Jet Propulsion Laboratory, Caltech9 % November 3, 201410 %---------------------------------------------------------------------11 12 p1 = 0;13 14 ice_lm = zeros(1,(lMax+1)^2);15 16 for l=0:lMax17 for m=-l:l18 ice_lm(1+p1) = sum(sh(:,1+p1).*ice');19 p1 = p1+1;20 end21 end22 23 ice_lm = ice_lm*4*pi/nPix;24 -
../trunk-jpl/src/m/psl/ocelm.m
1 function oce_lm = ocelm(sh,lMax,ocean,areaEle)2 3 %OCElm :: a function to compute SH coefficients of ocean function4 %5 %USAGE: oce_lm = ocelm(sh,lMax,ocean,areaEle);6 %7 %sh (spherical harmonics)8 %lMax (maximum SH degree to be considered)9 %ocean (ocean function)10 %areaEle (area of elements)11 %12 13 p1 = 0;14 15 oce_lm = zeros(1,(lMax+1)^2);16 17 % weighted area integration18 for l=0:lMax19 for m=-l:l20 oce_lm(1+p1) = sum((sh(:,1+p1).*ocean').*areaEle');21 p1 = p1+1;22 end23 end24 oce_lm = oce_lm/sum(areaEle);25
Note:
See TracBrowser
for help on using the repository browser.