function [volc,solaranom,aer,forcingcotwo] = getforcings(ioption,iscaling,isolar);
% (C) Michael Mann, 2011.
%
% read in long-term forcing data AD 850-1999
% 
% load in AJSBT07 CO2 data
load Data/co2.dat
cotwo=co2(:,2);
CO20 = 280.0;
% scale up to get CO2equiv ghg forcing from CO2 only 
cotwoequiv=CO20+1.525*(cotwo-CO20);
forcingcotwo= 5.35 * log(cotwoequiv/CO20);
% AJSBT07 don't provide a global tropospheric sulphate aerosol series, so use Crowley (2000) aerosol forcing
load Data/aerosol.dat
aer(1021:1150)=aerosol(:,2);
aer=aer';
% read Ammann et al '07 solar forcing - define as anomaly relative
% to mean Solar Constant (note: AJSBT07 assume 0.25% MM-present solar change)
load Data/solar.dat
solarabs=solar(:,2);
solaranom=solarabs-mean(solarabs);
% impose solar scaling
% default is (0.1%) MM-present solar change 
if (isolar==0) 
solaranom=(0.1/0.25)*solaranom;
end
%
% load in volcanic forcing (AD 850-1999)
% (zero out those
%
% default (ioption=0) is AJSBT07 forcing (linear scaling)
%
load Data/volcanic-ammann.dat % only global mean forcing provided
if or(ioption==0,ioption==4)
volc0=volcanic_ammann(:,2);
else
%
if (ioption==1)
% ioption=1: sensitivity study, downgrade AD 1258/1259 eruption from peak of
% -11.93 to -8.3 (as per smallest estimates from Jones and Mann ROG)
volc0(409)=volc(409)*(8.3/11.93);
volc0(410)=volc(410)*(8.3/11.93);
else
%
if (ioption==2)
% ioption=2: Gao et al'08 IVI series 
load Data/volcanic-robock.dat % use NH mean forcing series
loading=volcanic_robock(350:1499,2); % NH mean series is 2nd column
volc0=-loading*20/1.5E+2;  % default is linear scaling between aerosol loading and radiative forcing 
else
% ioption=3: Crowley '00 volcanic forcing series 
% note: only available AD 1000-1998 so use default (ASJBT07) values outside
% that interval
% note: already incorporates 2/3 power law scaling
load Data/volcanic-crowley.dat % only global mean estimate available
volc0=volcanic_ammann(:,2); % keep Ammann values outside available range
volc0(151:1149)=volcanic_crowley(:,2); % 
%
end
end
end
%
% default is linear scaling 
%
volc=volc0;
%
if and(or(ioption==0,ioption==2),iscaling==1)
%  alternatively (doesn't apply to ioption=1 or 3 which already account for
%  reduced scaling of large eruptions)
%  use power law scaling of Pinto et al (1989)/Hyde and Crowley (2000)
%  forcing = DeltaFk (M/Mk)^2/3 where Mk is optical thickness corresponding
%  to forcing DeltaFk = -3.7 W/m^2 (originally based on Sato et al, 1993 estimate for Krakatoa)
%
for i=1:1150
 volc(i)=-3.7*(volc0(i)/-3.7)^0.6667;
end 
end
%
end
















      