-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathThursday Apr 2 2015 - Intro Climate Model.py
More file actions
90 lines (51 loc) · 1.29 KB
/
Thursday Apr 2 2015 - Intro Climate Model.py
File metadata and controls
90 lines (51 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# coding: utf-8
# In[1]:
from pyndamics import *
# ## No atmosphere
# In[2]:
sim=Simulation()
sim.add("Es'=C*(100-0.3*100-Es)",1,plot=True)
sim.params(C=1)
sim.run(0,50)
# In[23]:
sim=Simulation()
sim.add("Es'=C*(100-albedo*100-Es)",1,plot=True)
sim.add("Ts=88.5*Es**0.25-273",plot=True)
sim.params(C=1,albedo=0.3)
sim.run(0,50)
# In[24]:
sim.Ts[-1]
# ## With an atmosphere, complete absorption of the surface energy
# In[15]:
sim=Simulation()
sim.add("Es'=C1*(100-albedo*100+Ea-Es)",1,plot=1)
sim.add("Ea'=C2*(Es-Ea-Ea)",1,plot=1)
sim.add("Ts=88.5*Es**0.25-273",plot=2)
sim.add("Ta=88.5*Ea**0.25-273",plot=2)
sim.params(C1=1,C2=10,albedo=0.3)
sim.run(0,50)
# In[16]:
sim.Ts[-1]
# ## With partial absorption
# In[17]:
sim=Simulation()
sim.add("Es'=C1*(100-albedo*100+Ea-Es)",1,plot=1)
sim.add("Ea'=C2*(g*Es-Ea-Ea)",1,plot=1)
sim.add("Ts=88.5*Es**0.25-273",plot=2)
sim.add("Ta=88.5*Ea**0.25-273",plot=2)
sim.params(C1=1,C2=10,albedo=0.3,g=0.9)
sim.run(0,50)
# In[18]:
sim.Ts[-1]
# what happens if g=0?
# In[20]:
sim=Simulation()
sim.add("Es'=C1*(100-albedo*100+Ea-Es)",1,plot=1)
sim.add("Ea'=C2*(g*Es-Ea-Ea)",1,plot=1)
sim.add("Ts=88.5*Es**0.25-273",plot=2)
#sim.add("Ta=88.5*Ea**0.25-273",plot=2)
sim.params(C1=1,C2=10,albedo=0.3,g=0.0)
sim.run(0,50)
# In[22]:
sim.Ts[-1]
# In[ ]: