|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
Simplified SEB – the two-stream model's surface energy balance, as pure functions. More...
#include <AMReX_GpuControl.H>#include <AMReX_Math.H>#include <AMReX_FArrayBox.H>#include <cmath>#include <ERF_Constants.H>#include <ERF_MicrophysicsConstants.H>

Go to the source code of this file.
Functions | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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 Zeng 2009; ResistanceGroundEvaporationMod): vapour diffuses through a dry surface layer whose thickness grows as the top soil dries,. More... | |
| 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 (ResistanceGroundEvaporationMod), so that bare soil evaporates from RH * q_sat(T): More... | |
| 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): water theta * 4.188e6, solids (1 - theta_sat) * c_soil, and the air in the remaining pores (theta_sat - theta) * 1004.64 (Noah-MP's constant, applied per unit volume as Noah-MP does). More... | |
| 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): solids 7.7^q 2^(1-q) for quartz fraction q, saturated lambda_solid^(1-theta_sat) 0.57^theta_sat, dry (0.135 g + 64.7)/(2700 - 0.947 g) with g = 2700 (1 - theta_sat), blended by the Kersten number log10(theta/theta_sat) + 1 (0 below a saturation of 0.1). More... | |
| 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 and conductivity lambda: the heat capacity of the layer the diurnal wave penetrates, c d / (2 sqrt(pi)) with d = sqrt(lambda tau / c) (Deardorff 1978), i.e. sqrt(lambda c tau / pi) / 2 for a restore period tau [s]. More... | |
Simplified SEB – the two-stream model's surface energy balance, as pure functions.
The residual diagnosis below, the force-restore tendencies of the skin temperature and soil water (prognostic_dTs_dt, prognostic_dqs_dt), the soil's moisture availability (seb_moisture_availability), the canopy and bare-soil resistances to evaporation (seb_canopy_resistance_without_vpd, seb_soil_evaporation_resistance), the relative humidity of bare soil's pore air (seb_soil_surface_relative_humidity), and the soil's thermal properties (seb_soil_heat_capacity, seb_soil_thermal_conductivity, seb_force_restore_heat_capacity).
Surface Energy Balance Equation: R_net(i,j) = SW_net(i,j) + LW_net(i,j) = [sw_flux_sfc(i,j)] + [lw_flux_sfc(i,j)]
SEB_residual(i,j) = R_net(i,j) - hfx_sfc(i,j) - lh_sfc(i,j) - grdflx_sfc(i,j)
Where:
A perfectly closed budget gives SEB_residual = 0; non-zero residual indicates energy not accounted for by the four main SEB terms.
| 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.
Computes the SEB residual from net radiative flux and turbulent/ground heat fluxes. All inputs are guarded with amrex::Math::isfinite() to safely handle NaN/Inf; if any input is non-finite, returns 0.0 (safe no-op).
GPU Safety:
| [in] | sw_net | Shortwave net flux at surface [W/m^2] |
| [in] | lw_net | Longwave net flux at surface [W/m^2] |
| [in] | hfx | Sensible heat flux [W/m^2] |
| [in] | lh | Latent heat flux [W/m^2] |
| [in] | grdflx | Ground heat flux [W/m^2] |
Referenced by TwoStreamRadiation::advance().

| 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.
Computes dq_s/dt from latent heat flux and restoring term toward deep soil moisture: dq_s/dt = -(LE / (L_v * rhor * d_s)) - (1/tau_q) * (q_s - q_deep)
Constants:
All inputs are guarded with amrex::Math::isfinite() to safely handle NaN/Inf; if any input is non-finite, any parameter is non-positive (d_s <= 0, tau_q <= 0), returns 0.0 (safe no-op).
GPU Safety:
| [in] | le | Latent heat flux [W/m^2] |
| [in] | q_s | Current surface moisture: the volumetric water content [m^3/m^3] of a soil layer d_s deep, which is what LE / (L_v rhor d_s) drains |
| [in] | q_deep | Deep soil moisture, in q_s's units |
| [in] | d_s | Effective surface moisture layer depth [m] |
| [in] | tau_q | Moisture force-restore timescale [s] |
Referenced by TwoStreamRadiation::advance().

| 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.
Computes dT_s/dt from SEB residual and restoring term toward deep soil temperature: dT_s/dt = SEB_residual / C_s - (2*pi/tau) * (T_s - T_deep)
All inputs are guarded with amrex::Math::isfinite() to safely handle NaN/Inf; if any input is non-finite, any parameter is non-positive (C_s <= 0, tau <= 0), returns 0.0 (safe no-op).
GPU Safety:
| [in] | seb_residual | SEB residual [W/m^2] = R_net - H - LE - G |
| [in] | t_s | Current surface temperature [K] |
| [in] | t_deep | Deep soil temperature [K] |
| [in] | c_s | Effective surface heat capacity [J/(m^2*K)] |
| [in] | tau | Force-restore timescale [s] |
Referenced by TwoStreamRadiation::advance().

