forked from classmodel/modelgui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodeloutput.h
165 lines (145 loc) · 6.8 KB
/
modeloutput.h
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
/*
* CLASS
* Copyright (c) 2010-2013 Meteorology and Air Quality section, Wageningen University and Research centre
* Copyright (c) 2011-2013 Jordi Vila-Guerau de Arellano
* Copyright (c) 2011-2013 Chiel van Heerwaarden
* Copyright (c) 2011-2013 Bart van Stratum
* Copyright (c) 2011-2013 Kees van den Dries
*
* This file is part of CLASS
*
* CLASS is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* CLASS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with CLASS. If not, see <http://www.gnu.org/licenses/>.
*/
#include <string>
class outputvar
{
public:
double *data;
std::string name;
std::string unit;
std::string description;
std::string id;
};
class modeloutput
{
public:
outputvar t; // time [h]
outputvar tutc; // time in UTC [h]
// mixed-layer variables
outputvar h; // CBL height [m]
outputvar Ps; // surface pressure [hPa]
outputvar ws; // large scale vertical velocity [m s-1]
outputvar beta; // entrainment ratio for virtual heat [-]
outputvar lcl; // lifting condensation level [m]
outputvar we; // entrainment velocity [m s-1]
outputvar RH; // Relative humidity at T=theta [-]
outputvar RHtop; // Relative humidity at mixed-layer top [-]
// temperature
outputvar theta; // initial mixed-layer potential temperature [K]
outputvar thetav; // initial mixed-layer virtual potential temperature [K]
outputvar dtheta; // initial potential temperature jump at h [K]
outputvar dthetav; // initial virtual potential temperature jump at h [K]
outputvar gammatheta;// free atmosphere potential temperature lapse rate [K m-1]
outputvar sigmatheta;// mixed-layer top potential temperature std dev [K]
outputvar advtheta; // advection of heat [K s-1]
outputvar wtheta; // surface kinematic heat flux [K m s-1]
outputvar wthetae; // entrainment kinematic heat flux [K m s-1]
outputvar wthetav; // surface kinematic virtual heat flux [K m s-1]
outputvar wthetaM; // mass-flux kinematic heat flux [K m s-1]
outputvar wstar; // Deardorff vertical velocity scale [m s-1]
// moisture
outputvar q; // mixed-layer specific humidity [kg kg-1]
//double *qsat; // mixed-layer saturated specific humidity [kg kg-1]
//double *e; // mixed-layer vapor pressure [Pa]
//double *esat; // mixed-layer saturated vapor pressure [Pa]
outputvar dq; // initial specific humidity jump at h [kg kg-1]
outputvar gammaq; // free atmosphere specific humidity lapse rate [kg kg-1 m-1]
outputvar sigmaq; // mixed-layer top specific humidity std dev [kg kg-1]
outputvar advq; // advection of moisture [kg kg-1 s-1]
outputvar wq; // surface kinematic moisture flux [kg kg-1 m s-1]
outputvar wqe; // entrainment kinematic moisture flux [kg kg-1 m s-1]
outputvar wqM; // mass-flux kinematic moisture flux [kg kg-1 m s-1]
// wind
outputvar u; // initial mixed-layer u-wind speed [m s-1]
outputvar du; // initial u-wind jump at h [m s-1]
outputvar gammau; // free atmosphere u-wind speed lapse rate [s-1]
outputvar advu; // advection of u-wind [m s-2]
outputvar uw; // surface u-momentum flux [m2 s-2]
outputvar uwe; // entrainment u-momentum flux [m2 s-2]
outputvar v; // initial mixed-layer u-wind speed [m s-1]
outputvar dv; // initial u-wind jump at h [m s-1]
outputvar gammav; // free atmosphere v-wind speed lapse rate [s-1]
outputvar advv; // advection of v-wind [m s-2]
outputvar vw; // surface v-momentum flux [m2 s-2]
outputvar vwe; // entrainment v-momentum flux [m2 s-2]
// BvS; a scalar...
outputvar sca; // mixed-layer scalar [kg kg-1]
outputvar dsca; // initial scalar jump at h [kg kg-1]
outputvar gammasca; // free atmosphere scalar lapse rate [kg kg-1 m-1]
outputvar advsca; // advection of scalar [kg kg-1 s-1]
outputvar wsca; // surface kinematic scalar flux [kg kg-1 m s-1]
outputvar wscae; // entrainment kinematic scalar flux [kg kg-1 m s-1]
outputvar wscaM; // mass-flux kinematic scalar flux [kg kg-1 m s-1]
outputvar sigmasca; // mixed-layer top scalar std dev [kg kg-1]
outputvar CO2; // initial mixed-layer CO2 [ppm]
outputvar dCO2; // initial CO2 jump at h [ppm]
outputvar gammaCO2; // free atmosphere CO2 lapse rate [ppm]
outputvar advCO2; // advection of CO2 [ppm]
outputvar wCO2; // surface kinematic CO2 flux [ppm]
outputvar wCO2A; //
outputvar wCO2R; //
outputvar wCO2e; // entrainment kinematic CO2 flux [ppm]
outputvar wCO2M; // mass-flux kinematic CO2 flux [ppm]
outputvar sigmaCO2; // mixed-layer top CO2 std dev [kg kg-1]
// surface-layer
outputvar ustar; // friction velocity [m s-1]
outputvar L; // Obukhov length [m]
outputvar Rib; // Bulk Richardson number [-]
outputvar ra; // aerodynamic resistance [m s-1]
outputvar Cm; // drag coefficient for momentum [-]
outputvar Cs; // drag coefficient for scalars [-]
// radiation
outputvar Swin; // Incoming short wave radiation [W m-2]
outputvar Swout; // Outgoing short wave radiation [W m-2]
outputvar Lwin; // Incoming long wave radiation [W m-2]
outputvar Lwout; // Outgoing long wave radiation [W m-2]
outputvar Q; // Net radiation [W m-2]
// land and soil
outputvar wg; // soil moisture [m3 m-3]
outputvar Tsoil; // soil temperature [K]
outputvar Ts; // surface temperature [K]
outputvar Wl; // liquid water on vegetation [m]
outputvar rs; // surface resistance [s m-1]
outputvar H; // sensible heat flux [W m-2]
outputvar LE; // latent heat flux [W m-2]
outputvar G; // ground heat flux [W m-2]
// shallow-cumulus
outputvar ac; // cloud core fraction [-]
outputvar M; // mass-flux (/rho) [m s-1]
outputvar cc; // total cloud fraction [-]
// vertical profiles
outputvar zprof;
outputvar thetaprof;
outputvar scaprof;
outputvar wthetaprof;
outputvar wthetavprof;
outputvar wqprof;
outputvar wscaprof;
outputvar qprof;
//chemistry
outputvar *sc; // mixed-layer specific humidity [kg kg-1]
outputvar phi; // photostationary state [-]
outputvar k_r05; // Photolysis rate of reaction r05
modeloutput(int,int);
void reset(int);
void reload(int,int);
};