This repository has been archived by the owner on Jul 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 69
/
Forcing.pxd
259 lines (230 loc) · 11.4 KB
/
Forcing.pxd
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
cimport Grid
cimport ReferenceState
cimport PrognosticVariables
cimport DiagnosticVariables
from NetCDFIO cimport NetCDFIO_Stats
cimport ParallelMPI
from Thermodynamics cimport LatentHeat, ClausiusClapeyron
cimport Thermodynamics
cdef class Forcing:
cdef:
object scheme
cpdef initialize(self, Grid.Grid Gr, ReferenceState.ReferenceState RS, Th, NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cpdef update(self, Grid.Grid Gr, ReferenceState.ReferenceState RS,
PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV, ParallelMPI.ParallelMPI Pa)
cpdef stats_io(self, Grid.Grid Gr, ReferenceState.ReferenceState RS,
PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV,
NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cdef class ForcingNone:
cpdef initialize(self, Grid.Grid Gr, ReferenceState.ReferenceState RS, Th, NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cpdef update(self, Grid.Grid Gr, ReferenceState.ReferenceState RS,
PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV, ParallelMPI.ParallelMPI Pa)
cpdef stats_io(self, Grid.Grid Gr, ReferenceState.ReferenceState RS,
PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV,
NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cdef class ForcingBomex:
cdef:
double [:] ug
double [:] vg
double [:] dtdt
double [:] dqtdt
double [:] subsidence
double coriolis_param
cpdef initialize(self, Grid.Grid Gr, ReferenceState.ReferenceState RS, Th, NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cpdef update(self, Grid.Grid Gr, ReferenceState.ReferenceState RS,
PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV, ParallelMPI.ParallelMPI Pa)
cpdef stats_io(self, Grid.Grid Gr, ReferenceState.ReferenceState RS,
PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV,
NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cdef class ForcingSullivanPatton:
cdef:
double [:] ug
double [:] vg
double coriolis_param
cpdef initialize(self, Grid.Grid Gr, ReferenceState.ReferenceState RS, Th, NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cpdef update(self, Grid.Grid Gr, ReferenceState.ReferenceState RS,
PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV, ParallelMPI.ParallelMPI Pa)
cpdef stats_io(self, Grid.Grid Gr, ReferenceState.ReferenceState RS,
PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV,
NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cdef class ForcingGabls:
cdef:
double [:] ug
double [:] vg
double coriolis_param
cpdef initialize(self, Grid.Grid Gr, ReferenceState.ReferenceState RS, Th, NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cpdef update(self, Grid.Grid Gr, ReferenceState.ReferenceState RS,
PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV, ParallelMPI.ParallelMPI Pa)
cpdef stats_io(self, Grid.Grid Gr, ReferenceState.ReferenceState RS,
PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV,
NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cdef class ForcingDyCOMS_RF01:
cdef:
double [:] ug
double [:] vg
double divergence
double [:] subsidence
double coriolis_param
bint rf02_flag
cpdef initialize(self, Grid.Grid Gr, ReferenceState.ReferenceState RS, Th, NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cpdef update(self, Grid.Grid Gr, ReferenceState.ReferenceState RS,
PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV, ParallelMPI.ParallelMPI Pa)
cpdef stats_io(self, Grid.Grid Gr, ReferenceState.ReferenceState RS,
PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV,
NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cdef class ForcingRico:
cdef:
double [:] ug
double [:] vg
double [:] dtdt
double [:] dqtdt
double [:] subsidence
double coriolis_param
Py_ssize_t momentum_subsidence
cpdef initialize(self, Grid.Grid Gr, ReferenceState.ReferenceState RS, Th, NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cpdef update(self, Grid.Grid Gr, ReferenceState.ReferenceState RS,
PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV, ParallelMPI.ParallelMPI Pa)
cpdef stats_io(self, Grid.Grid Gr, ReferenceState.ReferenceState RS,
PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV,
NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cdef class ForcingIsdac:
cdef:
double [:] dtdt
double [:] dqtdt
double [:] initial_u
double [:] initial_v
double [:] initial_entropy
double [:] initial_qt
double [:] nudge_coeff_velocities
double [:] nudge_coeff_scalars
double [:] w_half
double [:] ls_adv_qt
double [:] ls_adv_t
double divergence
cpdef initialize(self, Grid.Grid Gr, ReferenceState.ReferenceState RS, Th, NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cpdef update(self, Grid.Grid Gr, ReferenceState.ReferenceState RS,
PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV, ParallelMPI.ParallelMPI Pa)
cpdef stats_io(self, Grid.Grid Gr, ReferenceState.ReferenceState RS,
PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV,
NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cdef class ForcingIsdacCC:
cdef:
double [:] initial_u
double [:] initial_v
double [:] initial_entropy
double [:] initial_qt
double [:] nudge_coeff_velocities
double [:] nudge_coeff_scalars
double [:] w_half
double z_top
double divergence
cpdef initialize(self, Grid.Grid Gr, ReferenceState.ReferenceState RS, Th, NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cpdef update(self, Grid.Grid Gr, ReferenceState.ReferenceState RS,
PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV, ParallelMPI.ParallelMPI Pa)
cpdef stats_io(self, Grid.Grid Gr, ReferenceState.ReferenceState RS,
PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV,
NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cdef class ForcingMpace:
cdef:
double divergence
double [:] subsidence
double [:] dtdt
double [:] dqtdt
double [:] u0
double [:] v0
double [:] nudge_coeff_velocities
cpdef initialize(self, Grid.Grid Gr, ReferenceState.ReferenceState RS, Th, NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cpdef update(self, Grid.Grid Gr, ReferenceState.ReferenceState RS,
PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV, ParallelMPI.ParallelMPI Pa)
cpdef stats_io(self, Grid.Grid Gr, ReferenceState.ReferenceState RS,
PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV,
NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cdef class ForcingSheba:
cdef:
double [:] subsidence
double [:] dtdt
double [:] dqtdt
double [:] u0
double [:] v0
double nudge_coeff_velocities
cpdef initialize(self, Grid.Grid Gr, ReferenceState.ReferenceState RS, Th, NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cpdef update(self, Grid.Grid Gr, ReferenceState.ReferenceState RS,
PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV, ParallelMPI.ParallelMPI Pa)
cpdef stats_io(self, Grid.Grid Gr, ReferenceState.ReferenceState RS,
PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV,
NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cdef class ForcingCGILS:
cdef:
Py_ssize_t loc
bint is_p2
bint is_ctl_omega
double [:] dtdt
double [:] dqtdt
double [:] subsidence
double z_relax
double z_relax_plus
double tau_inverse
double tau_vel_inverse
double qt_floor
Py_ssize_t floor_index
double[:] gamma_zhalf
double[:] gamma_z
double [:] nudge_qt
double [:] nudge_temperature
double [:] nudge_u
double [:] nudge_v
double [:] source_qt_floor
double [:] source_qt_nudge
double [:] source_t_nudge
double [:] source_u_nudge
double [:] source_v_nudge
double [:] source_s_nudge
double [:] s_ls_adv
cpdef initialize(self, Grid.Grid Gr, ReferenceState.ReferenceState RS, Th, NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cpdef update(self, Grid.Grid Gr, ReferenceState.ReferenceState RS,
PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV, ParallelMPI.ParallelMPI Pa)
cpdef stats_io(self, Grid.Grid Gr, ReferenceState.ReferenceState RS,
PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV,
NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cdef class ForcingZGILS:
cdef:
Py_ssize_t loc
double [:] dtdt
double [:] dqtdt
double [:] subsidence
double [:] ug
double [:] vg
double [:] source_rh_nudge
double [:] source_qt_nudge
double [:] source_t_nudge
double [:] source_s_nudge
double [:] s_ls_adv
double coriolis_param
double divergence
double t_adv_max
double qt_adv_max
double tau_relax_inverse
double alpha_h
double h_BL
ClausiusClapeyron CC
AdjustedMoistAdiabat forcing_ref
cpdef initialize(self, Grid.Grid Gr, ReferenceState.ReferenceState RS, Th, NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cpdef update(self, Grid.Grid Gr, ReferenceState.ReferenceState RS,
PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV, ParallelMPI.ParallelMPI Pa)
cpdef stats_io(self, Grid.Grid Gr, ReferenceState.ReferenceState RS,
PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV,
NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cdef class AdjustedMoistAdiabat:
cdef:
double [:] s
double [:] qt
double [:] temperature
double [:] rv
double (*L_fp)(double T, double Lambda) nogil
double (*Lambda_fp)(double T) nogil
Thermodynamics.ClausiusClapeyron CC
cpdef get_pv_star(self, t)
cpdef entropy(self,double p0, double T,double qt, double ql, double qi)
cpdef eos(self, double p0, double s, double qt)
cpdef initialize(self, ParallelMPI.ParallelMPI Pa, double [:] pressure_array, Py_ssize_t n_levels,
double Pg, double Tg, double RH)