source: issm/oecreview/Archive/19101-20495/ISSM-19323-19324.diff

Last change on this file was 20498, checked in by Mathieu Morlighem, 9 years ago

CHG: done with Archive/19101-20495

File size: 1.7 KB
RevLine 
[20498]1Index: ../trunk-jpl/src/m/psl/icelm.m
2===================================================================
3--- ../trunk-jpl/src/m/psl/icelm.m (revision 19323)
4+++ ../trunk-jpl/src/m/psl/icelm.m (revision 19324)
5@@ -1,24 +0,0 @@
6-function ice_lm = icelm(lMax,nPix,ice,sh)
7-
8-%---------------------------------------------------------------------
9-% icelm :: a function to compute SH coefficients of "ice load function"
10-%---------------------------------------------------------------------
11-% This code is written as a part of the ISSM-PSL project
12-% (c) S. Adhikari
13-% Jet Propulsion Laboratory, Caltech
14-% November 3, 2014
15-%---------------------------------------------------------------------
16-
17-p1 = 0;
18-
19-ice_lm = zeros(1,(lMax+1)^2);
20-
21-for l=0:lMax
22- for m=-l:l
23- ice_lm(1+p1) = sum(sh(:,1+p1).*ice');
24- p1 = p1+1;
25- end
26-end
27-
28-ice_lm = ice_lm*4*pi/nPix;
29-
30Index: ../trunk-jpl/src/m/psl/ocelm.m
31===================================================================
32--- ../trunk-jpl/src/m/psl/ocelm.m (revision 19323)
33+++ ../trunk-jpl/src/m/psl/ocelm.m (revision 19324)
34@@ -1,25 +0,0 @@
35-function oce_lm = ocelm(sh,lMax,ocean,areaEle)
36-
37-%OCElm :: a function to compute SH coefficients of ocean function
38-%
39-%USAGE: oce_lm = ocelm(sh,lMax,ocean,areaEle);
40-%
41-%sh (spherical harmonics)
42-%lMax (maximum SH degree to be considered)
43-%ocean (ocean function)
44-%areaEle (area of elements)
45-%
46-
47-p1 = 0;
48-
49-oce_lm = zeros(1,(lMax+1)^2);
50-
51-% weighted area integration
52-for l=0:lMax
53- for m=-l:l
54- oce_lm(1+p1) = sum((sh(:,1+p1).*ocean').*areaEle');
55- p1 = p1+1;
56- end
57-end
58-oce_lm = oce_lm/sum(areaEle);
59-
Note: See TracBrowser for help on using the repository browser.