1 #ifndef ERF_RAD_STRUCT_H_
2 #define ERF_RAD_STRUCT_H_
8 #include <AMReX_ParmParse.H>
9 #include <AMReX_ParallelDescriptor.H>
10 #include <AMReX_Print.H>
11 #include <AMReX_Gpu.H>
43 AMREX_ENUM(AerosolProfileType, Constant, Exponential, Table);
89 void read (
const std::string& prefix)
91 amrex::ParmParse
pp(prefix);
92 pp.queryAdd(
"fixed_solar_zenith_angle",
fixed_mu);
96 if (!std::isfinite(
latitude) || latitude < -90.0 || latitude > 90.0) {
97 amrex::Abort(
"erf.rad_cons_lat = " + std::to_string(
latitude) +
98 " must lie in [-90, 90] degrees.");
100 if (!std::isfinite(
longitude) || longitude < -180.0 || longitude > 180.0) {
101 amrex::Abort(
"erf.rad_cons_lon = " + std::to_string(
longitude) +
102 " must lie in [-180, 180] degrees.");
105 amrex::Abort(
"erf.fixed_solar_zenith_angle = " + std::to_string(
fixed_mu) +
106 " is the cosine of the solar zenith angle and cannot exceed 1; 60 degrees is 0.5.");
1033 static void clamp_low (
const char* key, amrex::Real& value, amrex::Real
lo)
1036 if (amrex::ParallelDescriptor::IOProcessor()) {
1037 amrex::Print() <<
"WARNING: erf.radiation." << key <<
" = " << value
1038 <<
" is below its minimum " <<
lo <<
"; using " <<
lo <<
"\n";
1043 static void clamp_high (
const char* key, amrex::Real& value, amrex::Real
hi)
1046 if (amrex::ParallelDescriptor::IOProcessor()) {
1047 amrex::Print() <<
"WARNING: erf.radiation." << key <<
" = " << value
1048 <<
" is above its maximum " <<
hi <<
"; using " <<
hi <<
"\n";
1055 if (!std::isfinite(value) || value <= 0.0) {
1056 if (amrex::ParallelDescriptor::IOProcessor()) {
1057 amrex::Print() <<
"WARNING: erf.radiation." << key <<
" = " << value
1058 <<
" must be positive; using " << fallback <<
"\n";
1066 amrex::ParmParse
pp(pp_prefix);
1067 enabled = two_stream_selected;
1089 static const char* retired_keys[][2] = {
1090 {
"radiation.solar_zenith",
1091 "erf.fixed_solar_zenith_angle, which is the cosine of the angle (60 degrees is 0.5)"},
1092 {
"radiation.solar_zenith_deg",
1093 "erf.fixed_solar_zenith_angle, which is the cosine of the angle (60 degrees is 0.5)"},
1094 {
"radiation.S0",
"erf.fixed_total_solar_irradiance"},
1095 {
"radiation.earth_sun_distance_enable",
1096 "nothing: leave erf.fixed_total_solar_irradiance unset and the irradiance follows the date"},
1097 {
"radiation.surface_temp_k",
"erf.rad_t_sfc"},
1098 {
"radiation.solar_geometry_dynamic_enable",
1099 "nothing: leave erf.fixed_solar_zenith_angle unset and the sun follows start_datetime"},
1100 {
"radiation.latitude_deg",
"erf.rad_cons_lat"},
1101 {
"radiation.longitude_deg",
"erf.rad_cons_lon"},
1102 {
"radiation.day_of_year",
"start_datetime"},
1103 {
"radiation.time_zone_offset_hours",
1104 "nothing: start_datetime is UTC and the longitude sets the local solar time"},
1106 for (
const auto& entry : retired_keys) {
1107 if (
pp.contains(entry[0])) {
1108 amrex::Abort(std::string(
"erf.") + entry[0] +
" is no longer read by the "
1109 "two-stream model; use " + entry[1] +
".");
1115 " is the cosine of the solar zenith angle (as for RRTMGP) and cannot "
1116 "exceed 1; 60 degrees is 0.5.");
1120 amrex::Abort(
"erf.radiation_model = TwoStream needs erf.rad_t_sfc, the surface "
1121 "temperature [K] used where no land-surface model or surface layer "
1122 "supplies one (the same input RRTMGP requires).");
1125 amrex::Abort(
"erf.rad_t_sfc = " + std::to_string(
rad_t_sfc) +
" must be a positive temperature [K].");
1129 if (!std::isfinite(
rad_cons_lat) || rad_cons_lat < -90.0 || rad_cons_lat > 90.0) {
1130 amrex::Abort(
"erf.rad_cons_lat = " + std::to_string(
rad_cons_lat) +
" must lie in [-90, 90] degrees.");
1132 if (!std::isfinite(
rad_cons_lon) || rad_cons_lon < -180.0 || rad_cons_lon > 180.0) {
1133 amrex::Abort(
"erf.rad_cons_lon = " + std::to_string(
rad_cons_lon) +
" must lie in [-180, 180] degrees.");
1139 if (
pp.contains(
"rad_freq_in_steps") && amrex::ParallelDescriptor::IOProcessor()) {
1140 amrex::Print() <<
"WARNING: erf.rad_freq_in_steps is not read by the two-stream model, "
1141 "which runs every step.\n";
1143 std::string tau_model_str =
"per_layer";
1144 pp.query(
"radiation.tau_model", tau_model_str);
1145 if (tau_model_str ==
"per_layer") {
1147 }
else if (tau_model_str ==
"mass") {
1153 if (amrex::ParallelDescriptor::IOProcessor()) {
1154 amrex::Print() <<
"WARNING: unknown erf.radiation.tau_model '"
1155 << tau_model_str <<
"'; valid values are per_layer "
1156 "and mass. Using per_layer.\n";
1185 std::string tau_profile_type_str =
"constant";
1186 pp.query(
"radiation.tau_profile_type", tau_profile_type_str);
1187 if (tau_profile_type_str ==
"constant") {
1189 }
else if (tau_profile_type_str ==
"cloud_layer") {
1194 if (amrex::ParallelDescriptor::IOProcessor()) {
1195 amrex::Print() <<
"WARNING: unknown erf.radiation.tau_profile_type '"
1196 << tau_profile_type_str <<
"'; valid values are "
1197 "constant and cloud_layer. Using constant, so no "
1198 "cloud layer is applied.\n";
1246 if (amrex::ParallelDescriptor::IOProcessor()) {
1247 amrex::Print() <<
"WARNING: unknown erf.radiation.diag_callsite_mode '"
1249 "pre_only and post_only. Using both.\n";
1306 " must be positive [kg/kg].");
1314 std::string aerosol_profile_type_str =
"constant";
1315 pp.query(
"radiation.aerosol_profile_type", aerosol_profile_type_str);
1316 if (aerosol_profile_type_str ==
"constant") {
1318 }
else if (aerosol_profile_type_str ==
"exponential") {
1320 }
else if (aerosol_profile_type_str ==
"table") {
1325 if (amrex::ParallelDescriptor::IOProcessor()) {
1326 amrex::Print() <<
"WARNING: erf.radiation.aerosol_profile_type = table is "
1327 "not implemented and contributes no aerosol optical "
1328 "depth. Use constant or exponential.\n";
1333 if (amrex::ParallelDescriptor::IOProcessor()) {
1334 amrex::Print() <<
"WARNING: unknown erf.radiation.aerosol_profile_type '"
1335 << aerosol_profile_type_str <<
"'; valid values are "
1336 "constant and exponential. Using constant.\n";
1359 pp.query_enum_sloppy(
"radiation.seb_turbulent_flux_source",
1363 pp.query(
"radiation.seb_turbulent_flux_source", value);
1364 amrex::Abort(
"erf.radiation.seb_turbulent_flux_source must be surface_layer "
1365 "or defaults, not '" + value +
"'");
1376 if (
pp.contains(
"radiation.seb_soil_moisture_wilt") ||
1377 pp.contains(
"radiation.seb_soil_moisture_fc")) {
1378 amrex::Abort(
"erf.radiation.seb_soil_type sets the wilting point and field "
1379 "capacity from Noah-MP's soil table; do not also give "
1380 "seb_soil_moisture_wilt or seb_soil_moisture_fc");
1384 amrex::Abort(
"erf.radiation.seb_soil_type = " + std::to_string(
seb_soil_type) +
1385 " is not a Noah-MP soil category with a field capacity above its "
1386 "wilting point (1-19, not 14, water; see ERF_NoahMPSoilTable.H)");
1396 if (veg ==
nullptr) {
1397 amrex::Abort(
"erf.radiation.seb_vegetation_type = " + std::to_string(
seb_vegetation_type) +
1398 " is not a Noah-MP MODIS land-use category (1-20; see "
1399 "ERF_NoahMPVegetationTable.H)");
1403 if (!(veg->
z0 > 0.0)) {
1404 amrex::Abort(
"erf.radiation.seb_vegetation_type = " + std::to_string(
seb_vegetation_type) +
1405 " has no vegetation in Noah-MP's table (Z0MVT = 0, LAI 0 all year). "
1406 "For bare land leave seb_vegetation_type at 0: the soil's resistance "
1407 "and roughness (Z0SOIL) then apply.");
1410 amrex::Abort(
"erf.radiation.seb_vegetation_type needs "
1411 "erf.radiation.seb_surface_layer_uses_moisture = true and "
1412 "erf.radiation.seb_soil_type (the bare-soil resistance uses the "
1413 "soil's porosity and Clapp-Hornberger b)");
1417 amrex::Abort(
"erf.radiation.seb_vegetation_fraction must be in [0, 1]; got " +
1420 if (
pp.contains(
"radiation.seb_leaf_area_index")) {
1422 amrex::Abort(
"erf.radiation.seb_leaf_area_index must be >= 0; got " +
1429 amrex::ParmParse pp_top;
1430 amrex::Real day = 0.0, days_in_year = 0.0;
1431 if (!pp_top.query(
"start_datetime",
start) ||
1433 amrex::Abort(
"erf.radiation.seb_vegetation_type: give "
1434 "erf.radiation.seb_leaf_area_index, or a valid start_datetime "
1435 "(YYYY-MM-DD HH:MM:SS) so that it can be taken from the table");
1439 if (amrex::ParallelDescriptor::IOProcessor()) {
1440 amrex::Print() <<
"NOTE: erf.radiation.seb_leaf_area_index = "
1443 <<
", fixed for the run.\n";
1474 pp.query_enum_sloppy(
"radiation.seb_precipitation_source",
1478 pp.query(
"radiation.seb_precipitation_source", value);
1479 amrex::Abort(
"erf.radiation.seb_precipitation_source must be none or microphysics, "
1480 "not '" + value +
"'");
1496 if (amrex::ParallelDescriptor::IOProcessor()) {
1497 amrex::Print() <<
"NOTE: erf.radiation.seb_prognostic_enable = true "
1498 "also enables seb_enable and "
1499 "seb_diagnostic_enable, which it depends on.\n";
1526 amrex::Abort(
"erf.radiation.seb_surface_layer_uses_skin = true needs "
1527 "erf.radiation.seb_prognostic_enable = true: without it the "
1528 "skin temperature does not evolve");
1531 amrex::Abort(
"erf.radiation.seb_surface_layer_uses_skin = true needs "
1532 "erf.radiation.seb_turbulent_flux_source = surface_layer: the "
1533 "balance must remove the heat flux the surface layer computes "
1541 amrex::Abort(
"erf.radiation.seb_init_skin_from_file = true needs "
1542 "erf.radiation.seb_prognostic_enable = true: without it the skin "
1543 "temperature is erf.rad_t_sfc at every radiation step");
1549 amrex::Abort(
"erf.radiation.seb_init_t_deep_from_file = true needs "
1550 "erf.radiation.seb_prognostic_enable = true: only the prognostic "
1551 "skin temperature restores toward the deep temperature");
1557 amrex::Abort(
"erf.radiation.seb_init_soil_moisture_from_file = true needs "
1558 "erf.radiation.seb_prognostic_enable = true: without it the soil "
1559 "water is erf.radiation.seb_q_sfc_default at every radiation step");
1567 pp.contains(
"radiation.seb_soil_moisture_wilt") ||
1572 amrex::Abort(
"erf.radiation.seb_soil_moisture_wilt and seb_soil_moisture_fc must "
1573 "satisfy 0 <= wilt < fc <= 1 (volumetric water contents); got wilt = " +
1580 amrex::Abort(
"erf.radiation.seb_soil_moisture_fc must be in (0, 1] with "
1581 "seb_drainage_enable (a volumetric water content); got " +
1588 pp.contains(
"radiation.seb_soil_moisture_wilt")) {
1589 amrex::Abort(
"erf.radiation.seb_soil_moisture_wilt is used only with "
1590 "erf.radiation.seb_surface_layer_uses_moisture = true");
1593 pp.contains(
"radiation.seb_soil_moisture_fc")) {
1594 amrex::Abort(
"erf.radiation.seb_soil_moisture_fc is used only with "
1595 "erf.radiation.seb_surface_layer_uses_moisture = true or "
1596 "erf.radiation.seb_drainage_enable = true");
1599 (
pp.contains(
"radiation.seb_vegetation_fraction") ||
1600 pp.contains(
"radiation.seb_leaf_area_index"))) {
1601 amrex::Abort(
"erf.radiation.seb_vegetation_fraction and seb_leaf_area_index are used "
1602 "only with erf.radiation.seb_vegetation_type");
1607 amrex::Abort(
"erf.radiation.seb_surface_layer_uses_moisture = true needs "
1608 "erf.radiation.seb_surface_layer_uses_skin = true: the surface "
1609 "mixing ratio is the saturation value at the balance's skin "
1617 amrex::ParallelDescriptor::IOProcessor()) {
1618 amrex::Print() <<
"NOTE: erf.radiation.seb_surface_layer_uses_moisture: the soil "
1619 "starts at or below the wilting point (seb_q_sfc_default = "
1623 ?
"no transpiration, and the bare soil's pore air is nearly "
1624 "dry (Noah-MP's relative humidity exp(psi g / (R_v T))), so it "
1625 "hardly evaporates and may take up vapour."
1626 :
"no evaporation at all.")
1627 <<
" Set seb_q_sfc_default (and seb_q_deep_default, which q_s "
1628 "restores to) to the soil's water content if that is not meant.\n";
1634 amrex::ParallelDescriptor::IOProcessor()) {
1635 amrex::Print() <<
"NOTE: erf.radiation.seb_surface_layer_uses_moisture: "
1638 <<
"), and q_s restores toward it over seb_moisture_restore_timescale_s"
1640 " Set seb_q_deep_default to the deep soil's water content if that "
1649 amrex::ParallelDescriptor::IOProcessor()) {
1650 amrex::Print() <<
"WARNING: erf.radiation.seb_grdflx_default = " <<
seb_grdflx_default
1651 <<
" with seb_prognostic_enable: the force-restore term already "
1652 "carries the ground heat flux, so this counts it twice.\n";
1658 auto require_positive = [] (
const char*
name, amrex::Real value) {
1659 if (!(std::isfinite(value) && value > 0.0)) {
1660 amrex::Abort(std::string(
"erf.radiation.") +
name +
" must be > 0; got " +
1661 std::to_string(value));
1680 "erf.radiation.seb_*: the land roughness from Noah-MP's tables is not positive");
1690 const bool given =
pp.contains(
"radiation.seb_surface_heat_capacity");
1692 if (amrex::ParallelDescriptor::IOProcessor()) {
1693 amrex::Print() <<
"NOTE: erf.radiation.seb_surface_heat_capacity = "
1695 << (given ?
" as given; Noah-MP soil category " :
1696 ", from Noah-MP soil category ")
1698 <<
" (heat capacity " << c <<
" J/m^3/K, conductivity " << lambda
1700 << (given ?
" gives " + std::to_string(
derived) : std::string())
1741 amrex::Abort(
"erf.radiation.seb_precipitation_source, seb_deep_prognostic_enable and "
1742 "seb_drainage_enable need erf.radiation.seb_prognostic_enable = true: "
1743 "they act on the force-restore state");
1746 amrex::Abort(
"erf.radiation.seb_drainage_enable needs "
1747 "erf.radiation.seb_deep_prognostic_enable = true: the drainage leaves "
1748 "the bottom of the deep soil column (Mahfouf and Noilhan 1996, Eq. 4)");
1752 amrex::Abort(
"erf.radiation.seb_deep_layer_depth_m is used only with "
1753 "erf.radiation.seb_deep_prognostic_enable = true or "
1754 "erf.radiation.seb_init_soil_moisture_from_file = true");
1760 amrex::Abort(
"erf.radiation.seb_deep_layer_depth_m must be deeper than "
1762 " m): the column contains the surface layer; got " +
1766 amrex::Abort(
"erf.radiation.seb_drainage_c3_m is used only with "
1767 "erf.radiation.seb_drainage_enable = true");
1769 if (
pp.contains(
"radiation.seb_soil_porosity") && !hydrology) {
1770 amrex::Abort(
"erf.radiation.seb_soil_porosity is used only with "
1771 "erf.radiation.seb_precipitation_source = microphysics or "
1772 "erf.radiation.seb_deep_prognostic_enable = true");
1774 if (!hydrology) {
return; }
1777 !
pp.contains(
"radiation.seb_soil_moisture_fc")) {
1778 amrex::Abort(
"erf.radiation.seb_drainage_enable needs a field capacity: give "
1779 "erf.radiation.seb_soil_moisture_fc or erf.radiation.seb_soil_type");
1783 amrex::Abort(
"erf.radiation.seb_drainage_c3_m must be given and > 0 with "
1784 "seb_drainage_enable (Mahfouf and Noilhan 1996, Table 1: 0.098 m for "
1785 "silty clay loam to 1.705 m for sand); got " +
1791 if (
pp.contains(
"radiation.seb_soil_porosity")) {
1792 amrex::Abort(
"erf.radiation.seb_soil_type sets the porosity (Noah-MP's MAXSMC); "
1793 "do not also give erf.radiation.seb_soil_porosity");
1796 }
else if (!
pp.contains(
"radiation.seb_soil_porosity")) {
1797 amrex::Abort(
"erf.radiation.seb_precipitation_source = microphysics and "
1798 "seb_deep_prognostic_enable need a porosity: give "
1799 "erf.radiation.seb_soil_porosity or erf.radiation.seb_soil_type");
1803 amrex::Abort(
"erf.radiation.seb_soil_porosity must be in (0, 1]; got " +
1808 ") must be below erf.radiation.seb_soil_porosity (" +
1813 amrex::Abort(
"erf.radiation.seb_q_sfc_default (" + std::to_string(
seb_q_sfc_default) +
1814 ") and, with seb_deep_prognostic_enable, seb_q_deep_default (" +
1817 "): water above it runs off");
1824 ") must be at or above erf.radiation.seb_soil_porosity (" +
1826 "microphysics: a lower cap would remove rain without counting it as runoff");
1837 for (
const char*
name : {
"seb_snow_initial_swe_kg_m2",
"seb_snow_albedo",
1838 "seb_snow_critical_swe_kg_m2"}) {
1839 if (
pp.contains((std::string(
"radiation.") +
name).c_str())) {
1840 amrex::Abort(std::string(
"erf.radiation.") +
name +
" is used only with "
1841 "erf.radiation.seb_snow_enable = true");
1849 amrex::Abort(
"erf.radiation.seb_vegetation_type cannot be given with "
1850 "erf.radiation.seb_snow_enable = true: the snow layer is for bare ground");
1853 amrex::Abort(
"erf.radiation.seb_snow_enable needs "
1854 "erf.radiation.seb_prognostic_enable = true: the snow acts on the "
1855 "force-restore surface temperature");
1858 amrex::Abort(
"erf.radiation.seb_snow_enable needs "
1859 "erf.radiation.seb_precipitation_source = microphysics: the snowfall "
1860 "comes from the microphysics and the melt water goes to the soil as rain");
1863 amrex::Abort(
"erf.radiation.seb_snow_enable needs "
1864 "erf.radiation.seb_use_radiation_fluxes = true: the snow acts on the "
1865 "balance through the surface albedo of the radiation");
1870 amrex::Abort(
"erf.radiation.surface_albedo_sw_diffuse cannot be given with "
1871 "erf.radiation.seb_snow_enable = true: the snow sets one broadband "
1872 "albedo for the direct and the diffuse beam");
1877 amrex::Abort(
"erf.radiation.seb_prognostic_t_min_k (" +
1879 "with erf.radiation.seb_snow_enable = true: the melting snow holds the "
1880 "surface at 273.16 K");
1883 amrex::Abort(
"erf.radiation.seb_snow_initial_swe_kg_m2 must be finite and >= 0; got " +
1887 amrex::Abort(
"erf.radiation.seb_snow_albedo must be in [0, 1]; got " +
1891 amrex::Abort(
"erf.radiation.seb_snow_critical_swe_kg_m2 must be finite and > 0; got " +
int start
Definition: ERF_ActuatorSpreading.cpp:263
AMREX_ALWAYS_ASSERT_WITH_MESSAGE(axis >=0 &&axis< AMREX_SPACEDIM, "prob.axis must be 0, 1 or 2")
Noah-MP's soil parameters by soil category, for the two-stream surface energy balance (erf....
constexpr amrex::Real noahmp_soil_roughness
Definition: ERF_NoahMPSoilTable.H:42
const NoahMPSoilParams * noahmp_soil_params(int category) noexcept
The parameters of STAS soil category category (1-19), as Noah-MP reads them.
Definition: ERF_NoahMPSoilTable.H:49
constexpr amrex::Real noahmp_soil_heat_capacity
Definition: ERF_NoahMPSoilTable.H:35
Noah-MP's canopy-resistance parameters, roughness length and monthly leaf area index by land-use cate...
amrex::Real noahmp_leaf_area_index(const NoahMPVegetationParams ¶ms, amrex::Real day, amrex::Real days_in_year, bool southern) noexcept
Leaf area index of params on day of year day, interpolated between the monthly values as Noah-MP does...
Definition: ERF_NoahMPVegetationTable.H:98
const NoahMPVegetationParams * noahmp_vegetation_params(int category) noexcept
The parameters of MODIS land-use category category (1-20), as Noah-MP reads them.
Definition: ERF_NoahMPVegetationTable.H:41
bool noahmp_day_of_year(const std::string &datetime, amrex::Real &day, amrex::Real &days_in_year)
The day of the year, as Noah-MP counts it, of a date "YYYY-MM-DD[ HH:MM[:SS]]" (ERF's start_datetime)...
Definition: ERF_NoahMPVegetationTable.H:130
std::string name
Definition: ERF_Plotfile2DCatalog.cpp:139
AMREX_ENUM(TauProfileType, Constant, CloudLayer)
Optical depth profile type for the two-stream solver.
Simplified SEB – the two-stream model's surface energy balance, as pure functions.
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_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
Base class for microphysics interface.
Definition: ERF_Microphysics.H:18
Definition: ERF_SurfaceLayer.H:64
@ None
Definition: ERF_LSM_Types.H:6
@ theta
Definition: ERF_Kessler.H:26
@ rain
Definition: ERF_NOAHMP_Fields.H:138
@ tmp
Definition: ERF_AdvanceWSM6.cpp:116
Definition: ERF_Derive.cpp:263
Definition: ERF_NoahMPSoilTable.H:20
amrex::Real smc_ref
REFSMC reference soil moisture, field capacity [m^3/m^3].
Definition: ERF_NoahMPSoilTable.H:24
amrex::Real smc_wilt
WLTSMC wilting point [m^3/m^3].
Definition: ERF_NoahMPSoilTable.H:27
amrex::Real smc_max
MAXSMC saturated soil moisture (porosity) [m^3/m^3].
Definition: ERF_NoahMPSoilTable.H:23
amrex::Real quartz
QTZ quartz fraction [1].
Definition: ERF_NoahMPSoilTable.H:28
Definition: ERF_NoahMPVegetationTable.H:23
amrex::Real z0
Z0MVT momentum roughness length of the vegetation [m].
Definition: ERF_NoahMPVegetationTable.H:29
Definition: ERF_RadStruct.H:83
amrex::Real fixed_mu
Definition: ERF_RadStruct.H:84
amrex::Real latitude
Definition: ERF_RadStruct.H:85
void read(const std::string &prefix)
Definition: ERF_RadStruct.H:89
amrex::Real longitude
Definition: ERF_RadStruct.H:86
int radiation_interval
Definition: ERF_RadStruct.H:87
Container holding radiation-related choices and parameters.
Definition: ERF_RadStruct.H:142
amrex::Real lw_kabs_dry
Dry-air gray LW mass absorption coefficient [m^2/kg].
Definition: ERF_RadStruct.H:260
bool aerosol_enable
Enable prescribed bulk aerosol/turbidity optical depth. When true, aerosol optical depth is added on ...
Definition: ERF_RadStruct.H:893
TauModel tau_model
Optical depth model: "per_layer" (default, fixed tau per layer) or "mass" (from the layer mass path i...
Definition: ERF_RadStruct.H:227
void check_seb_hydrology(amrex::ParmParse &pp)
Checks of the force-restore hydrology inputs (ERF_ForceRestoreHydrology.H): each stops the run naming...
Definition: ERF_RadStruct.H:1736
amrex::Real sw_kabs_vapor
Mass model, SW: water-vapor gray absorption coefficient [m^2/kg].
Definition: ERF_RadStruct.H:236
amrex::Real seb_drainage_c3_m
Drainage coefficient times column depth, C_3 d_2 m. The step uses C_3 = seb_drainage_c3_m / seb_deep_...
Definition: ERF_RadStruct.H:771
amrex::Real cloud_top_height_m
Cloud layer top height [m]. Only used when tau_profile_type == CloudLayer. Must be >= cloud_base_heig...
Definition: ERF_RadStruct.H:348
static void reset_nonpositive(const char *key, amrex::Real &value, amrex::Real fallback)
Definition: ERF_RadStruct.H:1053
amrex::Real aerosol_tau_surface
Total-column aerosol optical depth at surface [dimensionless]. Used for AerosolProfileType::Exponenti...
Definition: ERF_RadStruct.H:925
int rad_orbital_year
erf.rad_orbital_year and the orbital overrides: negative means the year of the timestamp and the Berg...
Definition: ERF_RadStruct.H:217
amrex::Real seb_deep_layer_depth_m
Depth d_2 [m] of the soil column of seb_deep_prognostic_enable, and the depth over which seb_init_soi...
Definition: ERF_RadStruct.H:754
bool seb_snow_enable
One bulk snow layer on the force-restore surface (ERF_ForceRestoreSnow.H): the snow routine of the IS...
Definition: ERF_RadStruct.H:784
amrex::Real fixed_solar_zenith_angle
erf.fixed_solar_zenith_angle: the COSINE of the solar zenith angle (mu0), as RRTMGP takes it,...
Definition: ERF_RadStruct.H:192
bool sw_enabled
Enable shortwave (solar) radiation computation. Only used by the two-stream model.
Definition: ERF_RadStruct.H:154
amrex::Real cloud_asymmetry_factor
Cloud scattering asymmetry factor in [-1, 1], used instead of asymmetry_factor for levels where the c...
Definition: ERF_RadStruct.H:403
bool seb_init_t_deep_from_file
At a fresh start, the deep (restoring) temperature T_deep of a land column is the deep soil temperatu...
Definition: ERF_RadStruct.H:494
int seb_vegetation_type
Noah-MP land-use category (modified IGBP MODIS, 1-20 except the unvegetated 15, 16 and 17,...
Definition: ERF_RadStruct.H:569
std::string diag_file
Output file path for radiation diagnostics CSV. Paths are relative to the simulation working director...
Definition: ERF_RadStruct.H:278
amrex::Real seb_snow_albedo
Snow albedo alpha_n -. Must be in [0, 1]; given without seb_snow_enable stops at start-up.
Definition: ERF_RadStruct.H:797
static void clamp_high(const char *key, amrex::Real &value, amrex::Real hi)
Definition: ERF_RadStruct.H:1043
amrex::Real tau_lw_per_layer
Longwave optical depth per layer (constant for all layers). Used in gray-gas LW two-stream solver....
Definition: ERF_RadStruct.H:174
amrex::Real surface_albedo_sw
Shortwave surface albedo fallback [0, 1] for per-column heterogeneous-surface-property resolution....
Definition: ERF_RadStruct.H:412
amrex::Real surface_emissivity_lw
Longwave surface emissivity fallback [0, 1] for per-column heterogeneous-surface-property resolution....
Definition: ERF_RadStruct.H:427
amrex::Real rad_orbital_mvelp
Definition: ERF_RadStruct.H:220
bool seb_drainage_enable
Gravitational drainage of the soil column toward field capacity (Mahfouf and Noilhan 1996,...
Definition: ERF_RadStruct.H:763
amrex::Real seb_grdflx_default
Fallback SEB ground heat flux [W/m^2]. The force-restore restoring term already represents the flux i...
Definition: ERF_RadStruct.H:610
amrex::Real diag_dedup_tol
Tolerance for time equality in duplicate guard [s]. Times within this tolerance are considered equal....
Definition: ERF_RadStruct.H:329
amrex::Real seb_restore_timescale_s
Force-restore timescale for surface temperature [s]. Relaxation time constant toward T_deep in progno...
Definition: ERF_RadStruct.H:670
std::string diag_callsite_mode
Call-site filtering mode: "both" (pre+post rows), "pre_only", or "post_only".
Definition: ERF_RadStruct.H:322
bool diag_regtest_line_enable
Enable RADIATION_DIAG: line emission. Controls regtest-parsing diagnostics line. Default true.
Definition: ERF_RadStruct.H:309
amrex::Real sw_kext_cloud
Mass model, SW: cloud-water extinction coefficient m^2/kg.
Definition: ERF_RadStruct.H:239
amrex::Real tau_sw_coeff_qv
Shortwave optical depth coefficient for water vapor [dimensionless]. Dynamic SW tau = tau_sw_coeff_qv...
Definition: ERF_RadStruct.H:829
amrex::Real fixed_total_solar_irradiance
erf.fixed_total_solar_irradiance: top-of-atmosphere irradiance [W/m^2] when >= 0. Otherwise (default)...
Definition: ERF_RadStruct.H:199
bool tau_lw_dynamic_enable
Enable dynamic longwave optical depth diagnosis from moisture/clouds. When true, LW optical depth is ...
Definition: ERF_RadStruct.H:820
amrex::Real seb_lh_default
Fallback SEB latent heat flux [W/m^2].
Definition: ERF_RadStruct.H:603
void init_params(bool two_stream_selected, std::string pp_prefix)
Definition: ERF_RadStruct.H:1064
amrex::Real seb_moisture_restore_timescale_s
Force-restore timescale for surface moisture [s]. Relaxation time constant toward q_deep in prognosti...
Definition: ERF_RadStruct.H:686
amrex::Real seb_lw_flux_default
Fallback SEB surface net longwave flux [W/m^2].
Definition: ERF_RadStruct.H:453
amrex::Real tau_sw_coeff_qc
Shortwave optical depth coefficient for cloud liquid water [dimensionless]. Default 0....
Definition: ERF_RadStruct.H:837
amrex::Real aerosol_tau_per_layer
Constant aerosol optical depth per layer [dimensionless]. Used for AerosolProfileType::Constant profi...
Definition: ERF_RadStruct.H:909
bool seb_surface_layer_uses_skin
Two-way coupling with the zlo surface layer: the surface layer takes its land surface temperature fro...
Definition: ERF_RadStruct.H:469
amrex::Real seb_q_sfc_default
Fallback SEB surface moisture, and the initial value of the prognostic one. With seb_prognostic_enabl...
Definition: ERF_RadStruct.H:618
amrex::Real rad_orbital_eccentricity
Definition: ERF_RadStruct.H:218
amrex::Real single_scattering_albedo
Clear-sky (background gas) single-scattering albedo in [0, 1] for the SW diffuse (scattering) two-str...
Definition: ERF_RadStruct.H:374
bool diag_csv_enable
Enable CSV file append behavior. When false, no file writes; other enabled streams may still print....
Definition: ERF_RadStruct.H:316
bool tau_sw_dynamic_enable
Definition: ERF_RadStruct.H:821
bool uses_two_stream_radiation() const noexcept
Check if two-stream radiation is active.
Definition: ERF_RadStruct.H:1901
amrex::Real seb_t_deep_default
SEB deep soil temperature [K] of every column; with seb_init_t_deep_from_file, of the water columns a...
Definition: ERF_RadStruct.H:624
AerosolProfileType aerosol_profile_type
Aerosol optical depth profile type: Constant, Exponential, or Table.
Definition: ERF_RadStruct.H:902
amrex::Real seb_soil_porosity
Porosity w_sat [m^3/m^3] of the force-restore soil: above it, water runs off. Needed with seb_precipi...
Definition: ERF_RadStruct.H:737
amrex::Real seb_prognostic_t_max_k
Maximum clamping bound for prognostic surface temperature [K]. After each Euler update,...
Definition: ERF_RadStruct.H:703
amrex::Real rad_t_sfc
erf.rad_t_sfc: surface temperature [K] used as the longwave boundary condition wherever no land-surfa...
Definition: ERF_RadStruct.H:207
bool seb_prognostic_enable
Enable prognostic SEB surface temperature and moisture evolution. When true, integrates SEB residual ...
Definition: ERF_RadStruct.H:649
SEBPrecipitationSource seb_precipitation_source
Rain into the force-restore surface (ERF_ForceRestoreHydrology.H). Default none: the balance as befor...
Definition: ERF_RadStruct.H:727
bool seb_use_radiation_fluxes
Take the SEB's net surface shortwave and longwave fluxes from the two-stream sweep itself (per column...
Definition: ERF_RadStruct.H:443
amrex::Real seb_prognostic_t_min_k
Minimum clamping bound for prognostic surface temperature [K]. After each Euler update,...
Definition: ERF_RadStruct.H:695
amrex::Real tau_lw_coeff_qc
Longwave optical depth coefficient for cloud liquid water [dimensionless]. Default 0....
Definition: ERF_RadStruct.H:853
amrex::Real rad_orbital_obliquity
Definition: ERF_RadStruct.H:219
amrex::Real cloud_fraction
Cloud fraction in [0, 1] used to blend clear-sky and cloudy-column fluxes: F = (1 - cloud_fraction) *...
Definition: ERF_RadStruct.H:364
amrex::Real cloud_single_scattering_albedo
Cloud single-scattering albedo in [0, 1], used instead of single_scattering_albedo for levels where t...
Definition: ERF_RadStruct.H:394
amrex::Real lw_kabs_cloud
Cloud-water LW mass absorption coefficient m^2/kg.
Definition: ERF_RadStruct.H:266
amrex::Real sw_cloud_omega
Mass model, SW: cloud-water single-scattering albedo.
Definition: ERF_RadStruct.H:242
amrex::Real sw_kscat_dry
Mass model, SW: dry-air (Rayleigh) scattering coefficient [m^2/kg], omega = 1, g = 0.
Definition: ERF_RadStruct.H:233
bool seb_init_soil_moisture_from_file
At a fresh start, the soil water of a land column is the soil moisture profile of the wrfinput file (...
Definition: ERF_RadStruct.H:511
amrex::Real sw_kabs_dry
Mass model, SW: dry-air gray absorption coefficient [m^2/kg].
Definition: ERF_RadStruct.H:230
bool seb_init_skin_from_file
At a fresh start, the skin temperature T_s of a land column begins at the skin temperature of the ini...
Definition: ERF_RadStruct.H:480
amrex::Real seb_soil_moisture_wilt
Wilting point [m^3/m^3]: at or below it the soil-water factor is 0, so the vegetation does not transp...
Definition: ERF_RadStruct.H:537
amrex::Real seb_leaf_area_index
Leaf area index [m^2/m^2] of the vegetated fraction (seb_vegetation_type; giving it otherwise stops a...
Definition: ERF_RadStruct.H:584
amrex::Real asymmetry_factor
Clear-sky (background gas) scattering asymmetry factor in [-1, 1] (0 = isotropic scattering,...
Definition: ERF_RadStruct.H:382
static void clamp_low(const char *key, amrex::Real &value, amrex::Real lo)
Read radiation options from the input parameter database.
Definition: ERF_RadStruct.H:1033
bool seb_surface_layer_uses_moisture
Two-way coupling of moisture as well: the surface layer takes its land surface mixing ratio from the ...
Definition: ERF_RadStruct.H:528
amrex::Real cloud_fraction_qc_scale
Cloud water [kg/kg] at which the liquid-water term alone gives a cloud fraction of 1: cf += min(1,...
Definition: ERF_RadStruct.H:885
bool cloud_fraction_prog_enable
Enable prognostic cloud fraction diagnosis from RH/qc. When true, cloud fraction is computed per-leve...
Definition: ERF_RadStruct.H:861
amrex::Real seb_prognostic_q_max
Maximum clamping bound for prognostic surface moisture [kg/kg]. After each Euler update,...
Definition: ERF_RadStruct.H:719
bool lw_enabled
Enable longwave (thermal) radiation computation. Only used by the two-stream model.
Definition: ERF_RadStruct.H:160
int seb_soil_type
Noah-MP soil category (STAS, 1-19, not 14 (water), as in NoahmpTable.TBL; see ERF_NoahMPSoilTable....
Definition: ERF_RadStruct.H:557
void check_seb_snow(amrex::ParmParse &pp)
Checks of the force-restore snow inputs (ERF_ForceRestoreSnow.H): each stops the run naming the input...
Definition: ERF_RadStruct.H:1834
amrex::Real seb_soil_moisture_fc
Field capacity [m^3/m^3]: at or above it the soil-water factor is 1, so without seb_soil_type the sur...
Definition: ERF_RadStruct.H:545
amrex::Real seb_snow_initial_swe_kg_m2
Snow water equivalent at the start of the run [kg/m^2], every column, every level....
Definition: ERF_RadStruct.H:791
amrex::Real surface_albedo_sw_diffuse
Shortwave surface albedo for diffuse light [0,1]. A negative value (default) uses surface_albedo_sw f...
Definition: ERF_RadStruct.H:418
amrex::Real cloud_base_height_m
Cloud layer base height [m]. Only used when tau_profile_type == CloudLayer.
Definition: ERF_RadStruct.H:342
amrex::Real seb_snow_critical_swe_kg_m2
Critical snow water equivalent W_crn [kg/m^2] of the snow cover fraction p_ng = W_n / (W_n + W_crn) (...
Definition: ERF_RadStruct.H:804
amrex::Real lw_kabs_vapor
Water-vapor gray LW mass absorption coefficient [m^2/kg].
Definition: ERF_RadStruct.H:263
amrex::Real tau_per_layer
Shortwave optical depth per layer (constant for all layers). Used in Beer-Lambert direct-beam formula...
Definition: ERF_RadStruct.H:167
bool seb_hydrology_enabled() const noexcept
True when any of the force-restore hydrology inputs is on.
Definition: ERF_RadStruct.H:807
amrex::Real seb_moisture_layer_depth_m
Effective surface moisture layer depth [m]. Used in force-restore prognostic q_s equation: dq_s/dt = ...
Definition: ERF_RadStruct.H:678
amrex::Real seb_vegetation_fraction
Vegetated fraction of the surface [0, 1] (seb_vegetation_type; giving it otherwise stops at start-up)...
Definition: ERF_RadStruct.H:575
SEBTurbulentFluxSource seb_turbulent_flux_source
Source of the SEB's sensible and latent heat fluxes when no land-surface model supplies them: "surfac...
Definition: ERF_RadStruct.H:460
amrex::Real tau_lw_coeff_qv
Longwave optical depth coefficient for water vapor [dimensionless]. Dynamic LW tau = tau_lw_coeff_qv ...
Definition: ERF_RadStruct.H:845
amrex::Real seb_hfx_default
Fallback SEB sensible heat flux [W/m^2].
Definition: ERF_RadStruct.H:598
amrex::Real cloud_fraction_rh_max
Maximum relative humidity threshold for cloud fraction diagnosis [0, 1]. Must be >= cloud_fraction_rh...
Definition: ERF_RadStruct.H:877
amrex::Real sw_cloud_g
Mass model, SW: cloud-water asymmetry factor.
Definition: ERF_RadStruct.H:245
amrex::Real rad_cons_lon
Definition: ERF_RadStruct.H:211
bool lw_mass_absorption_enable
Gray longwave optical depth from the layer mass path instead of the fixed tau_lw_per_layer (also sele...
Definition: ERF_RadStruct.H:257
amrex::Real cloud_tau_per_layer
Additional optical depth per layer contributed by the cloud, added on top of the clear-sky tau_per_la...
Definition: ERF_RadStruct.H:356
amrex::Real aerosol_scale_height_m
Scale height for exponential aerosol profile [m]. Controls decay rate: tau_aerosol(k) = aerosol_tau_s...
Definition: ERF_RadStruct.H:917
amrex::Real seb_land_roughness
Land roughness length [m] the coupled surface layer takes when erf.most.z0 is not given (derived,...
Definition: ERF_RadStruct.H:593
bool diag_tagged_enable
Enable tagged [RAD][...] debug lines. Controls emission of bracketed-tag debug output....
Definition: ERF_RadStruct.H:302
amrex::Real seb_q_deep_default
Deep soil moisture the prognostic q_s restores to, in q_s's units (see seb_q_sfc_default).
Definition: ERF_RadStruct.H:630
amrex::Real rad_cons_lat
erf.rad_cons_lat / erf.rad_cons_lon: site latitude and longitude [degrees] when the grid has no lat/l...
Definition: ERF_RadStruct.H:210
amrex::Real seb_sw_flux_default
Fallback SEB surface net shortwave flux [W/m^2].
Definition: ERF_RadStruct.H:448
bool seb_deep_prognostic_enable
Make seb_q_deep and seb_t_deep prognostic (ERF_ForceRestoreHydrology.H): q_deep becomes the mean wate...
Definition: ERF_RadStruct.H:746
bool diag_enable
Master switch for radiation diagnostics emission. When false, no diagnostics output (stdout/tagged/re...
Definition: ERF_RadStruct.H:288
amrex::Real seb_prognostic_q_min
Minimum clamping bound for prognostic surface moisture [kg/kg]. After each Euler update,...
Definition: ERF_RadStruct.H:711
amrex::Real cloud_fraction_rh_min
Minimum relative humidity threshold for cloud fraction diagnosis [0, 1]. Cloud fraction ramps from 0 ...
Definition: ERF_RadStruct.H:869
bool seb_enable
Master switch for simplified SEB infrastructure. When false (default), no SEB MultiFabs are allocated...
Definition: ERF_RadStruct.H:433
bool diag_stdout_enable
Enable human-readable stdout diagnostics block. Controls tagged [RAD][...] debug line emission (when ...
Definition: ERF_RadStruct.H:295
bool enabled
True when erf.radiation_model = TwoStream. Set by init_params from the model SolverChoice read; the e...
Definition: ERF_RadStruct.H:148
int verbosity
Debug verbosity level (0=off, 1+=debug output). Gated debug prints only emit when this is >= 1.
Definition: ERF_RadStruct.H:272
amrex::Real seb_surface_heat_capacity
Effective surface heat capacity [J/(m^2*K)]. Used in force-restore prognostic T_s equation: dT_s/dt =...
Definition: ERF_RadStruct.H:660
TauProfileType tau_profile_type
Optical depth profile type: "constant" (default, the thickness-independent tau) or "cloud_layer" (add...
Definition: ERF_RadStruct.H:336
bool seb_diagnostic_enable
Enable diagnostic SEB residual computation and reporting. When true, computes and reports SEB residua...
Definition: ERF_RadStruct.H:640
Definition: ERF_RadStruct.H:113
void read(const std::string &prefix, const RRTMGPSolarChoice &solar)
Definition: ERF_TopographicShading.cpp:40
amrex::Real shadlen
Definition: ERF_RadStruct.H:116
bool active() const
Definition: ERF_RadStruct.H:123
amrex::Real longitude
Definition: ERF_RadStruct.H:120
amrex::Real fixed_mu
Definition: ERF_RadStruct.H:117
bool slope_rad
Definition: ERF_RadStruct.H:114
int radiation_interval
Definition: ERF_RadStruct.H:121
amrex::Real latitude
Definition: ERF_RadStruct.H:119
amrex::Real fixed_azimuth
Definition: ERF_RadStruct.H:118
bool topo_shading
Definition: ERF_RadStruct.H:115