function [volc,solaranom,aer,co2,forcingcotwo] = stabilizeforcings(v1,s1,a1,f1,c1,c0,iaer);
% (C) Michael Mann, 2011.
%
% extrapolate forcings out to 2100
n1=length(v1); %  out to 2012
n2=n1+88; % to to 2100
%
% project no future volcanic forcing 
volc(1:n1)=v1;
volc(n1+1:n2)=0.0;
% use persistence (of decadal mean anomaly)to extend solar forcing
solaranom(1:n1)=s1;
solaranom(n1+1:n2)=mean(s1(n1-10:n1));
% assume exponential decay of aerosol forcing during 21st century
% with a tau1=60 year decay constant
tau1=60.0;
aer(1:n1)=a1;
for jj=n1+1:n2;
    if (iaer==1)
       aer(jj)=aer(n1)*exp(-(jj-n1)/tau1);
    else
        aer(jj)=aer(n1);
    end 
end
% assume aerosol burden is unchanged
CO20 = 280.0;
% make CO2 asymptotically approach indicated stablization threshhold cthresh with
% with a tau2=20 year decay constant
tau2=20.0;
co2(1:n1)=c1;
for jj=n1+1:n2;
co2(jj)=co2(n1)*exp(-(jj-n1)/tau2)+(1-exp(-(jj-n1)/tau2))*c0;
end
% scale up to get CO2equiv ghg forcing from CO2 only 
% assume an enhancement of 20% by non-CO2 GHGs
cotwoequiv=CO20+1.2*(co2-CO20);
% calculate associated radiative forcing using approx relationship
forcingcotwo= 5.35 * log(cotwoequiv/CO20);
% 
%
end
















      