| 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.
Noah's big-leaf Jarvis form (Chen et al. 1996) on the parameters and floors of Noah-MP's canopy-resistance option 2 (ResistanceCanopyStomataJarvisMod). Noah-MP itself applies the factors per sunlit and shaded leaf, with the absorbed PAR (f = 2 PAR / RGL), the canopy temperature and canopy-air humidity, and a root-zone soil-water factor; here one big leaf takes the shortwave reaching the surface, the skin temperature, the air at the surface layer's reference height and the top layer's soil-water factor:
r_c = RS / (LAI * F_sw * F_T * F_vpd * F_soil), F_sw = (f + RS/RSMAX) / (1 + f), f = 0.55 * 2 SW_down / (RGL * LAI), F_T = 1 - 0.0016 (TOPT - T)^2,
F_soil the soil-water factor (seb_moisture_availability) and F_vpd the vapour-deficit factor, which needs the air's humidity and is applied by the surface layer (erf_surface_moisture::vapour_deficit_factor); this returns r_c * F_vpd. F_sw and F_T are floored at 1e-4 as in Noah-MP, F_soil at 1e-6 (Noah-MP's MinThr).
Referenced by TwoStreamRadiation::seb_surface_moisture().

| 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 and conductivity lambda: the heat capacity of the layer the diurnal wave penetrates, c d / (2 sqrt(pi)) with d = sqrt(lambda tau / c) (Deardorff 1978), i.e. sqrt(lambda c tau / pi) / 2 for a restore period tau [s].
Referenced by RadChoice::init_params().

| 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.
With the prognostic balance, q_s is the volumetric water content [m^3/m^3] of a surface layer seb_moisture_layer_depth_m deep (see prognostic_dqs_dt). The surface evaporates at the potential rate when that layer is at or above field capacity, not at all at or below the wilting point, and in proportion in between:
beta = clamp((q_s - q_wilt) / (q_fc - q_wilt), 0, 1)
the "beta" closure of bucket and force-restore land surfaces. The surface layer then takes the surface mixing ratio beta * q_sat(T_s, p_s) + (1 - beta) * q_air (erf_surface_moisture::surface_mixing_ratio), so its moisture flux is beta times the potential one.
| [in] | q_s | surface-layer water content [m^3/m^3] |
| [in] | q_wilt | wilting point [m^3/m^3] |
| [in] | q_fc | field capacity [m^3/m^3], above q_wilt |
Referenced by TwoStreamRadiation::seb_surface_moisture().

| 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 Zeng 2009; ResistanceGroundEvaporationMod): vapour diffuses through a dry surface layer whose thickness grows as the top soil dries,.
d_dry = d1 (exp((1 - min(1, theta/theta_sat))^p) - 1) / (e - 1), D = 2.2e-5 theta_sat^2 (1 - theta_wilt/theta_sat)^(2 + 3/b), r = d_dry / D,
with d1 the top layer's thickness and p = RSURF_EXP; 1e6 below theta = 0.01, as in Noah-MP.
Referenced by TwoStreamRadiation::seb_surface_moisture().

| 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): water theta * 4.188e6, solids (1 - theta_sat) * c_soil, and the air in the remaining pores (theta_sat - theta) * 1004.64 (Noah-MP's constant, applied per unit volume as Noah-MP does).
Referenced by RadChoice::init_params().

| 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 (ResistanceGroundEvaporationMod), so that bare soil evaporates from RH * q_sat(T):
psi = -psi_sat (max(0.01, theta) / theta_sat)^(-b), RH = exp(psi g / (R_v T)),
with Noah-MP's g = 9.80616 m/s^2 and R_v = 461.269 J/kg/K. Near 1 in moist soil, and near 0 at the wilting point (about 0.005 for silty clay loam at 325 K). Returns 1 (no reduction) for a non-finite or non-positive parameter or temperature.
Referenced by TwoStreamRadiation::seb_surface_moisture().

| 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): solids 7.7^q 2^(1-q) for quartz fraction q, saturated lambda_solid^(1-theta_sat) 0.57^theta_sat, dry (0.135 g + 64.7)/(2700 - 0.947 g) with g = 2700 (1 - theta_sat), blended by the Kersten number log10(theta/theta_sat) + 1 (0 below a saturation of 0.1).
Referenced by RadChoice::init_params().
