function [volc,solaranom,aer,forcingcotwo,cotwo] = getforcings(ioption,iscaling,isolar);
% (C) Michael Mann, 2011.
%
% read in long-term forcing data AD 850-2012
% 
% load in AJSBT07 CO2 data (updated for past decade from Mauna Loa)
load Data/co2.dat
cotwo=co2(:,2);
CO20 = 280.0;
% scale up to get CO2equiv ghg forcing from CO2 only 
% assume an enhancement of 20% by non-CO2 GHGs
cotwoequiv=CO20+1.2*(cotwo-CO20);
% calculate associated radiative forcing using approx relationship
forcingcotwo= 5.35 * log(cotwoequiv/CO20);
% AJSBT07 don't provide tropospheric sulphate aerosol series, so
% use Crowley (2000) historical NH mean aerosol forcing (assumed constant after 1998)
load Data/aerosol.dat
aer(1021:1163)=aerosol(:,2);
% assume 5% enhancement by indirect effects relative to Crowley series
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)
% (updated for most recent solar cycle data)
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-2012)
%
% default (ioption=0) is AJSBT07 forcing (linear scaling)
%
load Data/volcanic-ammann.dat % only global mean forcing provided
if (ioption==0)
volc0=volcanic_ammann(:,2);
else
%
if (ioption==1)
% 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=2: 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
%
% default is linear scaling 
%
volc0(1150:1163)=0.0;
volc=volc0;
%
if and(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
















      