-
Notifications
You must be signed in to change notification settings - Fork 0
/
atmos_dynamical_core.py
284 lines (257 loc) · 9.63 KB
/
atmos_dynamical_core.py
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
"""
A realm process specialization.
For further information goto http://wordpress.es-doc.org/cmip6-model-specializations.
"""
# --------------------------------------------------------------------
# INTERNAL (do not change)
# --------------------------------------------------------------------
from collections import OrderedDict
DETAILS = OrderedDict()
ENUMERATIONS = OrderedDict()
# --------------------------------------------------------------------
# DESCRIPTION: Short description of the specialization.
# --------------------------------------------------------------------
DESCRIPTION = 'Characteristics of the dynamical core'
# --------------------------------------------------------------------
# PROCESS: top level properties
# --------------------------------------------------------------------
DETAILS['toplevel'] = {
'description': "General dynamical core properties",
'properties': [
('timestepping_type', 'ENUM:timestepping_type', '1.1',
'Timestepping framework type'),
('prognostic_variables', 'ENUM:prognostic_variables', '1.N',
'List of the model prognostic variables'),
]
}
# --------------------------------------------------------------------
# Top boundary layer
# --------------------------------------------------------------------
DETAILS['top_boundary'] = {
'description': 'Type of boundary layer at the top of the model',
'properties': [
('top_boundary_condition', 'ENUM:top_boundary_condition', '1.1',
'Top boundary condition'),
('top_heat', 'str', '1.1',
'Top boundary heat treatment'),
('top_wind', 'str', '1.1',
'Top boundary wind treatment'),
]
}
# --------------------------------------------------------------------
# Lateral boundary conditions
# --------------------------------------------------------------------
DETAILS['lateral_boundary'] = {
'description': 'Type of lateral boundary condition (if the model is a regional model)',
'properties': [
('condition', 'ENUM:lateral_boundary', '0.1',
'Type of lateral boundary condition'),
]
}
# --------------------------------------------------------------------
# Horizontal diffusion
# --------------------------------------------------------------------
DETAILS['diffusion_horizontal'] = {
'description': 'Horizontal diffusion scheme',
'properties': [
('scheme_name', 'str', '0.1',
'Horizontal diffusion scheme name'),
('scheme_method', 'ENUM:diffusion_horizontal_scheme_method', '1.1',
'Horizontal diffusion scheme method'),
]
}
# --------------------------------------------------------------------
# Advection
# --------------------------------------------------------------------
DETAILS['advection'] = {
'description': 'Dynamical core advection'
}
DETAILS['advection:tracers'] = {
'description': 'Tracer advection scheme',
'properties': [
('scheme_name', 'ENUM:advection_tracers_scheme_name', '0.1',
'Tracer advection scheme name'),
('scheme_characteristics', 'ENUM:advection_tracers_scheme_characteristics', '1.N',
'Tracer advection scheme characteristics'),
('conserved_quantities', 'ENUM:advection_tracers_conserved_quantities', '1.N',
'Tracer advection scheme conserved quantities'),
('conservation_method', 'ENUM:advection_tracers_conservation_method', '1.1',
'Tracer advection scheme conservation method'),
]
}
DETAILS['advection:momentum'] = {
'description': 'Momentum advection scheme',
'properties': [
('scheme_name', 'ENUM:advection_momentum_scheme_name', '0.1',
'Momentum advection schemes name'),
('scheme_characteristics', 'ENUM:advection_momentum_scheme_characteristics', '1.N',
'Momentum advection scheme characteristics'),
('scheme_staggering_type', 'ENUM:advection_momentum_scheme_staggering_type', '1.1',
'Momentum advection scheme staggering type'),
('conserved_quantities', 'ENUM:advection_momentum_conserved_quantities', '1.N',
'Momentum advection scheme conserved quantities'),
('conservation_method', 'ENUM:advection_momentum_conservation_method', '1.1',
'Momentum advection scheme conservation method'),
]
}
# --------------------------------------------------------------------
# PROCESS: ENUMERATIONS
# --------------------------------------------------------------------
ENUMERATIONS['timestepping_type'] = {
'description': 'Type of time stepping scheme',
'is_open': True,
'members': [
('Adams-Bashforth', None),
('explicit', None),
('implicit', None),
('semi-implicit', None),
('leap frog', None),
('multi-step', None),
('Runge Kutta fifth order', None),
('Runge Kutta second order', None),
('Runge Kutta third order', None),
]
}
ENUMERATIONS['top_boundary_condition'] = {
'description': 'Type of boundary layer at the top of the model',
'is_open': True,
'members': [
('sponge layer', None),
('radiation boundary condition', None),
]
}
ENUMERATIONS['lateral_boundary'] = {
'description': 'Type of lateral boundary condition (if the model is a regional model)',
'is_open': True,
'members': [
('sponge layer', None),
('radiation boundary condition', None),
]
}
ENUMERATIONS['prognostic_variables'] = {
'description': 'List of the model prognostic variables',
'is_open': True,
'members': [
('surface pressure', None),
('wind components', None),
('divergence/curl', None),
('temperature', None),
('potential temperature', None),
('total water', None),
('water vapour', None),
('water liquid', None),
('water ice', None),
('total water moments', None),
('clouds', None),
('radiation', None),
]
}
# Made this a string attribute: no obvious convention for consistent scheme naming convention
# ENUMERATIONS['diffusion_horizontal_scheme_name'] = {
# 'description': 'Commonly used name for the horizontal diffusion scheme',
# 'is_open': True,
# 'members': []
# }
ENUMERATIONS['diffusion_horizontal_scheme_method'] = {
'description': 'Numerical method used by the horizontal diffusion scheme',
'is_open': True,
'members': [
('iterated Laplacian', None),
('bi-harmonic', None)
]
}
ENUMERATIONS['advection_tracers_scheme_name'] = {
'description': 'Commonly used name for the tracer advection scheme',
'is_open': True,
'members': [
('Heun', None),
('Roe and VanLeer', None),
('Roe and Superbee', None),
('Prather', None),
('UTOPIA', None),
]
}
ENUMERATIONS['advection_tracers_scheme_characteristics'] = {
'description': 'Characteristics of the numerical scheme used for the advection of tracers',
'is_open': True,
'members': [
('Eulerian', None),
('modified Euler', None),
('Lagrangian', None),
('semi-Lagrangian', None),
('cubic semi-Lagrangian', None),
('quintic semi-Lagrangian', None),
('mass-conserving', None),
('finite volume', None),
('flux-corrected', None),
('linear', None),
('quadratic', None),
('quartic', None),
]
}
ENUMERATIONS['advection_tracers_conserved_quantities'] = {
'description': 'Quantities conserved through the tracers advection scheme',
'is_open': True,
'members': [
('dry mass', None),
('tracer mass', None),
]
}
ENUMERATIONS['advection_tracers_conservation_method'] = {
'description': 'Method used to ensure conservation in the tracers advection scheme',
'is_open': True,
'members': [
('conservation fixer', None),
('Priestley algorithm', None),
]
}
ENUMERATIONS['advection_momentum_scheme_name'] = {
'description': 'Commonly used name for the momentum advection scheme',
'is_open': True,
'members': [
('VanLeer', None),
('Janjic', None),
('SUPG (Streamline Upwind Petrov-Galerkin)', None),
]
}
ENUMERATIONS['advection_momentum_scheme_characteristics'] = {
'description': 'Characteristics of the numerical scheme used for the advection of momentum',
'is_open': True,
'members': [
('2nd order', None),
('4th order', None),
('cell-centred', None),
('staggered grid', None),
('semi-staggered grid', None),
]
}
ENUMERATIONS['advection_momentum_scheme_staggering_type'] = {
'description': 'If scheme characteristics specify staggered grid, describe the type of staggering',
'is_open': True,
'members': [
('Arakawa B-grid', None),
('Arakawa C-grid', None),
('Arakawa D-grid', None),
('Arakawa E-grid', None),
]
}
ENUMERATIONS['advection_momentum_conserved_quantities'] = {
'description': 'Quantities conserved through the tracers advection scheme',
'is_open': True,
'members': [
("Angular momentum", None),
("Horizontal momentum", None),
("Enstrophy", None),
("Mass", None),
("Total energy", None),
("Vorticity", None),
]
}
# TODO: is this information nescessary?
ENUMERATIONS['advection_momentum_conservation_method'] = {
'description': 'Method used to ensure conservation in the momentum advection scheme',
'is_open': True,
'members': [
('conservation fixer', None),
]
}