#-------------------------------------------------------------- #Description: # # Computes the TOA and surface radiation fluxes for # the three columns of the figure relating to the # surface budget fallacy in global warming. # # Note: This uses ccmradFunctions, which is located # in the Chapter 4 scripts directory # #-------------------------------------------------------------- #Data on section of text which this script is associated with Chapter = '6' Section = '**' Figure = 'fig:GWandSurfBudFallacy' # # #ToDo: Add in a full surface budget and compute #changes in sensible and latent heat fluxes from ClimateUtilities import * import phys import ccmradFunctions as ccm ccm.Tstrat = 180. #Isothermal stratospheric temperature T0 = 300. # Temperature of the unperturbed atmosphere co20 = 300. #Initial CO2, ppmv rh = .5 #Relative humidity aloft rhbdd = .8 #Relative humidity in boundary layer #Compute fluxes for the unperturbed atmosphere (First Column) olr0 = ccm.OLR(1.e5,T0,rh=rh,rhbdd = rhbdd,co2 = co20) junk, surfcool = ccm.BddRad(1.e5,T0,T0,co2=co20,rh=rh,rhbdd = rhbdd) backrad0 = phys.sigma*T0**4 - surfcool print "Unperturbed:%fK"%T0, olr0,backrad0 #Compute fluxes for the perturbed atmosphere (Second Column) olr1 = ccm.OLR(1.e5,T0,rh=rh,rhbdd = rhbdd,co2 = 2.*co20) junk, surfcool = ccm.BddRad(1.e5,T0,T0,rh=rh,rhbdd = rhbdd,co2=2.*co20) backrad1 = phys.sigma*T0**4 - surfcool print "Perturbed:%fK"%T0, olr1,backrad1 #Find new equilibrium temperature using Newton's method def f(T): return olr0-ccm.OLR(1.e5,T,rh=rh,rhbdd = rhbdd,co2 = 2.*co20) m = newtSolve(f) T1 = m(T0) #Compute fluxes for the restored equilibrium atmosphere (Third Column) olr2 = ccm.OLR(1.e5,T1,rh=rh,rhbdd = rhbdd,co2 = 2.*co20) junk, surfcool = ccm.BddRad(1.e5,T1,T1,rh=rh,rhbdd = rhbdd,co2=2.*co20) backrad2 = phys.sigma*T0**4 - surfcool print "Perturbed:%fK"%T1, olr2,backrad2