Changeset 19310
- Timestamp:
- 04/23/15 15:54:25 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/psl/ocelm.m
r19296 r19310 1 function oce_lm = ocelm( lMax,nPix,ocean,sh)1 function oce_lm = ocelm(sh,lMax,ocean,areaEle) 2 2 3 %--------------------------------------------------------------------- 4 % ocelm :: a function to compute SH coefficients of "ocean function" 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 %--------------------------------------------------------------------- 3 %OCElm :: a function to compute SH coefficients of ocean function 4 % 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 11 13 p1 = 0; 12 14 13 15 oce_lm = zeros(1,(lMax+1)^2); 14 16 17 % weighted area integration 15 18 for l=0:lMax 16 19 for m=-l:l 17 oce_lm(1+p1) = sum( sh(:,1+p1).*ocean');20 oce_lm(1+p1) = sum((sh(:,1+p1).*ocean').*areaEle'); 18 21 p1 = p1+1; 19 22 end 20 23 end 24 oce_lm = oce_lm/sum(areaEle); 21 25 22 oce_lm = oce_lm*4*pi/nPix;23
Note:
See TracChangeset
for help on using the changeset viewer.