# Contents

## Idea

To make a simple model of how albedo impacts global temperature The first Sage draft is here for discussion. Where i plotted $a_p$ and Q for several values of $\gamma$.

Are the plots for $a_p$ looking correct? Do I need to calculate T_e before I calculate Q?

## Details

### Draft Code

#T is in degrees Celsius and A and B are from derived from atmospheric
# conditions to be A = 218 Wm^2 and B = 1.90 W/m^2C
# The value of C to be 10^7J/2.0

# I use some variables as I wanted to test the new symbolic support
var('t Q gamma')

ai = 0.3; af = 0.7
A = 218.0
B = 1.9
# effective heat capacity. transform C in K to C?
C = 10^7/2.0

# should this be solved for Te?
T = function('T',t)

# the co-albedo is a function of T
#ap = function('ap',T)

ap(T) = ai + 0.5*(af-ai)*(1 + tanh(gamma*T))

# eq 2.36
bal_eq = C*diff(T,t) == -A - B*T + Q*ap

# or should we use t_e from eq. 2.9 instead in 2.37 ?
q_eq = solve(bal_eq.rhs() == 0,Q)[0].rhs()

@interact
def coalbedo(gamma_value=(0,1,.1)):
# this is the Q plot and ap plot.
#ga = graphics_array([qplot,aplot])
#show(qplot + aplot,figsize=5)
plot(q_eq.substitute(gamma=gamma_value),(T,0,40),color="cyan",legend_label='$Q$').show()
plot(ap.substitute(gamma=gamma_value),(T,-4,4),legend_label='$a_p$').show()



## References

category: experiments