1 #ifndef ERF_SIMPLIFIED_SEB_H_
2 #define ERF_SIMPLIFIED_SEB_H_
4 #include <AMReX_GpuControl.H>
5 #include <AMReX_Math.H>
6 #include <AMReX_FArrayBox.H>
67 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
75 if (!amrex::Math::isfinite(sw_net) || !amrex::Math::isfinite(lw_net) ||
76 !amrex::Math::isfinite(hfx) || !amrex::Math::isfinite(lh) || !amrex::Math::isfinite(grdflx)) {
84 amrex::Real seb_residual = r_net - hfx - lh - grdflx;
113 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
121 if (!amrex::Math::isfinite(seb_residual) || !amrex::Math::isfinite(t_s) ||
122 !amrex::Math::isfinite(t_deep) || !amrex::Math::isfinite(c_s) || !amrex::Math::isfinite(tau)) {
127 if (c_s <= 0.0 || tau <= 0.0) {
133 amrex::Real restore_term = (2.0 *
PI / tau) * (t_s - t_deep);
168 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
176 if (!amrex::Math::isfinite(le) || !amrex::Math::isfinite(q_s) ||
177 !amrex::Math::isfinite(q_deep) || !amrex::Math::isfinite(d_s) || !amrex::Math::isfinite(tau_q)) {
182 if (d_s <= 0.0 || tau_q <= 0.0) {
191 amrex::Real restore_term = (1.0 / tau_q) * (q_s - q_deep);
217 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
222 if (!amrex::Math::isfinite(q_s) || !amrex::Math::isfinite(q_wilt) ||
223 !amrex::Math::isfinite(q_fc) || !(q_fc > q_wilt)) {
253 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
260 if (!amrex::Math::isfinite(rs_min) || !amrex::Math::isfinite(rs_max) ||
261 !amrex::Math::isfinite(rgl) || !amrex::Math::isfinite(t_opt) ||
262 !amrex::Math::isfinite(
lai) || !amrex::Math::isfinite(sw_down) ||
263 !amrex::Math::isfinite(t_canopy) || !amrex::Math::isfinite(soil_factor) ||
265 return no_transpiration;
273 return amrex::min(no_transpiration, rs_min / (
lai * f_sw * f_t * f_soil));
287 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
295 !(theta_wilt < theta_sat)) {
296 return no_evaporation;
303 return amrex::min(no_evaporation, d_dry / diffusivity);
317 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
322 if (!amrex::Math::isfinite(
theta) || !amrex::Math::isfinite(t_ground) ||
337 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
351 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
364 return kersten * (lambda_sat - lambda_dry) + lambda_dry;
373 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
constexpr amrex::Real L_v
Definition: ERF_Constants.H:63
amrex::Real gamma
Definition: ERF_InitCustomPert_DataAssimilation_ISV.H:9
Physical constants and tuning parameters used only by the moisture and cloud-physics code.
constexpr amrex::Real rhor
Definition: ERF_MicrophysicsConstants.H:39
constexpr amrex::Real PI
Definition: ERF_NumericalConstants.H:46
amrex::Real Real
Definition: ERF_ShocInterface.H:19
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real seb_soil_thermal_conductivity(amrex::Real theta, amrex::Real theta_sat, amrex::Real quartz)
Thermal conductivity of unfrozen soil [W/m/K], Noah-MP's Johansen form (SoilThermalPropertyMod): soli...
Definition: ERF_SimplifiedSEB.H:352
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real seb_soil_evaporation_resistance(amrex::Real theta, amrex::Real theta_sat, amrex::Real theta_wilt, amrex::Real b, amrex::Real d1, amrex::Real p)
Resistance of bare soil to evaporation [s/m], Noah-MP's ground-evaporation option 1 (Sakaguchi and Ze...
Definition: ERF_SimplifiedSEB.H:288
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real seb_moisture_availability(amrex::Real q_s, amrex::Real q_wilt, amrex::Real q_fc)
Moisture availability beta of the force-restore surface, from its water content.
Definition: ERF_SimplifiedSEB.H:218
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real seb_soil_surface_relative_humidity(amrex::Real theta, amrex::Real theta_sat, amrex::Real psi_sat, amrex::Real b, amrex::Real t_ground)
Relative humidity of the air in the top soil's pores, Noah-MP's for bare ground (ResistanceGroundEvap...
Definition: ERF_SimplifiedSEB.H:318
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real diagnose_seb_residual(amrex::Real sw_net, amrex::Real lw_net, amrex::Real hfx, amrex::Real lh, amrex::Real grdflx)
Diagnose the surface energy balance residual.
Definition: ERF_SimplifiedSEB.H:68
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real prognostic_dqs_dt(amrex::Real le, amrex::Real q_s, amrex::Real q_deep, amrex::Real d_s, amrex::Real tau_q)
Compute prognostic surface moisture tendency using force-restore formulation.
Definition: ERF_SimplifiedSEB.H:169
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real seb_canopy_resistance_without_vpd(amrex::Real rs_min, amrex::Real rs_max, amrex::Real rgl, amrex::Real t_opt, amrex::Real lai, amrex::Real sw_down, amrex::Real t_canopy, amrex::Real soil_factor)
Canopy resistance to transpiration [s/m] without its vapour-deficit factor.
Definition: ERF_SimplifiedSEB.H:254
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real seb_force_restore_heat_capacity(amrex::Real lambda, amrex::Real c, amrex::Real tau)
Surface heat capacity [J/m^2/K] of the force-restore balance for a soil of volumetric heat capacity c...
Definition: ERF_SimplifiedSEB.H:374
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real seb_soil_heat_capacity(amrex::Real theta, amrex::Real theta_sat, amrex::Real c_soil)
Volumetric heat capacity of unfrozen soil [J/m^3/K], as Noah-MP forms it (SoilThermalPropertyMod): wa...
Definition: ERF_SimplifiedSEB.H:338
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real prognostic_dTs_dt(amrex::Real seb_residual, amrex::Real t_s, amrex::Real t_deep, amrex::Real c_s, amrex::Real tau)
Compute prognostic surface temperature tendency using force-restore formulation.
Definition: ERF_SimplifiedSEB.H:114
@ lai
Definition: ERF_SLM.H:76
@ theta
Definition: ERF_Kessler.H:26
@ beta
Definition: ERF_SLM.H:152
@ p
Definition: ERF_WSM6.H:280