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
/
Microphysics.pxd
75 lines (58 loc) · 3.55 KB
/
Microphysics.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
cimport Grid
cimport PrognosticVariables
cimport DiagnosticVariables
cimport ReferenceState
cimport ParallelMPI
cimport TimeStepping
from NetCDFIO cimport NetCDFIO_Stats
from Thermodynamics cimport LatentHeat, ClausiusClapeyron
cdef:
double lambda_constant(double T) nogil
double latent_heat_constant(double T, double T) nogil
cdef class No_Microphysics_Dry:
# Make the thermodynamics_type member available from Python-Space
cdef public:
str thermodynamics_type
cpdef initialize(self, Grid.Grid Gr, PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV, NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cpdef update(self, Grid.Grid Gr, ReferenceState.ReferenceState Ref, Th, PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV, TimeStepping.TimeStepping TS, ParallelMPI.ParallelMPI Pa)
cpdef stats_io(self, Grid.Grid Gr, ReferenceState.ReferenceState Ref, Th, PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV, NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cdef class No_Microphysics_SA:
# Make the thermodynamics_type member available from Python-Space
cdef public:
str thermodynamics_type
cdef:
double (*L_fp)(double T, double Lambda) nogil
double (*Lambda_fp)(double T) nogil
double ccn
Py_ssize_t order
bint cloud_sedimentation
bint stokes_sedimentation
cpdef initialize(self, Grid.Grid Gr, PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV, NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cpdef update(self, Grid.Grid Gr, ReferenceState.ReferenceState Ref, Th, PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV, TimeStepping.TimeStepping TS, ParallelMPI.ParallelMPI Pa)
cpdef stats_io(self, Grid.Grid Gr, ReferenceState.ReferenceState Ref, Th, PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV, NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cdef class Microphysics_SB_Liquid:
# Make the thermodynamics_type member available from Python-Space
cdef public:
str thermodynamics_type
cdef:
double (*L_fp)(double T, double Lambda) nogil
double (*Lambda_fp)(double T) nogil
double (*compute_rain_shape_parameter)(double density, double qr, double Dm) nogil
double (*compute_droplet_nu)(double density, double ql) nogil
ClausiusClapeyron CC
double ccn
Py_ssize_t order
bint cloud_sedimentation
bint stokes_sedimentation
cpdef initialize(self, Grid.Grid Gr, PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV,NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cpdef update(self, Grid.Grid Gr, ReferenceState.ReferenceState Ref, Th, PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV, TimeStepping.TimeStepping TS, ParallelMPI.ParallelMPI Pa)
cpdef stats_io(self, Grid.Grid Gr, ReferenceState.ReferenceState Ref, Th, PrognosticVariables.PrognosticVariables PV, DiagnosticVariables.DiagnosticVariables DV, NetCDFIO_Stats NS, ParallelMPI.ParallelMPI Pa)
cdef inline double lambda_constant(double T) nogil:
return 1.0
cdef inline double latent_heat_constant(double T, double Lambda) nogil:
return 2.501e6
cdef inline double latent_heat_variable(double T, double Lambda) nogil:
cdef:
double TC = T - 273.15
return (2500.8 - 2.36 * TC + 0.0016 * TC *
TC - 0.00006 * TC * TC * TC) * 1000.0