source:
issm/oecreview/Archive/20545-21336/ISSM-21306-21307.diff@
21337
Last change on this file since 21337 was 21337, checked in by , 8 years ago | |
---|---|
File size: 2.5 KB |
-
../trunk-jpl/src/m/boundaryconditions/love_numbers.m
3 3 % retrieved from: http://www.srosat.com/iag-jsg/loveNb.php 4 4 % in a chosen reference frame 5 5 % 6 % Usage: series=love_numbers(type,reference_frame) 7 % type is one of 'h','k','l','gamma' and 'lambda'. 8 % reference_frame is one of 'CM' and 'CF'. 6 % Usage: 7 % series = love_numbers(type) 8 % series = love_numbers(type,reference_frame) 9 % 10 % - type = one of 'h','k','l','gamma' and 'lambda'. 11 % - reference_frame = one of 'CM' (default) and 'CF'. 9 12 % 10 13 % Example: 11 % love_k=love_numbers('k','CF'); 14 % love_k = love_numbers('k'); 15 % love_k = love_numbers('k','CF'); 12 16 % 13 17 14 %some checks: 15 if nargin~=2, error('love_numbers error message: wrong usage'); end 16 17 if ~( strcmpi(type,'h') | strcmpi(type,'k') | strcmpi(type,'l') | strcmpi(type,'gamma') | strcmpi(type,'lambda') ), 18 error('type should be one of ''h'',''k'',''l'',''gamma'' and ''lambda'''); 19 end 20 18 % some checks: 19 if nargin==1, 20 frame='CM'; 21 disp('Info: computation is done in Center of Mass (CM) reference frame'); 22 elseif nargin==2, 23 frame=reference_frame; 21 24 if ~( strcmpi(reference_frame,'CM') | strcmpi(reference_frame,'CF')), 22 25 error('reference_frame should be one of ''CM'' or ''CF'''); 23 26 end 27 else 28 help love_numbers 29 error('bad usage'); 30 end 24 31 25 love_numbers=[... 32 if ~( strcmpi(type,'h') | strcmpi(type,'k') | strcmpi(type,'l') | strcmpi(type,'gamma') | strcmpi(type,'lambda') ), 33 error('type should be one of ''h'',''k'',''l'',''gamma'' and ''lambda'''); 34 end 35 36 love_numbers=[... 26 37 0 0 0 0 0 0 0 27 38 -1.28740059 -1.00000000 -0.89858519 1.28740059 0.42519882 0.89858519 0.00000000 28 39 -1.00025365 -0.30922675 0.02060926 1.69102690 0.46358648 0.67016399 0.61829668; … … 10040 10051 end 10041 10052 10042 10053 % choose degree 1 term for CF reference system 10043 if reference_frame=='CM',10054 if frame=='CM', 10044 10055 return; 10045 elseif reference_frame=='CF', % from Blewitt, 2003, JGR10056 elseif frame=='CF', % from Blewitt, 2003, JGR 10046 10057 if type=='h', 10047 10058 series(2,1) = -0.269; 10048 10059 elseif type=='k', … … 10051 10062 series(2,1) = 0.134; 10052 10063 end 10053 10064 else 10054 error(['love_numbers error message: unknow reference frame:' reference_frame]);10065 error(['love_numbers error message: unknow reference frame:' frame]); 10055 10066 end 10056 10067
Note:
See TracBrowser
for help on using the repository browser.