Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add daily_insolation.m functionality to handle Berger 1978 solution #13

Open
Andrew-Lowry opened this issue Apr 23, 2021 · 0 comments
Open

Comments

@Andrew-Lowry
Copy link

The current version of daily_insolation.m in the CDT calculates the orbital parameters from the BER90 solution described in Berger & Loutre 1991. As noted in Berger & Loutre 1991 (see conclusion bullet point no. 4) the BER78 solution "is preferable to BER90 for the last glacial-interglacial cycles because of its better accuracy close to present-day times". This is most easily checked by comparing the eccentricity value from daily_insolation.m (0.0172571) for 2000CE, compared to Wikipedia (0.0167086), a difference of 0.5485e-3. Using the BER78 solution eccentricity = 0.0167441, a difference of 0.0355e-3 (compared to Wikipedia) and an extra degree of precision. A similar improvement is found in the longitude of perihelion for 2000CE, Wikipedia = 102.9, daily_insolation.m = 100.51, and BER78 = 101.18.

I therefore propose the attached solution (daily_insolation_new.zip) which requires the mat file Berger.zip. This new function allows the user to pass in an option handle 'BER78' which calculates the eccentricity, obliquity, and longitude of perihelion from the BER78 solution described in Berger & Loutre 1991.

Description of changes
I have updated the comments under 'syntax' and 'description' to describe the new functionality.

The updates to the code are:

  1. line 80 to handle the case of multiple options, i.e. 'constant',value, 'mjmd', and 'BER78'.
    narginchk(3,8)

  2. lines 107-111 to handle the new option

if any(strcmpi(varargin,'BER78'))
    BER78 = true; % calculate orbital parameters from Berger 1978
else
    BER78 = false;
end
  1. lines 116-120 to select the orbital parameters function depending on the option
if BER78
    [ecc,epsilon,omega]=orbital_parameters_BER78(kyear); % function is below in this file
else
    [ecc,epsilon,omega]=orbital_parameters(kyear); % function is below in this file
end
  1. lines 190-236 the new orbital parameters function
% === Calculate orbital parameters from Berger 78 ===
% as described in Berger & Loutre 1991
function [ecc,epsilon,omega] = orbital_parameters_BER78(kyear)
t=-kyear.*1000; % convert kyr to yr and flip sign

% Load the tables from Berger & Loutre 1991
load('Berger.mat','Berger');
Table1 = Berger.Berger78.Table1;
Table4 = Berger.Berger78.Table4;
Table5 = Berger.Berger78.Table5;

% Constants from Table 9 in Berger & Loutre 1991
psibar = 50.439273/60./60. * pi/180 ;   % kbar
estar  = 23.320556;                     % eps *
zeta   = 3.392506 * pi/180;             % alpha

twopi  = 2*pi;
sectorad = pi/(180*60.*60);

% Order of table columns 'Term','Amp','Rate','Phase','Period'
M   = Table4(:,2);            % Amp
g   = Table4(:,3).*sectorad;  % Rate
b   = Table4(:,4).*pi./180;   % Phase
F   = Table5(:,2).*sectorad;  % Amp
fp  = Table5(:,3).*sectorad;  % Rate
d   = Table5(:,4).*pi./180;   % Phase
A   = Table1(:,2)./60./60;    % Amp
f   = Table1(:,3).*sectorad;  % Rate
phi = Table1(:,4).*pi./180;   % Rate


eps = estar + sum(A.*cos(f.*t+phi));

esinpi = sum(M.*sin(g.*t+b));
ecospi = sum(M.*cos(g.*t+b));
psi    = psibar.*t + zeta + sum(F.*sin(fp.*t +d));

e = sqrt(esinpi.^2+ecospi.^2);
Pi = atan(esinpi./ecospi)+pi.*(ecospi<0);
eps = eps * pi./180;
varpi = mod(Pi+psi+pi,twopi);

epsilon=eps;
ecc=e;
omega=varpi;

end

In addition to the above, it would not be too difficult to calculate the BER90 solution in the same way as the BER78 method
orbital_parameters_BER90.zip.

I hope you find this useful.
Andrew

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant