27 #ifndef ERF_SAT_METHOD_H_
28 #define ERF_SAT_METHOD_H_
51 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
54 if ( (
p - es) <= amrex::Real(0) )
55 return amrex::Real(1);
68 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
70 amrex::Real &es, amrex::Real &
qs,
const int idx = 1) {
91 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
93 amrex::Real &es, amrex::Real &
qs,
const int idx = 1) {
103 es = std::min(es,
p);
114 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
116 amrex::Real &es, amrex::Real &
qs,
const int idx = 1) {
126 es = std::min(es,
p);
136 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
159 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
182 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
198 weight = amrex::Real(1);
202 es = weight*esice + (amrex::Real(1) - weight)*es;
214 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
217 return pow(amrex::Real(10.), (-amrex::Real(7.90298)*(
tboil/
t-amrex::Real(1))+
218 amrex::Real(5.02808)*std::log10(
tboil/
t)-
219 amrex::Real(1.3816e-7)*(pow(amrex::Real(10.), (amrex::Real(11.344)*(amrex::Real(1)-
t/
tboil)))-amrex::Real(1))+
220 amrex::Real(8.1328e-3)*(pow(amrex::Real(10.), (-amrex::Real(3.49149)*(
tboil/
t-amrex::Real(1))))-amrex::Real(1))+
221 std::log10(amrex::Real(1013.246))))*amrex::Real(100.);
229 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
232 return pow(amrex::Real(10.), (-amrex::Real(9.09718)*(
h2otrip/
t-amrex::Real(1))-amrex::Real(3.56654)*
234 log10(amrex::Real(6.1071))))*amrex::Real(100.);
243 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
246 return exp(amrex::Real(54.842763) - (amrex::Real(6763.22) /
t) - (amrex::Real(4.210) * log(
t)) +
247 (amrex::Real(0.000367) *
t) + (tanh(amrex::Real(0.0415) * (
t - amrex::Real(218.8))) *
248 (amrex::Real(53.878) - (amrex::Real(1331.22) /
t) - (amrex::Real(9.44523) * log(
t)) +
249 amrex::Real(0.014025) *
t)));
257 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
260 return exp(amrex::Real(9.550426) - (amrex::Real(5723.265) /
t) + (amrex::Real(3.53068) * log(
t))
261 - (amrex::Real(0.00728332) *
t));
283 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
285 auto ps = amrex::Real(1013.246);
286 auto e1 = amrex::Real(11.344)*(amrex::Real(1) -
t/
tboil);
287 auto e2 = -amrex::Real(3.49149)*(
tboil/
t - amrex::Real(1));
288 auto f1 = -amrex::Real(7.90298)*(
tboil/
t - amrex::Real(1));
289 auto f2 = amrex::Real(5.02808)*log10(
tboil/
t);
290 auto f3 = -amrex::Real(1.3816)*(pow(amrex::Real(10.0), e1) - amrex::Real(1))/amrex::Real(10000000.0);
291 auto f4 = amrex::Real(8.1328)*(pow(amrex::Real(10.0), e2) - amrex::Real(1))/amrex::Real(1000.0);
293 auto f = f1 + f2 + f3 + f4 + f5;
294 return (pow(amrex::Real(10.0), f))*amrex::Real(100.0);
302 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
304 auto term1 = amrex::Real(2.01889049)/(
tmelt/
t);
305 auto term2 = amrex::Real(3.56654)*log(
tmelt/
t);
306 auto term3 = amrex::Real(20.947031)*(
tmelt/
t);
307 return amrex::Real(575.185606e10)*exp(-(term1 + term2 + term3));
323 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
325 constexpr
auto c1 = amrex::Real(611.2);
326 constexpr
auto c2 = amrex::Real(17.67);
327 constexpr
auto c3 = amrex::Real(243.5);
constexpr amrex::Real epsilo
Definition: ERF_Constants.H:64
constexpr amrex::Real omeps
Definition: ERF_Constants.H:65
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int idx(int i, int j, int k, int nx, int ny)
Definition: ERF_InitForEnsemble.cpp:404
Physical constants and tuning parameters used only by the moisture and cloud-physics code.
constexpr amrex::Real tboil
Definition: ERF_MicrophysicsConstants.H:124
constexpr amrex::Real tmelt
Definition: ERF_MicrophysicsConstants.H:122
constexpr amrex::Real ttrice
Definition: ERF_MicrophysicsConstants.H:125
constexpr amrex::Real h2otrip
Definition: ERF_MicrophysicsConstants.H:123
Methods for estimating the saturation vapor pressure of water.
Definition: ERF_SatMethods.H:41
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE void wv_sat_qsat_trans(const amrex::Real &t, const amrex::Real &p, amrex::Real &es, amrex::Real &qs, const int idx=1)
Calculate transition SVP and saturation specific humidity.
Definition: ERF_SatMethods.H:115
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real Bolton_svp_water(const amrex::Real &t)
Bolton (1980) saturation vapor pressure over water.
Definition: ERF_SatMethods.H:324
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real OldGoffGratch_svp_ice(const amrex::Real &t)
Old CAM implementation of Goff & Gratch (1946) SVP over ice.
Definition: ERF_SatMethods.H:303
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real wv_sat_svp_water(const amrex::Real &t, const int idx=1)
Dispatcher for saturation vapor pressure over water.
Definition: ERF_SatMethods.H:137
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real wv_sat_svp_to_qsat(const amrex::Real &es, const amrex::Real &p)
Get saturation specific humidity given pressure and SVP.
Definition: ERF_SatMethods.H:52
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real GoffGratch_svp_water(const amrex::Real &t)
Goff & Gratch (1946) saturation vapor pressure over water.
Definition: ERF_SatMethods.H:215
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE void wv_sat_qsat_water(const amrex::Real &t, const amrex::Real &p, amrex::Real &es, amrex::Real &qs, const int idx=1)
Calculate SVP over water and saturation specific humidity.
Definition: ERF_SatMethods.H:69
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE void wv_sat_qsat_ice(const amrex::Real &t, const amrex::Real &p, amrex::Real &es, amrex::Real &qs, const int idx=1)
Calculate SVP over ice and saturation specific humidity.
Definition: ERF_SatMethods.H:92
Type
Definition: ERF_SatMethods.H:334
@ MurphyKoop
Definition: ERF_SatMethods.H:338
@ Invalid
Definition: ERF_SatMethods.H:335
@ Bolton
Definition: ERF_SatMethods.H:339
@ GoffGratch
Definition: ERF_SatMethods.H:337
@ OldGoffGratch
Definition: ERF_SatMethods.H:336
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real OldGoffGratch_svp_water(const amrex::Real &t)
Old CAM implementation of Goff & Gratch (1946) SVP over water.
Definition: ERF_SatMethods.H:284
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real MurphyKoop_svp_ice(const amrex::Real &t)
Murphy & Koop (2005) saturation vapor pressure over ice.
Definition: ERF_SatMethods.H:258
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real GoffGratch_svp_ice(const amrex::Real &t)
Goff & Gratch (1946) saturation vapor pressure over ice.
Definition: ERF_SatMethods.H:230
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real MurphyKoop_svp_water(const amrex::Real &t)
Murphy & Koop (2005) saturation vapor pressure over water.
Definition: ERF_SatMethods.H:244
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real wv_sat_svp_trans(const amrex::Real &t, const int idx=1)
Calculate transition saturation vapor pressure.
Definition: ERF_SatMethods.H:183
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real wv_sat_svp_ice(const amrex::Real &t, const int idx=1)
Dispatcher for saturation vapor pressure over ice.
Definition: ERF_SatMethods.H:160
@ qs
Definition: ERF_Morrison.H:113
@ t
Definition: ERF_WSM6.H:295
@ p
Definition: ERF_WSM6.H:303
real(c_double), parameter c2
Definition: ERF_module_model_constants.F90:35
real(c_double), private c1
Definition: ERF_module_mp_morr_two_moment.F90:212