ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
RadChoice Struct Reference

Container holding radiation-related choices and parameters. More...

#include <ERF_RadStruct.H>

Collaboration diagram for RadChoice:

Public Member Functions

bool seb_hydrology_enabled () const noexcept
 True when any of the force-restore hydrology inputs is on. More...
 
void init_params (bool two_stream_selected, std::string pp_prefix)
 
void check_seb_hydrology (amrex::ParmParse &pp)
 Checks of the force-restore hydrology inputs (ERF_ForceRestoreHydrology.H): each stops the run naming the input, never clamps. Called at the end of init_params, after the soil type has set the field capacity. More...
 
void check_seb_snow (amrex::ParmParse &pp)
 Checks of the force-restore snow inputs (ERF_ForceRestoreSnow.H): each stops the run naming the input, never clamps. Called after check_seb_hydrology. More...
 
bool uses_two_stream_radiation () const noexcept
 Check if two-stream radiation is active. More...
 

Static Public Member Functions

static void clamp_low (const char *key, amrex::Real &value, amrex::Real lo)
 Read radiation options from the input parameter database. More...
 
static void clamp_high (const char *key, amrex::Real &value, amrex::Real hi)
 
static void reset_nonpositive (const char *key, amrex::Real &value, amrex::Real fallback)
 

Public Attributes

bool enabled = false
 True when erf.radiation_model = TwoStream. Set by init_params from the model SolverChoice read; the erf.radiation.* sub-options are read only then. More...
 
bool sw_enabled = true
 Enable shortwave (solar) radiation computation. Only used by the two-stream model. More...
 
bool lw_enabled = true
 Enable longwave (thermal) radiation computation. Only used by the two-stream model. More...
 
amrex::Real tau_per_layer = 0.05
 Shortwave optical depth per layer (constant for all layers). Used in Beer-Lambert direct-beam formula. Only used by the two-stream model. More...
 
amrex::Real tau_lw_per_layer = 1.0
 Longwave optical depth per layer (constant for all layers). Used in gray-gas LW two-stream solver. Only used by the two-stream model. More...
 
TauModel tau_model = TauModel::PerLayer
 Optical depth model: "per_layer" (default, fixed tau per layer) or "mass" (from the layer mass path in both bands; see TauModel). More...
 
amrex::Real sw_kabs_dry = 4.0e-6
 Mass model, SW: dry-air gray absorption coefficient [m^2/kg]. More...
 
amrex::Real sw_kscat_dry = 3.0e-6
 Mass model, SW: dry-air (Rayleigh) scattering coefficient [m^2/kg], omega = 1, g = 0. More...
 
amrex::Real sw_kabs_vapor = 4.0e-3
 Mass model, SW: water-vapor gray absorption coefficient [m^2/kg]. More...
 
amrex::Real sw_kext_cloud = 150.0
 Mass model, SW: cloud-water extinction coefficient m^2/kg. More...
 
amrex::Real sw_cloud_omega = 0.9999
 Mass model, SW: cloud-water single-scattering albedo. More...
 
amrex::Real sw_cloud_g = 0.85
 Mass model, SW: cloud-water asymmetry factor. More...
 
bool lw_mass_absorption_enable = false
 Gray longwave optical depth from the layer mass path instead of the fixed tau_lw_per_layer (also selected by tau_model = mass): tau_lw(k) = rho dz (lw_kabs_dry + lw_kabs_vapor qv + lw_kabs_cloud qc) The cloud term is the Stephens (1978) emissivity, eps = 1 - exp(-a LWP) with a = 0.158 m^2/g, written as an optical depth. The column optical depth is then independent of the vertical resolution. The cloud-band, moisture-coefficient and aerosol additions still apply on top. Default false keeps tau_lw_per_layer. More...
 
amrex::Real lw_kabs_dry = 1.0e-4
 Dry-air gray LW mass absorption coefficient [m^2/kg]. More...
 
amrex::Real lw_kabs_vapor = 0.1
 Water-vapor gray LW mass absorption coefficient [m^2/kg]. More...
 
amrex::Real lw_kabs_cloud = 158.0
 Cloud-water LW mass absorption coefficient m^2/kg. More...
 
int verbosity = 0
 Debug verbosity level (0=off, 1+=debug output). Gated debug prints only emit when this is >= 1. More...
 
std::string diag_file = "radiation_diag.dat"
 Output file path for radiation diagnostics CSV. Paths are relative to the simulation working directory. More...
 
bool diag_enable = false
 Master switch for radiation diagnostics emission. When false, no diagnostics output (stdout/tagged/regtest/csv). Default false: a run that did not ask for the diagnostics should not write a CSV row and a stdout block on every step. The per-stream switches below stay on by default, so setting this one input to true turns the whole set on. More...
 
bool diag_stdout_enable = true
 Enable human-readable stdout diagnostics block. Controls tagged [RAD][...] debug line emission (when verbosity >= 1). Default true. More...
 
bool diag_tagged_enable = true
 Enable tagged [RAD][...] debug lines. Controls emission of bracketed-tag debug output. Default true. More...
 
bool diag_regtest_line_enable = true
 Enable RADIATION_DIAG: line emission. Controls regtest-parsing diagnostics line. Default true. More...
 
bool diag_csv_enable = true
 Enable CSV file append behavior. When false, no file writes; other enabled streams may still print. Default true. More...
 
std::string diag_callsite_mode = "both"
 Call-site filtering mode: "both" (pre+post rows), "pre_only", or "post_only". More...
 
amrex::Real diag_dedup_tol = 1.0e-12
 Tolerance for time equality in duplicate guard [s]. Times within this tolerance are considered equal. Default 1e-12. More...
 
TauProfileType tau_profile_type = TauProfileType::Constant
 Optical depth profile type: "constant" (default, the thickness-independent tau) or "cloud_layer" (adds height-varying cloud optical depth between cloud_base_height_m and cloud_top_height_m). More...
 
amrex::Real cloud_base_height_m = 500.0
 Cloud layer base height [m]. Only used when tau_profile_type == CloudLayer. More...
 
amrex::Real cloud_top_height_m = 1000.0
 Cloud layer top height [m]. Only used when tau_profile_type == CloudLayer. Must be >= cloud_base_height_m. More...
 
amrex::Real cloud_tau_per_layer = 0.5
 Additional optical depth per layer contributed by the cloud, added on top of the clear-sky tau_per_layer/tau_lw_per_layer background within [cloud_base_height_m, cloud_top_height_m]. Only used when tau_profile_type == CloudLayer. More...
 
amrex::Real cloud_fraction = 0.0
 Cloud fraction in [0, 1] used to blend clear-sky and cloudy-column fluxes: F = (1 - cloud_fraction) * F_clear + cloud_fraction * F_cloudy. Default 0.0 (fully clear sky), which reduces exactly to the clear-sky column regardless of tau_profile_type. More...
 
amrex::Real single_scattering_albedo = 0.0
 Clear-sky (background gas) single-scattering albedo in [0, 1] for the SW diffuse (scattering) two-stream calculation. Default 0.0 means the clear-sky column is purely absorbing, and the diffuse SW contribution from the clear-sky column is exactly zero — reducing exactly to the direct-beam-only result. Only used by the two-stream model and sw_enabled == true. More...
 
amrex::Real asymmetry_factor = 0.0
 Clear-sky (background gas) scattering asymmetry factor in [-1, 1] (0 = isotropic scattering, close to 1 = strongly forward-scattering). Only meaningful when single_scattering_albedo

0. Default 0.0.

More...
 
amrex::Real cloud_single_scattering_albedo = 0.0
 Cloud single-scattering albedo in [0, 1], used instead of single_scattering_albedo for levels where the cloud-layer optical depth enhancement applies (i.e., within [cloud_base_height_m, cloud_top_height_m] on the "cloudy" column evaluation). Default 0.0 leaves the cloud band non-scattering for SW_Cloud_Layer unless explicitly configured otherwise. Typical liquid water cloud values are close to 1 (e.g., 0.9999). Only used when tau_profile_type == CloudLayer. More...
 
amrex::Real cloud_asymmetry_factor = 0.0
 Cloud scattering asymmetry factor in [-1, 1], used instead of asymmetry_factor for levels where the cloud-layer optical depth enhancement applies. Default 0.0. Typical liquid water cloud droplet values are around 0.85 (strongly forward-scattering). Only meaningful when cloud_single_scattering_albedo > 0. More...
 
amrex::Real surface_albedo_sw = 0.3
 Shortwave surface albedo fallback [0, 1] for per-column heterogeneous-surface-property resolution. Used when per-column LSM/radiation interface albedo field is unavailable or invalid. Default 0.3 represents typical land/water reflectivity. Only used when hetero surface fields not present or disabled. More...
 
amrex::Real surface_albedo_sw_diffuse = -1.0
 Shortwave surface albedo for diffuse light [0,1]. A negative value (default) uses surface_albedo_sw for both direct and diffuse light. More...
 
amrex::Real surface_emissivity_lw = 0.99
 Longwave surface emissivity fallback [0, 1] for per-column heterogeneous-surface-property resolution. Used when per-column LSM/radiation interface emissivity field is unavailable or invalid. Default 0.99 represents typical land/water/ice emissivity (nearly blackbody). Only used when hetero surface fields not present or disabled. More...
 
bool seb_enable = false
 Master switch for simplified SEB infrastructure. When false (default), no SEB MultiFabs are allocated and behavior is unchanged. More...
 
bool seb_use_radiation_fluxes = false
 Take the SEB's net surface shortwave and longwave fluxes from the two-stream sweep itself (per column, absorbed fluxes positive) wherever the LSM does not expose them. When false (default) those fluxes are the LSM fields or, without an LSM, the seb_sw_flux_default and seb_lw_flux_default constants. Sensible, latent and ground heat fluxes are unaffected. More...
 
amrex::Real seb_sw_flux_default = 0.0
 Fallback SEB surface net shortwave flux [W/m^2]. More...
 
amrex::Real seb_lw_flux_default = 0.0
 Fallback SEB surface net longwave flux [W/m^2]. More...
 
SEBTurbulentFluxSource seb_turbulent_flux_source = SEBTurbulentFluxSource::SurfaceLayer
 Source of the SEB's sensible and latent heat fluxes when no land-surface model supplies them: "surface_layer" (default) or "defaults". See SEBTurbulentFluxSource. More...
 
bool seb_surface_layer_uses_skin = false
 Two-way coupling with the zlo surface layer: the surface layer takes its land surface temperature from the SEB's prognostic skin temperature T_s (converted to potential temperature), so its sensible heat flux responds to T_s. Requires seb_prognostic_enable and seb_turbulent_flux_source = surface_layer. Default false: the surface layer keeps its own temperature. More...
 
bool seb_init_skin_from_file = false
 At a fresh start, the skin temperature T_s of a land column begins at the skin temperature of the initial file (TSK of a wrfinput file, SKINTEMP of a metgrid file) in place of rad_t_sfc. A water column keeps rad_t_sfc. Requires seb_prognostic_enable (without it T_s is reset to rad_t_sfc at every radiation step) and an initial file with the field; a land value that is not finite or lies outside [seb_prognostic_t_min_k, seb_prognostic_t_max_k] stops the run. Not used on a restart: the checkpoint holds T_s. Default false: every column begins at rad_t_sfc. More...
 
bool seb_init_t_deep_from_file = false
 At a fresh start, the deep (restoring) temperature T_deep of a land column is the deep soil temperature of the wrfinput file (TMN) in place of seb_t_deep_default. A water column keeps seb_t_deep_default. T_deep is then part of the state of the balance: it is not reset to seb_t_deep_default, it follows the grids through a regrid and it is written to the checkpoint and read back. Without seb_deep_prognostic_enable a column holds its value for the run; with it the file's value is the first value of the evolving T_deep. Requires seb_prognostic_enable and a wrfinput file with TMN; a land value that is not finite or lies outside [seb_prognostic_t_min_k, seb_prognostic_t_max_k] stops the run. Default false: T_deep is seb_t_deep_default in every column. More...
 
bool seb_init_soil_moisture_from_file = false
 At a fresh start, the soil water of a land column is the soil moisture profile of the wrfinput file (SMOIS, with the layer thicknesses DZS) in place of seb_q_sfc_default and seb_q_deep_default: q_s is the thickness-weighted mean over the top seb_moisture_layer_depth_m, q_deep the mean over the top seb_deep_layer_depth_m (ERF_SEBSoilInit.H). A water column keeps the defaults. q_deep is then part of the state of the balance: it is not reset to seb_q_deep_default, it follows the grids through a regrid and it is written to the checkpoint and read back. Without seb_deep_prognostic_enable a column holds its q_deep for the run; with it the file's value is the first value of the reservoir. Requires seb_prognostic_enable and a wrfinput file with SMOIS and DZS whose layers reach seb_deep_layer_depth_m; a land mean that is not finite, lies outside [seb_prognostic_q_min, seb_prognostic_q_max] or, with a porosity, above it stops the run. Default false: q_s and q_deep begin at the defaults in every column. More...
 
bool seb_surface_layer_uses_moisture = false
 Two-way coupling of moisture as well: the surface layer takes its land surface mixing ratio from the balance's surface water, so its moisture flux follows the soil and dries as the balance's q_s does. Without seb_soil_type it is beta * q_sat(T_s, p_s) + (1 - beta) * q_air with beta the soil-water factor clamp((q_s - seb_soil_moisture_wilt) / (seb_soil_moisture_fc - seb_soil_moisture_wilt), 0, 1). With seb_soil_type, the bare soil evaporates from its pore air (Noah-MP's relative humidity exp(psi g / (R_v T_s)) times q_sat) through Noah-MP's bare-soil resistance, and with seb_vegetation_type the canopy transpires through its own, each in series with the aerodynamic one (erf_surface_moisture::two_source_surface_mixing_ratio). q_s is then the volumetric water content [m^3/m^3] of the top seb_moisture_layer_depth_m of soil. Requires seb_surface_layer_uses_skin. Default false: the surface layer keeps its own surface moisture (erf.most.surf_moist). More...
 
amrex::Real seb_soil_moisture_wilt = 0.066
 Wilting point [m^3/m^3]: at or below it the soil-water factor is 0, so the vegetation does not transpire and, without seb_soil_type, the surface does not evaporate (with one, the bare soil's nearly dry pore air keeps it near zero) (seb_surface_layer_uses_moisture; giving it otherwise stops at start-up). Default 0.066, Noah-MP's loam (WLTSMC, STAS soil type 6). More...
 
amrex::Real seb_soil_moisture_fc = 0.329
 Field capacity [m^3/m^3]: at or above it the soil-water factor is 1, so without seb_soil_type the surface evaporates at the potential rate (seb_surface_layer_uses_moisture; giving it otherwise stops at start-up). Default 0.329, Noah-MP's loam (REFSMC, STAS soil type 6). More...
 
int seb_soil_type = 0
 Noah-MP soil category (STAS, 1-19, not 14 (water), as in NoahmpTable.TBL; see ERF_NoahMPSoilTable.H). The balance takes its wilting point (WLTSMC) and field capacity (REFSMC) – giving either seb_soil_moisture_wilt or seb_soil_moisture_fc as well is an error –, the surface heat capacity of the soil unless seb_surface_heat_capacity is given, with seb_surface_layer_uses_moisture the bare-soil resistance (vegetation or not), and with seb_surface_layer_uses_skin the surface layer's land roughness unless erf.most.z0 is given. 0 (the default): none of these. More...
 
int seb_vegetation_type = 0
 Noah-MP land-use category (modified IGBP MODIS, 1-20 except the unvegetated 15, 16 and 17, as in NoahmpTable.TBL; see ERF_NoahMPVegetationTable.H) of the vegetated fraction. With it, the surface's moisture availability comes from a canopy resistance (Jarvis, Noah-MP's parameters RS, RGL, HS, TOPT, RSMAX) for the vegetated fraction and a bare-soil resistance (Noah-MP's Sakaguchi-Zeng form, on seb_soil_type) for the rest, each in series with the aerodynamic one. Needs seb_surface_layer_uses_moisture and seb_soil_type. 0 (the default): bare soil, the soil's resistance alone (f_veg = 0). More...
 
amrex::Real seb_vegetation_fraction = 1.0
 Vegetated fraction of the surface [0, 1] (seb_vegetation_type; giving it otherwise stops at start-up). Default 1. More...
 
amrex::Real seb_leaf_area_index = -1.0
 Leaf area index [m^2/m^2] of the vegetated fraction (seb_vegetation_type; giving it otherwise stops at start-up). Default: the land-use category's monthly values interpolated to the run's start date and time (start_datetime), as Noah-MP does with its table LAI (noahmp_day_of_year: day 0 at 00:00 on 1 January), shifted half a year when erf.rad_cons_lat < 0 (one latitude for the domain, where Noah-MP uses each column's); fixed for the run. More...
 
amrex::Real seb_land_roughness = -1.0
 Land roughness length [m] the coupled surface layer takes when erf.most.z0 is not given (derived, not an input): with seb_surface_layer_uses_skin and seb_soil_type, f_veg Z0MVT + (1 - f_veg) Z0SOIL from Noah-MP's tables (f_veg = 0 without seb_vegetation_type); -1 otherwise. ERF::InitData_post hands it to the zlo surface layer as it builds it (SurfaceLayer::set_default_roughness). More...
 
amrex::Real seb_hfx_default = 0.0
 Fallback SEB sensible heat flux [W/m^2]. More...
 
amrex::Real seb_lh_default = 0.0
 Fallback SEB latent heat flux [W/m^2]. More...
 
amrex::Real seb_grdflx_default = 0.0
 Fallback SEB ground heat flux [W/m^2]. The force-restore restoring term already represents the flux into the soil, so a nonzero value with seb_prognostic_enable counts that flux twice. More...
 
amrex::Real seb_q_sfc_default = 0.0
 Fallback SEB surface moisture, and the initial value of the prognostic one. With seb_prognostic_enable q_s follows prognostic_dqs_dt, a volumetric water content [m^3/m^3] of the top seb_moisture_layer_depth_m of soil; with a land model that has one, the balance shows the land model's 2 m mixing ratio [kg/kg] instead. More...
 
amrex::Real seb_t_deep_default = 300.0
 SEB deep soil temperature [K] of every column; with seb_init_t_deep_from_file, of the water columns and of a restart from a checkpoint without the deep temperature. More...
 
amrex::Real seb_q_deep_default = 0.0
 Deep soil moisture the prognostic q_s restores to, in q_s's units (see seb_q_sfc_default). More...
 
bool seb_diagnostic_enable = false
 Enable diagnostic SEB residual computation and reporting. When true, computes and reports SEB residual = (SW_net + LW_net) - H - LE - G. When false (default), no residual computation or new diagnostic output. Requires seb_enable=true to be meaningful; if false but seb_enable=true, auto-enables internally. Note: this is diagnostic-only; it makes no prognostic T_s or flux update. Set seb_prognostic_enable for that. More...
 
bool seb_prognostic_enable = false
 Enable prognostic SEB surface temperature and moisture evolution. When true, integrates SEB residual forward in time to evolve T_s and q_s using force-restore formulation. When false (default), no prognostic update occurs. Requires seb_enable=true and seb_diagnostic_enable=true; auto-enables internally if needed. Only active when Noah-MP is NOT driving LSM fields at that level. More...
 
amrex::Real seb_surface_heat_capacity = 2.0e4
 Effective surface heat capacity [J/(m^2*K)]. Used in force-restore prognostic T_s equation: dT_s/dt = SEB_residual / C_s - (2*pi/tau)*(T_s - T_deep). Default 2.0e4 J/(m^2*K) represents a thin surface-active layer. With seb_soil_type it is derived from Noah-MP's soil instead (seb_force_restore_heat_capacity of the soil's heat capacity and conductivity at seb_q_sfc_default, over seb_restore_timescale_s) unless it is given explicitly. Only used when seb_prognostic_enable=true. Must be > 0: init_params() stops otherwise. More...
 
amrex::Real seb_restore_timescale_s = 86400.0
 Force-restore timescale for surface temperature [s]. Relaxation time constant toward T_deep in prognostic T_s equation. Default 86400.0 s (1 day) provides weak damping on diurnal timescales. Only used when seb_prognostic_enable=true. Must be > 0: init_params() stops otherwise. With seb_deep_prognostic_enable it is also the relaxation time of T_deep toward T_s (Noilhan and Planton 1989, Eq. 6). The drainage does not use it (seb_drainage_enable). More...
 
amrex::Real seb_moisture_layer_depth_m = 0.1
 Effective surface moisture layer depth [m]. Used in force-restore prognostic q_s equation: dq_s/dt = -(LE/(L_v*rho_w*d_s)) - (1/tau_q)*(q_s - q_deep). Default 0.1 m represents a thin surface-active moisture layer. Only used when seb_prognostic_enable=true. Must be > 0: init_params() stops otherwise. More...
 
amrex::Real seb_moisture_restore_timescale_s = 86400.0
 Force-restore timescale for surface moisture [s]. Relaxation time constant toward q_deep in prognostic q_s equation. Default 86400.0 s (1 day) provides weak damping on diurnal timescales. Only used when seb_prognostic_enable=true. Must be > 0: init_params() stops otherwise. More...
 
amrex::Real seb_prognostic_t_min_k = 200.0
 Minimum clamping bound for prognostic surface temperature [K]. After each Euler update, T_s is clamped to [seb_prognostic_t_min_k, seb_prognostic_t_max_k] to prevent instability if dt is large relative to C_s/tau. Default 200.0 K (far below realistic surface temperatures). Only used when seb_prognostic_enable=true. More...
 
amrex::Real seb_prognostic_t_max_k = 340.0
 Maximum clamping bound for prognostic surface temperature [K]. After each Euler update, T_s is clamped to [seb_prognostic_t_min_k, seb_prognostic_t_max_k]. Default 340.0 K (above typical surface temperatures, but prevents unrealistic excursions). Only used when seb_prognostic_enable=true. More...
 
amrex::Real seb_prognostic_q_min = 0.0
 Minimum clamping bound for prognostic surface moisture [kg/kg]. After each Euler update, q_s is clamped to [seb_prognostic_q_min, seb_prognostic_q_max]. Default 0.0 kg/kg prevents negative moisture. Only used when seb_prognostic_enable=true. More...
 
amrex::Real seb_prognostic_q_max = 1.0
 Maximum clamping bound for prognostic surface moisture [kg/kg]. After each Euler update, q_s is clamped to [seb_prognostic_q_min, seb_prognostic_q_max]. Default 1.0 kg/kg ensures physically meaningful moisture. Only used when seb_prognostic_enable=true. More...
 
SEBPrecipitationSource seb_precipitation_source = SEBPrecipitationSource::None
 Rain into the force-restore surface (ERF_ForceRestoreHydrology.H). Default none: the balance as before. microphysics needs seb_prognostic_enable, a microphysics scheme with surface precipitation, and a porosity (seb_soil_porosity or seb_soil_type): water above it runs off. More...
 
amrex::Real seb_soil_porosity = -1.0
 Porosity w_sat [m^3/m^3] of the force-restore soil: above it, water runs off. Needed with seb_precipitation_source = microphysics or seb_deep_prognostic_enable; with seb_soil_type it is Noah-MP's MAXSMC and giving it stops at start-up. In (0, 1]; with seb_drainage_enable also above field capacity; at or above seb_q_sfc_default (and seb_q_deep_default with the deep reservoir); with rain, at or below seb_prognostic_q_max. -1 = not given. More...
 
bool seb_deep_prognostic_enable = false
 Make seb_q_deep and seb_t_deep prognostic (ERF_ForceRestoreHydrology.H): q_deep becomes the mean water content of a soil column seb_deep_layer_depth_m deep, which gains rain and loses evaporation, and the deep temperature relaxes toward T_s over seb_restore_timescale_s. Needs seb_prognostic_enable and a porosity. Default false: both stay at seb_q_deep_default and seb_t_deep_default. More...
 
amrex::Real seb_deep_layer_depth_m = 1.0
 Depth d_2 [m] of the soil column of seb_deep_prognostic_enable, and the depth over which seb_init_soil_moisture_from_file averages the file's soil moisture for q_deep. Default 1 m. Must be finite and deeper than seb_moisture_layer_depth_m; giving it without either input stops at start-up. More...
 
bool seb_drainage_enable = false
 Gravitational drainage of the soil column toward field capacity (Mahfouf and Noilhan 1996, Eq. 4) at the rate C_3 / (1 day): their Table 1 gives C_3 for a 1-day restore period, so seb_restore_timescale_s does not enter. Needs seb_deep_prognostic_enable, seb_drainage_c3_m and a field capacity (seb_soil_moisture_fc or seb_soil_type); init_params() stops otherwise. Default false. More...
 
amrex::Real seb_drainage_c3_m = -1.0
 Drainage coefficient times column depth, C_3 d_2 m. The step uses C_3 = seb_drainage_c3_m / seb_deep_layer_depth_m. Required with seb_drainage_enable and must be > 0; giving it otherwise stops at start-up. -1 = not given. More...
 
bool seb_snow_enable = false
 One bulk snow layer on the force-restore surface (ERF_ForceRestoreSnow.H): the snow routine of the ISBA scheme as in Douville, Royer and Mahfouf (1995), Sec. 2.1, for bare ground. Frozen surface precipitation (snow, graupel, hail; for WSM6 and WDM6 also the cloud ice that fell out) builds a snow water equivalent; the snow raises the surface albedo, sublimates, and melts where the balance takes T_s above 273.16 K, with the melt water going to the soil as rain. Needs seb_prognostic_enable, seb_use_radiation_fluxes, seb_precipitation_source = microphysics, no surface_albedo_sw_diffuse, no seb_vegetation_type and seb_prognostic_t_min_k at or below 273.16; init_params() stops otherwise. Default false: the surface has no snow and results are unchanged. More...
 
amrex::Real seb_snow_initial_swe_kg_m2 = 0.0
 Snow water equivalent at the start of the run [kg/m^2], every column, every level. Must be finite and >= 0; given without seb_snow_enable stops at start-up. A water column of the land mask loses it at the first step. More...
 
amrex::Real seb_snow_albedo = 0.70
 Snow albedo alpha_n -. Must be in [0, 1]; given without seb_snow_enable stops at start-up. More...
 
amrex::Real seb_snow_critical_swe_kg_m2 = 10.0
 Critical snow water equivalent W_crn [kg/m^2] of the snow cover fraction p_ng = W_n / (W_n + W_crn) (Douville et al. 1995, Eq. 7; their 10 mm). Must be finite and > 0; given without seb_snow_enable stops at start-up. More...
 
bool tau_lw_dynamic_enable = false
 Enable dynamic longwave optical depth diagnosis from moisture/clouds. When true, LW optical depth is computed per-level from qv and qc. When false (default), uses the static tau_lw_per_layer. Only used by the two-stream model and lw_enabled == true. More...
 
bool tau_sw_dynamic_enable = false
 
amrex::Real tau_sw_coeff_qv = 0.0
 Shortwave optical depth coefficient for water vapor [dimensionless]. Dynamic SW tau = tau_sw_coeff_qv * qv + tau_sw_coeff_qc * qc + tau_per_layer. Default 0.0 means tau is purely from static tau_per_layer (no dynamic component). Only used when tau_sw_dynamic_enable == true. More...
 
amrex::Real tau_sw_coeff_qc = 0.0
 Shortwave optical depth coefficient for cloud liquid water [dimensionless]. Default 0.0. When both coefficients are 0, dynamic path still invoked but yields tau_per_layer unchanged. Only used when tau_sw_dynamic_enable == true. More...
 
amrex::Real tau_lw_coeff_qv = 0.0
 Longwave optical depth coefficient for water vapor [dimensionless]. Dynamic LW tau = tau_lw_coeff_qv * qv + tau_lw_coeff_qc * qc + tau_lw_per_layer. Default 0.0 means tau is purely from static tau_lw_per_layer (no dynamic component). Only used when tau_lw_dynamic_enable == true. More...
 
amrex::Real tau_lw_coeff_qc = 0.0
 Longwave optical depth coefficient for cloud liquid water [dimensionless]. Default 0.0. When both coefficients are 0, dynamic path still invoked but yields tau_lw_per_layer unchanged. Only used when tau_lw_dynamic_enable == true. More...
 
bool cloud_fraction_prog_enable = false
 Enable prognostic cloud fraction diagnosis from RH/qc. When true, cloud fraction is computed per-level from relative humidity and cloud water. When false (default), uses the static cloud_fraction. Only used by the two-stream model. More...
 
amrex::Real cloud_fraction_rh_min = 0.0
 Minimum relative humidity threshold for cloud fraction diagnosis [0, 1]. Cloud fraction ramps from 0 at rh < cloud_fraction_rh_min to 1 at rh >= cloud_fraction_rh_max. Default 0.0 means cloud fraction depends primarily on qc content. Only used when cloud_fraction_prog_enable == true. More...
 
amrex::Real cloud_fraction_rh_max = 1.0
 Maximum relative humidity threshold for cloud fraction diagnosis [0, 1]. Must be >= cloud_fraction_rh_min. Cloud fraction saturates to 1 at this RH. Default 1.0 means cloud fraction increases linearly from rh_min to 1.0 RH. Only used when cloud_fraction_prog_enable == true. More...
 
amrex::Real cloud_fraction_qc_scale = 1.0e-3
 Cloud water [kg/kg] at which the liquid-water term alone gives a cloud fraction of 1: cf += min(1, qc / cloud_fraction_qc_scale). Default 1.0e-3 kg/kg, so a typical stratus cloud water saturates the term. Only used when cloud_fraction_prog_enable == true. More...
 
bool aerosol_enable = false
 Enable prescribed bulk aerosol/turbidity optical depth. When true, aerosol optical depth is added on top of existing tau_base + cloud + dynamic-moisture contributions. When false (default), there is no aerosol contribution. Only used by the two-stream model and sw_enabled == true. More...
 
AerosolProfileType aerosol_profile_type = AerosolProfileType::Constant
 Aerosol optical depth profile type: Constant, Exponential, or Table. More...
 
amrex::Real aerosol_tau_per_layer = 0.0
 Constant aerosol optical depth per layer [dimensionless]. Used for AerosolProfileType::Constant profile. Default 0.0 (no aerosol contribution). Only used when aerosol_enable == true and aerosol_profile_type == Constant. More...
 
amrex::Real aerosol_scale_height_m = 2000.0
 Scale height for exponential aerosol profile [m]. Controls decay rate: tau_aerosol(k) = aerosol_tau_surface * exp(-z(k) / scale_height). Default 2000.0 m (typical scale height for tropospheric aerosols). Only used when aerosol_enable == true and aerosol_profile_type == Exponential. More...
 
amrex::Real aerosol_tau_surface = 0.0
 Total-column aerosol optical depth at surface [dimensionless]. Used for AerosolProfileType::Exponential profile as the surface boundary condition. Default 0.0 (no aerosol contribution). Only used when aerosol_enable == true and aerosol_profile_type == Exponential. More...
 
Inputs shared with the RRTMGP interface

The two-stream model reads the sun, site and surface-temperature inputs under the same keys, with the same meaning, as the RRTMGP interface (Source/Radiation/RRTMGP/ERF_Radiation.H), so a deck switches between the two models by changing erf.radiation_model alone.

amrex::Real fixed_solar_zenith_angle = -9999.0
 erf.fixed_solar_zenith_angle: the COSINE of the solar zenith angle (mu0), as RRTMGP takes it, applied to every column when > 0. Otherwise (default) the sun follows the calendar: start_datetime sets the date and time, the position is evaluated at rad_cons_lat/lon or at the per-column latitude and longitude when the grid carries them. More...
 
amrex::Real fixed_total_solar_irradiance = -9999.0
 erf.fixed_total_solar_irradiance: top-of-atmosphere irradiance [W/m^2] when >= 0. Otherwise (default) 1360.9 W/m^2 scaled by the Earth-Sun distance factor of the date, as RRTMGP does. More...
 
amrex::Real rad_t_sfc = -1.0
 erf.rad_t_sfc: surface temperature [K] used as the longwave boundary condition wherever no land-surface model, surface layer or prognostic surface energy balance supplies one; also the initial value of the prognostic surface temperature. Required, as for RRTMGP. More...
 
amrex::Real rad_cons_lat = 39.809860
 erf.rad_cons_lat / erf.rad_cons_lon: site latitude and longitude [degrees] when the grid has no lat/lon fields (RRTMGP defaults). More...
 
amrex::Real rad_cons_lon = -98.555183
 
int rad_orbital_year = -9999
 erf.rad_orbital_year and the orbital overrides: negative means the year of the timestamp and the Berger (1978) values for that year. More...
 
amrex::Real rad_orbital_eccentricity = -9999.0
 
amrex::Real rad_orbital_obliquity = -9999.0
 
amrex::Real rad_orbital_mvelp = -9999.0
 

Detailed Description

Container holding radiation-related choices and parameters.

Manages the runtime selection and configuration of radiation solvers.

The two-stream solver builds up from a clear-sky, no-scattering column of uniform optical depth. On top of that it offers height-varying optical depth (a cloud layer) with cloud-fraction masking, which blends clear-sky and cloudy-column fluxes, and a diffuse shortwave component from a two-stream scattering approximation parameterized by single-scattering albedo and asymmetry factor, with independent clear-sky and cloud values. Every addition is off by default, so the defaults reproduce the plain clear-sky column.

Member Function Documentation

◆ check_seb_hydrology()

void RadChoice::check_seb_hydrology ( amrex::ParmParse &  pp)
inline

Checks of the force-restore hydrology inputs (ERF_ForceRestoreHydrology.H): each stops the run naming the input, never clamps. Called at the end of init_params, after the soil type has set the field capacity.

1737  {
1739  const bool hydrology = rain || seb_deep_prognostic_enable;
1740  if ((hydrology || seb_drainage_enable) && !seb_prognostic_enable) {
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");
1744  }
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)");
1749  }
1750  if (pp.contains("radiation.seb_deep_layer_depth_m") && !seb_deep_prognostic_enable &&
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");
1755  }
1756  // The depth is the reservoir's and the averaging depth of the file's soil moisture
1758  !(std::isfinite(seb_deep_layer_depth_m) &&
1760  amrex::Abort("erf.radiation.seb_deep_layer_depth_m must be deeper than "
1761  "seb_moisture_layer_depth_m (" + std::to_string(seb_moisture_layer_depth_m) +
1762  " m): the column contains the surface layer; got " +
1763  std::to_string(seb_deep_layer_depth_m));
1764  }
1765  if (pp.contains("radiation.seb_drainage_c3_m") && !seb_drainage_enable) {
1766  amrex::Abort("erf.radiation.seb_drainage_c3_m is used only with "
1767  "erf.radiation.seb_drainage_enable = true");
1768  }
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");
1773  }
1774  if (!hydrology) { return; }
1775 
1776  if (seb_drainage_enable && seb_soil_type == 0 &&
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");
1780  }
1781  if (seb_drainage_enable &&
1782  !(std::isfinite(seb_drainage_c3_m) && seb_drainage_c3_m > 0.0)) {
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 " +
1786  std::to_string(seb_drainage_c3_m));
1787  }
1788 
1789  // The porosity: from the soil type, or given, never both.
1790  if (seb_soil_type != 0) {
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");
1794  }
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");
1800  }
1801  if (!(std::isfinite(seb_soil_porosity) && seb_soil_porosity > 0.0 &&
1802  seb_soil_porosity <= 1.0)) {
1803  amrex::Abort("erf.radiation.seb_soil_porosity must be in (0, 1]; got " +
1804  std::to_string(seb_soil_porosity));
1805  }
1807  amrex::Abort("erf.radiation.seb_soil_moisture_fc (" + std::to_string(seb_soil_moisture_fc) +
1808  ") must be below erf.radiation.seb_soil_porosity (" +
1809  std::to_string(seb_soil_porosity) + ")");
1810  }
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 (" +
1815  std::to_string(seb_q_deep_default) + ") must not exceed "
1816  "erf.radiation.seb_soil_porosity (" + std::to_string(seb_soil_porosity) +
1817  "): water above it runs off");
1818  }
1819  // The balance clamps q_s to seb_prognostic_q_max after its own update. Below the
1820  // porosity, that clamp would remove rain the runoff never records.
1821  if (seb_precipitation_source == SEBPrecipitationSource::Microphysics &&
1823  amrex::Abort("erf.radiation.seb_prognostic_q_max (" + std::to_string(seb_prognostic_q_max) +
1824  ") must be at or above erf.radiation.seb_soil_porosity (" +
1825  std::to_string(seb_soil_porosity) + ") with seb_precipitation_source = "
1826  "microphysics: a lower cap would remove rain without counting it as runoff");
1827  }
1828  }
ParmParse pp("prob")
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
@ None
Definition: ERF_LSM_Types.H:6
@ rain
Definition: ERF_NOAHMP_Fields.H:138
amrex::Real smc_max
MAXSMC saturated soil moisture (porosity) [m^3/m^3].
Definition: ERF_NoahMPSoilTable.H:23
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 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_drainage_enable
Gravitational drainage of the soil column toward field capacity (Mahfouf and Noilhan 1996,...
Definition: ERF_RadStruct.H:763
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 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
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_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 seb_prognostic_q_max
Maximum clamping bound for prognostic surface moisture [kg/kg]. After each Euler update,...
Definition: ERF_RadStruct.H:719
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
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_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_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
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

Referenced by init_params().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_seb_snow()

void RadChoice::check_seb_snow ( amrex::ParmParse &  pp)
inline

Checks of the force-restore snow inputs (ERF_ForceRestoreSnow.H): each stops the run naming the input, never clamps. Called after check_seb_hydrology.

1835  {
1836  if (!seb_snow_enable) {
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");
1842  }
1843  }
1844  return;
1845  }
1846  // The routine is DRM95 Sec. 2.1 with no vegetation: a canopy would neither mask the
1847  // snow's albedo nor hold snow.
1848  if (seb_vegetation_type != 0) {
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");
1851  }
1852  if (!seb_prognostic_enable) {
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");
1856  }
1857  if (seb_precipitation_source != SEBPrecipitationSource::Microphysics) {
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");
1861  }
1862  if (!seb_use_radiation_fluxes) {
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");
1866  }
1867  // The diffuse albedo follows the direct one only when it is not given; a given value
1868  // would not see the snow.
1869  if (surface_albedo_sw_diffuse >= 0.0) {
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");
1873  }
1874  // The melt returns a snow-covered surface to 273.16 K; the balance's own lower bound
1875  // must allow that temperature.
1876  if (seb_prognostic_t_min_k > amrex::Real(273.16)) {
1877  amrex::Abort("erf.radiation.seb_prognostic_t_min_k (" +
1878  std::to_string(seb_prognostic_t_min_k) + ") must be at or below 273.16 "
1879  "with erf.radiation.seb_snow_enable = true: the melting snow holds the "
1880  "surface at 273.16 K");
1881  }
1882  if (!(std::isfinite(seb_snow_initial_swe_kg_m2) && seb_snow_initial_swe_kg_m2 >= 0.0)) {
1883  amrex::Abort("erf.radiation.seb_snow_initial_swe_kg_m2 must be finite and >= 0; got " +
1884  std::to_string(seb_snow_initial_swe_kg_m2));
1885  }
1886  if (!(seb_snow_albedo >= 0.0 && seb_snow_albedo <= 1.0)) {
1887  amrex::Abort("erf.radiation.seb_snow_albedo must be in [0, 1]; got " +
1888  std::to_string(seb_snow_albedo));
1889  }
1890  if (!(std::isfinite(seb_snow_critical_swe_kg_m2) && seb_snow_critical_swe_kg_m2 > 0.0)) {
1891  amrex::Abort("erf.radiation.seb_snow_critical_swe_kg_m2 must be finite and > 0; got " +
1892  std::to_string(seb_snow_critical_swe_kg_m2));
1893  }
1894  }
std::string name
Definition: ERF_Plotfile2DCatalog.cpp:139
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
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
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
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 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 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

Referenced by init_params().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clamp_high()

static void RadChoice::clamp_high ( const char *  key,
amrex::Real &  value,
amrex::Real  hi 
)
inlinestatic
1044  {
1045  if (value > hi) {
1046  if (amrex::ParallelDescriptor::IOProcessor()) {
1047  amrex::Print() << "WARNING: erf.radiation." << key << " = " << value
1048  << " is above its maximum " << hi << "; using " << hi << "\n";
1049  }
1050  value = hi;
1051  }
1052  }

Referenced by init_params().

Here is the caller graph for this function:

◆ clamp_low()

static void RadChoice::clamp_low ( const char *  key,
amrex::Real &  value,
amrex::Real  lo 
)
inlinestatic

Read radiation options from the input parameter database.

Parameters
[in]two_stream_selectedWhether the two-stream solver is the selected model.
[in]pp_prefixParmParse prefix for the ERF input namespace (e.g., "erf").

Queries:

  • erf.radiation_model = TwoStream (read by SolverChoice) selects the model
  • erf.radiation.sw_enabled (bool, optional, default true)
  • erf.radiation.lw_enabled (bool, optional, default true)
  • erf.radiation.tau_per_layer (real, optional)
  • erf.radiation.tau_lw_per_layer (real, optional)
  • erf.fixed_solar_zenith_angle, erf.fixed_total_solar_irradiance, erf.rad_t_sfc (required), erf.rad_cons_lat, erf.rad_cons_lon, erf.rad_orbital_year, erf.rad_orbital_eccentricity, erf.rad_orbital_obliquity, erf.rad_orbital_mvelp: the RRTMGP interface's keys, with its meanings (see the members above)
  • erf.radiation.tau_model (string "per_layer"|"mass", optional, default "per_layer")
  • erf.radiation.sw_kabs_dry, sw_kscat_dry, sw_kabs_vapor, sw_kext_cloud (real, optional, mass model)
  • erf.radiation.sw_cloud_omega, sw_cloud_g (real, optional, mass model)
  • erf.radiation.lw_mass_absorption_enable (bool, optional, default false)
  • erf.radiation.lw_kabs_dry (real, optional, default 1.0e-4 m^2/kg)
  • erf.radiation.lw_kabs_vapor (real, optional, default 0.1 m^2/kg)
  • erf.radiation.lw_kabs_cloud (real, optional, default 158.0 m^2/kg)
  • erf.radiation.surface_albedo_sw_diffuse (real, optional, default -1 = same as direct)
  • erf.radiation.v (int, optional, debug verbosity)
  • erf.radiation.diag_file (string, optional)
  • erf.radiation.tau_profile_type (string "constant"|"cloud_layer", optional)
  • erf.radiation.cloud_base_height_m (real, optional)
  • erf.radiation.cloud_top_height_m (real, optional)
  • erf.radiation.cloud_tau_per_layer (real, optional)
  • erf.radiation.cloud_fraction (real, optional)
  • erf.radiation.single_scattering_albedo (real, optional)
  • erf.radiation.asymmetry_factor (real, optional)
  • erf.radiation.cloud_single_scattering_albedo (real, optional)
  • erf.radiation.cloud_asymmetry_factor (real, optional)
  • erf.radiation.diag_enable (bool, optional, default false)
  • erf.radiation.diag_stdout_enable (bool, optional, default true)
  • erf.radiation.diag_tagged_enable (bool, optional, default true)
  • erf.radiation.diag_regtest_line_enable (bool, optional, default true)
  • erf.radiation.diag_csv_enable (bool, optional, default true)
  • erf.radiation.diag_callsite_mode (string, optional, default "both")
  • erf.radiation.diag_dedup_tol (real, optional, default 1e-12)
  • erf.radiation.tau_sw_dynamic_enable (bool, optional, default false)
  • erf.radiation.tau_lw_dynamic_enable (bool, optional, default false)
  • erf.radiation.tau_sw_coeff_qv (real, optional, default 0.0)
  • erf.radiation.tau_sw_coeff_qc (real, optional, default 0.0)
  • erf.radiation.tau_lw_coeff_qv (real, optional, default 0.0)
  • erf.radiation.tau_lw_coeff_qc (real, optional, default 0.0)
  • erf.radiation.cloud_fraction_prog_enable (bool, optional, default false)
  • erf.radiation.cloud_fraction_rh_min (real, optional, default 0.0)
  • erf.radiation.cloud_fraction_rh_max (real, optional, default 1.0)
  • erf.radiation.cloud_fraction_qc_scale (real, optional, default 1.0e-3)
  • erf.radiation.aerosol_enable (bool, optional, default false)
  • erf.radiation.aerosol_profile_type (string "constant"|"exponential"|"table", optional, default "constant")
  • erf.radiation.aerosol_tau_per_layer (real, optional, default 0.0)
  • erf.radiation.aerosol_scale_height_m (real, optional, default 2000.0)
  • erf.radiation.aerosol_tau_surface (real, optional, default 0.0)
  • erf.radiation.seb_enable (bool, optional, default false)
  • erf.radiation.seb_sw_flux_default (real, optional, default 0.0)
  • erf.radiation.seb_lw_flux_default (real, optional, default 0.0)
  • erf.radiation.seb_turbulent_flux_source (string "surface_layer"|"defaults", optional, default "surface_layer")
  • erf.radiation.seb_surface_layer_uses_skin (bool, optional, default false)
  • erf.radiation.seb_init_skin_from_file (bool, optional, default false)
  • erf.radiation.seb_init_t_deep_from_file (bool, optional, default false)
  • erf.radiation.seb_init_soil_moisture_from_file (bool, optional, default false)
  • erf.radiation.seb_surface_layer_uses_moisture (bool, optional, default false)
  • erf.radiation.seb_soil_moisture_wilt (real, optional, default 0.066, 0 <= wilt < fc)
  • erf.radiation.seb_soil_moisture_fc (real, optional, default 0.329, wilt < fc <= 1)
  • erf.radiation.seb_soil_type (int, optional, default 0 = unset; 1-19, a Noah-MP STAS soil category)
  • erf.radiation.seb_vegetation_type (int, optional, default 0 = unset; 1-20 except 15-17 (no vegetation), a Noah-MP MODIS land-use category)
  • erf.radiation.seb_vegetation_fraction (real, optional, default 1, in [0, 1])
  • erf.radiation.seb_leaf_area_index (real, optional, default from the table at the start date, >= 0)
  • erf.radiation.seb_hfx_default (real, optional, default 0.0)
  • erf.radiation.seb_lh_default (real, optional, default 0.0)
  • erf.radiation.seb_grdflx_default (real, optional, default 0.0)
  • erf.radiation.seb_q_sfc_default (real, optional, default 0.0)
  • erf.radiation.seb_t_deep_default (real, optional, default 300.0)
  • erf.radiation.seb_q_deep_default (real, optional, default 0.0)
  • erf.radiation.seb_diagnostic_enable (bool, optional, default false)
  • erf.radiation.seb_prognostic_enable (bool, optional, default false)
  • erf.radiation.seb_surface_heat_capacity (real, optional, default 2.0e4, > 0, stops at start-up otherwise)
  • erf.radiation.seb_restore_timescale_s (real, optional, default 86400.0, > 0, stops at start-up otherwise)
  • erf.radiation.seb_moisture_layer_depth_m (real, optional, default 0.1, > 0, stops at start-up otherwise)
  • erf.radiation.seb_moisture_restore_timescale_s (real, optional, default 86400.0, > 0, stops at start-up otherwise)
  • erf.radiation.seb_prognostic_t_min_k (real, optional, default 200.0)
  • erf.radiation.seb_prognostic_t_max_k (real, optional, default 340.0)
  • erf.radiation.seb_prognostic_q_min (real, optional, default 0.0, clamped to [0, 1])
  • erf.radiation.seb_prognostic_q_max (real, optional, default 1.0, clamped to [0, 1])
  • erf.radiation.seb_precipitation_source (string "none"|"microphysics", optional, default "none")
  • erf.radiation.seb_soil_porosity (real, needed with rain or the deep reservoir unless seb_soil_type, in (0, 1]; above fc with drainage; at most seb_prognostic_q_max with rain)
  • erf.radiation.seb_deep_prognostic_enable (bool, optional, default false)
  • erf.radiation.seb_deep_layer_depth_m (real, optional, default 1.0, > seb_moisture_layer_depth_m)
  • erf.radiation.seb_drainage_enable (bool, optional, default false)
  • erf.radiation.seb_drainage_c3_m (real, required with seb_drainage_enable, > 0)
  • erf.radiation.seb_snow_enable (bool, optional, default false)
  • erf.radiation.seb_snow_initial_swe_kg_m2 (real, optional, default 0, >= 0; only with seb_snow_enable)
  • erf.radiation.seb_snow_albedo (real, optional, default 0.70, in [0, 1]; only with seb_snow_enable)
  • erf.radiation.seb_snow_critical_swe_kg_m2 (real, optional, default 10, > 0; only with seb_snow_enable)

Sub-option queries are only performed when the two-stream model is selected.

Bring an out-of-range input back into its valid range and say so. Every erf.radiation.* value with a physical range passes through one of these, so a typo in a deck is reported instead of silently corrected.

1034  {
1035  if (value < lo) {
1036  if (amrex::ParallelDescriptor::IOProcessor()) {
1037  amrex::Print() << "WARNING: erf.radiation." << key << " = " << value
1038  << " is below its minimum " << lo << "; using " << lo << "\n";
1039  }
1040  value = lo;
1041  }
1042  }

Referenced by init_params().

Here is the caller graph for this function:

◆ init_params()

void RadChoice::init_params ( bool  two_stream_selected,
std::string  pp_prefix 
)
inline
1065  {
1066  amrex::ParmParse pp(pp_prefix);
1067  enabled = two_stream_selected;
1068 
1069  // A refined hierarchy is supported: every level runs its own column sweep
1070  // and writes its own heating rates. The one requirement is that each
1071  // level's grids span that level's domain in z, because the sweep imposes
1072  // top-of-atmosphere and surface boundary conditions at the ends of a box.
1073  // That is checked where the grids exist, not here: ERF_RefineBox.cpp for
1074  // an explicit erf.boxN refinement box, and TwoStreamRadiation::define_level
1075  // for every path including tagged refinement and regrid.
1076 
1077  // Only query sub-options if the two-stream model is selected
1078  if (enabled) {
1079  pp.query("radiation.sw_enabled", sw_enabled);
1080  pp.query("radiation.lw_enabled", lw_enabled);
1081  pp.query("radiation.tau_per_layer", tau_per_layer);
1082  pp.query("radiation.tau_lw_per_layer", tau_lw_per_layer);
1083 
1084  // The sun, the site and the surface temperature come from the keys the
1085  // RRTMGP interface reads, so the two models share one set of inputs.
1086  // ParmParse ignores a key nobody reads, so a deck still carrying one of
1087  // the earlier two-stream-only keys would run with silently different
1088  // settings: stop and name the replacement instead.
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"},
1105  };
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] + ".");
1110  }
1111  }
1112  pp.query("fixed_solar_zenith_angle", fixed_solar_zenith_angle);
1113  if (fixed_solar_zenith_angle > 1.0) {
1114  amrex::Abort("erf.fixed_solar_zenith_angle = " + std::to_string(fixed_solar_zenith_angle) +
1115  " is the cosine of the solar zenith angle (as for RRTMGP) and cannot "
1116  "exceed 1; 60 degrees is 0.5.");
1117  }
1118  pp.query("fixed_total_solar_irradiance", fixed_total_solar_irradiance);
1119  if (!pp.query("rad_t_sfc", rad_t_sfc)) {
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).");
1123  }
1124  if (!std::isfinite(rad_t_sfc) || rad_t_sfc <= 0.0) {
1125  amrex::Abort("erf.rad_t_sfc = " + std::to_string(rad_t_sfc) + " must be a positive temperature [K].");
1126  }
1127  pp.query("rad_cons_lat", rad_cons_lat);
1128  pp.query("rad_cons_lon", rad_cons_lon);
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.");
1131  }
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.");
1134  }
1135  pp.query("rad_orbital_year", rad_orbital_year);
1136  pp.query("rad_orbital_eccentricity", rad_orbital_eccentricity);
1137  pp.query("rad_orbital_obliquity", rad_orbital_obliquity);
1138  pp.query("rad_orbital_mvelp", rad_orbital_mvelp);
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";
1142  }
1143  std::string tau_model_str = "per_layer";
1144  pp.query("radiation.tau_model", tau_model_str);
1145  if (tau_model_str == "per_layer") {
1146  tau_model = TauModel::PerLayer;
1147  } else if (tau_model_str == "mass") {
1148  tau_model = TauModel::Mass;
1149  } else {
1150  // The two models give very different column optical depths, so say so
1151  // rather than let a misspelling quietly pick the default.
1152  tau_model = TauModel::PerLayer;
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";
1157  }
1158  }
1159  pp.query("radiation.sw_kabs_dry", sw_kabs_dry);
1160  pp.query("radiation.sw_kscat_dry", sw_kscat_dry);
1161  pp.query("radiation.sw_kabs_vapor", sw_kabs_vapor);
1162  pp.query("radiation.sw_kext_cloud", sw_kext_cloud);
1163  pp.query("radiation.sw_cloud_omega", sw_cloud_omega);
1164  pp.query("radiation.sw_cloud_g", sw_cloud_g);
1165  clamp_low("sw_kabs_dry", sw_kabs_dry, 0.0);
1166  clamp_low("sw_kscat_dry", sw_kscat_dry, 0.0);
1167  clamp_low("sw_kabs_vapor", sw_kabs_vapor, 0.0);
1168  clamp_low("sw_kext_cloud", sw_kext_cloud, 0.0);
1169  clamp_low("sw_cloud_omega", sw_cloud_omega, 0.0);
1170  clamp_high("sw_cloud_omega", sw_cloud_omega, 1.0);
1171  clamp_low("sw_cloud_g", sw_cloud_g, -1.0);
1172  clamp_high("sw_cloud_g", sw_cloud_g, 1.0);
1173  pp.query("radiation.lw_mass_absorption_enable", lw_mass_absorption_enable);
1174  pp.query("radiation.lw_kabs_dry", lw_kabs_dry);
1175  pp.query("radiation.lw_kabs_vapor", lw_kabs_vapor);
1176  pp.query("radiation.lw_kabs_cloud", lw_kabs_cloud);
1177  clamp_low("lw_kabs_dry", lw_kabs_dry, 0.0);
1178  clamp_low("lw_kabs_vapor", lw_kabs_vapor, 0.0);
1179  clamp_low("lw_kabs_cloud", lw_kabs_cloud, 0.0);
1180  pp.query("radiation.v", verbosity);
1181  pp.query("radiation.diag_file", diag_file);
1182 
1183  // Cloud optical properties (all optional; the defaults leave the
1184  // column clear-sky)
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") {
1188  tau_profile_type = TauProfileType::Constant;
1189  } else if (tau_profile_type_str == "cloud_layer") {
1190  tau_profile_type = TauProfileType::CloudLayer;
1191  } else {
1192  // Falling back to constant drops a requested cloud layer, so say so.
1193  tau_profile_type = TauProfileType::Constant;
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";
1199  }
1200  }
1201  pp.query("radiation.cloud_base_height_m", cloud_base_height_m);
1202  pp.query("radiation.cloud_top_height_m", cloud_top_height_m);
1203  pp.query("radiation.cloud_tau_per_layer", cloud_tau_per_layer);
1204  pp.query("radiation.cloud_fraction", cloud_fraction);
1205 
1206  // Parameter validation (R5/R5'): clip cloud_fraction to [0, 1]
1207  clamp_low("cloud_fraction", cloud_fraction, 0.0);
1208  clamp_high("cloud_fraction", cloud_fraction, 1.0);
1209  clamp_low("cloud_tau_per_layer", cloud_tau_per_layer, 0.0);
1212  }
1213 
1214  // Scattering parameters (all optional; the defaults leave the
1215  // shortwave direct-beam only)
1216  pp.query("radiation.single_scattering_albedo", single_scattering_albedo);
1217  pp.query("radiation.asymmetry_factor", asymmetry_factor);
1218  pp.query("radiation.cloud_single_scattering_albedo", cloud_single_scattering_albedo);
1219  pp.query("radiation.cloud_asymmetry_factor", cloud_asymmetry_factor);
1220 
1221  // Parameter validation (R5/R5'): clip albedos to [0, 1] and
1222  // asymmetry factors to [-1, 1]
1223  clamp_low("single_scattering_albedo", single_scattering_albedo, 0.0);
1224  clamp_high("single_scattering_albedo", single_scattering_albedo, 1.0);
1225  clamp_low("asymmetry_factor", asymmetry_factor, -1.0);
1226  clamp_high("asymmetry_factor", asymmetry_factor, 1.0);
1227  clamp_low("cloud_single_scattering_albedo", cloud_single_scattering_albedo, 0.0);
1228  clamp_high("cloud_single_scattering_albedo", cloud_single_scattering_albedo, 1.0);
1229  clamp_low("cloud_asymmetry_factor", cloud_asymmetry_factor, -1.0);
1230  clamp_high("cloud_asymmetry_factor", cloud_asymmetry_factor, 1.0);
1231 
1232  // Runtime diagnostics controls (all optional; every channel is on
1233  // by default)
1234  pp.query("radiation.diag_enable", diag_enable);
1235  pp.query("radiation.diag_stdout_enable", diag_stdout_enable);
1236  pp.query("radiation.diag_tagged_enable", diag_tagged_enable);
1237  pp.query("radiation.diag_regtest_line_enable", diag_regtest_line_enable);
1238  pp.query("radiation.diag_csv_enable", diag_csv_enable);
1239  pp.query("radiation.diag_callsite_mode", diag_callsite_mode);
1240  pp.query("radiation.diag_dedup_tol", diag_dedup_tol);
1241 
1242  // Validate the call-site mode
1243  if (diag_callsite_mode != "both" &&
1244  diag_callsite_mode != "pre_only" &&
1245  diag_callsite_mode != "post_only") {
1246  if (amrex::ParallelDescriptor::IOProcessor()) {
1247  amrex::Print() << "WARNING: unknown erf.radiation.diag_callsite_mode '"
1248  << diag_callsite_mode << "'; valid values are both, "
1249  "pre_only and post_only. Using both.\n";
1250  }
1251  diag_callsite_mode = "both";
1252  }
1253  // Ensure dedup tolerance is non-negative
1254  clamp_low("diag_dedup_tol", diag_dedup_tol, 0.0);
1255 
1256  // Surface heterogeneity fallback parameters (all optional; only used
1257  // when hetero
1258  // LSM/radiation interface fields are absent or invalid)
1259  pp.query("radiation.surface_albedo_sw", surface_albedo_sw);
1260  pp.query("radiation.surface_emissivity_lw", surface_emissivity_lw);
1261  pp.query("radiation.surface_albedo_sw_diffuse", surface_albedo_sw_diffuse);
1262  clamp_high("surface_albedo_sw_diffuse", surface_albedo_sw_diffuse, 1.0);
1263 
1264  // Clamp albedo/emissivity to [0, 1]
1265  clamp_low("surface_albedo_sw", surface_albedo_sw, 0.0);
1266  clamp_high("surface_albedo_sw", surface_albedo_sw, 1.0);
1267  clamp_low("surface_emissivity_lw", surface_emissivity_lw, 0.0);
1268  clamp_high("surface_emissivity_lw", surface_emissivity_lw, 1.0);
1269 
1270  // Dynamic optical depth diagnosis from moisture/clouds
1271  // (all optional; disabled by default)
1272  pp.query("radiation.tau_sw_dynamic_enable", tau_sw_dynamic_enable);
1273  pp.query("radiation.tau_lw_dynamic_enable", tau_lw_dynamic_enable);
1274  pp.query("radiation.tau_sw_coeff_qv", tau_sw_coeff_qv);
1275  pp.query("radiation.tau_sw_coeff_qc", tau_sw_coeff_qc);
1276  pp.query("radiation.tau_lw_coeff_qv", tau_lw_coeff_qv);
1277  pp.query("radiation.tau_lw_coeff_qc", tau_lw_coeff_qc);
1278 
1279  // Clamp the dynamic tau coefficients
1280  // to nonnegative (negative would give unphysical behavior)
1281  clamp_low("tau_sw_coeff_qv", tau_sw_coeff_qv, 0.0);
1282  clamp_low("tau_sw_coeff_qc", tau_sw_coeff_qc, 0.0);
1283  clamp_low("tau_lw_coeff_qv", tau_lw_coeff_qv, 0.0);
1284  clamp_low("tau_lw_coeff_qc", tau_lw_coeff_qc, 0.0);
1285 
1286  // Prognostic cloud fraction diagnosis from RH/qc
1287  // (all optional; disabled by default)
1288  pp.query("radiation.cloud_fraction_prog_enable", cloud_fraction_prog_enable);
1289  pp.query("radiation.cloud_fraction_rh_min", cloud_fraction_rh_min);
1290  pp.query("radiation.cloud_fraction_rh_max", cloud_fraction_rh_max);
1291  pp.query("radiation.cloud_fraction_qc_scale", cloud_fraction_qc_scale);
1292 
1293  // Clamp the cloud fraction parameters
1294  // to physically reasonable ranges
1295  clamp_low("cloud_fraction_rh_min", cloud_fraction_rh_min, 0.0);
1296  clamp_high("cloud_fraction_rh_min", cloud_fraction_rh_min, 1.0);
1297  clamp_low("cloud_fraction_rh_max", cloud_fraction_rh_max, 0.0);
1298  clamp_high("cloud_fraction_rh_max", cloud_fraction_rh_max, 1.0);
1301  }
1302  // qc is divided by this scale, and the kernel drops the qc term when it is not
1303  // positive; clamping a bad value to zero would switch that term off silently
1304  if (!(cloud_fraction_qc_scale > 0.0)) {
1305  amrex::Abort("erf.radiation.cloud_fraction_qc_scale = " + std::to_string(cloud_fraction_qc_scale) +
1306  " must be positive [kg/kg].");
1307  }
1308 
1309  // Prescribed bulk aerosol/turbidity optical depth
1310  // (all optional; disabled by default)
1311  pp.query("radiation.aerosol_enable", aerosol_enable);
1312 
1313  // Parse aerosol profile type as string
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") {
1317  aerosol_profile_type = AerosolProfileType::Constant;
1318  } else if (aerosol_profile_type_str == "exponential") {
1319  aerosol_profile_type = AerosolProfileType::Exponential;
1320  } else if (aerosol_profile_type_str == "table") {
1321  // The table lookup is not implemented and contributes no optical
1322  // depth. Keep the selection so the run is not silently given a
1323  // different profile, and say what it means.
1324  aerosol_profile_type = AerosolProfileType::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";
1329  }
1330  } else {
1331  // Falling through to constant would hide a misspelling.
1332  aerosol_profile_type = AerosolProfileType::Constant;
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";
1337  }
1338  }
1339 
1340  pp.query("radiation.aerosol_tau_per_layer", aerosol_tau_per_layer);
1341  pp.query("radiation.aerosol_scale_height_m", aerosol_scale_height_m);
1342  pp.query("radiation.aerosol_tau_surface", aerosol_tau_surface);
1343 
1344  // Clamp the aerosol parameters
1345  // to physically reasonable ranges
1346  clamp_low("aerosol_tau_per_layer", aerosol_tau_per_layer, 0.0);
1347  clamp_low("aerosol_tau_surface", aerosol_tau_surface, 0.0);
1348  reset_nonpositive("aerosol_scale_height_m", aerosol_scale_height_m, 2000.0);
1349 
1350  // Simplified SEB infrastructure fallback parameters
1351  pp.query("radiation.seb_enable", seb_enable);
1352  pp.query("radiation.seb_use_radiation_fluxes", seb_use_radiation_fluxes);
1353  pp.query("radiation.seb_sw_flux_default", seb_sw_flux_default);
1354  pp.query("radiation.seb_lw_flux_default", seb_lw_flux_default);
1355  // Through the AMREX_ENUM, case-insensitive and ignoring underscores, so
1356  // surface_layer, SurfaceLayer and surfacelayer all select SurfaceLayer. The
1357  // parser throws on any other value; turn that into an abort naming the input.
1358  try {
1359  pp.query_enum_sloppy("radiation.seb_turbulent_flux_source",
1361  } catch (...) {
1362  std::string value;
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 + "'");
1366  }
1367  pp.query("radiation.seb_surface_layer_uses_skin", seb_surface_layer_uses_skin);
1368  pp.query("radiation.seb_init_skin_from_file", seb_init_skin_from_file);
1369  pp.query("radiation.seb_init_t_deep_from_file", seb_init_t_deep_from_file);
1370  pp.query("radiation.seb_init_soil_moisture_from_file", seb_init_soil_moisture_from_file);
1371  pp.query("radiation.seb_surface_layer_uses_moisture", seb_surface_layer_uses_moisture);
1372  pp.query("radiation.seb_soil_moisture_wilt", seb_soil_moisture_wilt);
1373  pp.query("radiation.seb_soil_moisture_fc", seb_soil_moisture_fc);
1374  pp.query("radiation.seb_soil_type", seb_soil_type);
1375  if (seb_soil_type != 0) {
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");
1381  }
1383  if (soil == nullptr || !(soil->smc_ref > soil->smc_wilt)) {
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)");
1387  }
1389  seb_soil_moisture_fc = soil->smc_ref;
1390  }
1391  pp.query("radiation.seb_vegetation_type", seb_vegetation_type);
1392  pp.query("radiation.seb_vegetation_fraction", seb_vegetation_fraction);
1393  pp.query("radiation.seb_leaf_area_index", seb_leaf_area_index);
1394  if (seb_vegetation_type != 0) {
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)");
1400  }
1401  // Snow and ice (15), barren (16) and water (17) have no vegetation in the table
1402  // (Z0MVT = 0, LAI 0 all year): Noah-MP treats such a surface as bare ground.
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.");
1408  }
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)");
1414  }
1415  if (!(std::isfinite(seb_vegetation_fraction) && seb_vegetation_fraction >= 0.0 &&
1416  seb_vegetation_fraction <= 1.0)) {
1417  amrex::Abort("erf.radiation.seb_vegetation_fraction must be in [0, 1]; got " +
1418  std::to_string(seb_vegetation_fraction));
1419  }
1420  if (pp.contains("radiation.seb_leaf_area_index")) {
1421  if (!(std::isfinite(seb_leaf_area_index) && seb_leaf_area_index >= 0.0)) {
1422  amrex::Abort("erf.radiation.seb_leaf_area_index must be >= 0; got " +
1423  std::to_string(seb_leaf_area_index));
1424  }
1425  } else {
1426  // The table's monthly LAI at the start date and time, as Noah-MP interpolates it
1427  // (its day of the year counts from 0 at 00:00 on 1 January).
1428  std::string start;
1429  amrex::ParmParse pp_top;
1430  amrex::Real day = 0.0, days_in_year = 0.0;
1431  if (!pp_top.query("start_datetime", start) ||
1432  !noahmp_day_of_year(start, day, days_in_year)) {
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");
1436  }
1437  seb_leaf_area_index = noahmp_leaf_area_index(*veg, day, days_in_year,
1438  rad_cons_lat < 0.0);
1439  if (amrex::ParallelDescriptor::IOProcessor()) {
1440  amrex::Print() << "NOTE: erf.radiation.seb_leaf_area_index = "
1441  << seb_leaf_area_index << ", Noah-MP's table value for land-use "
1442  "category " << seb_vegetation_type << " at " << start
1443  << ", fixed for the run.\n";
1444  }
1445  }
1446  }
1447  pp.query("radiation.seb_hfx_default", seb_hfx_default);
1448  pp.query("radiation.seb_lh_default", seb_lh_default);
1449  pp.query("radiation.seb_grdflx_default", seb_grdflx_default);
1450  pp.query("radiation.seb_q_sfc_default", seb_q_sfc_default);
1451  pp.query("radiation.seb_t_deep_default", seb_t_deep_default);
1452  pp.query("radiation.seb_q_deep_default", seb_q_deep_default);
1453 
1454  // SEB diagnostic mode
1455  pp.query("radiation.seb_diagnostic_enable", seb_diagnostic_enable);
1456 
1457  // Auto-enable seb_enable if seb_diagnostic_enable is requested but seb_enable is false
1459  seb_enable = true; // Internal auto-enable for safety/simplicity
1460  }
1461 
1462  // SEB prognostic mode parameters
1463  pp.query("radiation.seb_prognostic_enable", seb_prognostic_enable);
1464  pp.query("radiation.seb_surface_heat_capacity", seb_surface_heat_capacity);
1465  pp.query("radiation.seb_restore_timescale_s", seb_restore_timescale_s);
1466  pp.query("radiation.seb_moisture_layer_depth_m", seb_moisture_layer_depth_m);
1467  pp.query("radiation.seb_moisture_restore_timescale_s", seb_moisture_restore_timescale_s);
1468  pp.query("radiation.seb_prognostic_t_min_k", seb_prognostic_t_min_k);
1469  pp.query("radiation.seb_prognostic_t_max_k", seb_prognostic_t_max_k);
1470  pp.query("radiation.seb_prognostic_q_min", seb_prognostic_q_min);
1471  pp.query("radiation.seb_prognostic_q_max", seb_prognostic_q_max);
1472  // The force-restore hydrology (ERF_ForceRestoreHydrology.H); checked at the end.
1473  try {
1474  pp.query_enum_sloppy("radiation.seb_precipitation_source",
1476  } catch (...) {
1477  std::string value;
1478  pp.query("radiation.seb_precipitation_source", value);
1479  amrex::Abort("erf.radiation.seb_precipitation_source must be none or microphysics, "
1480  "not '" + value + "'");
1481  }
1482  pp.query("radiation.seb_soil_porosity", seb_soil_porosity);
1483  pp.query("radiation.seb_deep_prognostic_enable", seb_deep_prognostic_enable);
1484  pp.query("radiation.seb_deep_layer_depth_m", seb_deep_layer_depth_m);
1485  pp.query("radiation.seb_drainage_enable", seb_drainage_enable);
1486  pp.query("radiation.seb_drainage_c3_m", seb_drainage_c3_m);
1487  pp.query("radiation.seb_snow_enable", seb_snow_enable);
1488  pp.query("radiation.seb_snow_initial_swe_kg_m2", seb_snow_initial_swe_kg_m2);
1489  pp.query("radiation.seb_snow_albedo", seb_snow_albedo);
1490  pp.query("radiation.seb_snow_critical_swe_kg_m2", seb_snow_critical_swe_kg_m2);
1491 
1492  // The prognostic update needs the SEB fields and the residual, so
1493  // requesting it turns on the infrastructure it depends on. Report that,
1494  // since it changes settings the user did not set.
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";
1500  }
1501  seb_enable = true;
1502  seb_diagnostic_enable = true;
1503  }
1504 
1505  if (!std::isfinite(seb_sw_flux_default)) seb_sw_flux_default = 0.0;
1506  if (!std::isfinite(seb_lw_flux_default)) seb_lw_flux_default = 0.0;
1507  if (!std::isfinite(seb_hfx_default)) seb_hfx_default = 0.0;
1508  if (!std::isfinite(seb_lh_default)) seb_lh_default = 0.0;
1509  if (!std::isfinite(seb_grdflx_default)) seb_grdflx_default = 0.0;
1510  if (!std::isfinite(seb_q_sfc_default)) seb_q_sfc_default = 0.0;
1511  reset_nonpositive("seb_t_deep_default", seb_t_deep_default, 300.0);
1512  if (!std::isfinite(seb_q_deep_default)) seb_q_deep_default = 0.0;
1513 
1514  seb_sw_flux_default = amrex::max(amrex::Real(-2000.0), amrex::min(amrex::Real(2000.0), seb_sw_flux_default));
1515  seb_lw_flux_default = amrex::max(amrex::Real(-2000.0), amrex::min(amrex::Real(2000.0), seb_lw_flux_default));
1516  seb_hfx_default = amrex::max(amrex::Real(-2000.0), amrex::min(amrex::Real(2000.0), seb_hfx_default));
1517  seb_lh_default = amrex::max(amrex::Real(-2000.0), amrex::min(amrex::Real(2000.0), seb_lh_default));
1518  seb_grdflx_default = amrex::max(amrex::Real(-2000.0), amrex::min(amrex::Real(2000.0), seb_grdflx_default));
1519  seb_q_sfc_default = amrex::max(amrex::Real(0.0), amrex::min(amrex::Real(1.0), seb_q_sfc_default));
1520  seb_q_deep_default = amrex::max(amrex::Real(0.0), amrex::min(amrex::Real(1.0), seb_q_deep_default));
1521 
1522  // Two-way coupling needs a skin that evolves, and a balance that removes the
1523  // flux the surface layer computes from it.
1525  if (!seb_prognostic_enable) {
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");
1529  }
1530  if (seb_turbulent_flux_source != SEBTurbulentFluxSource::SurfaceLayer) {
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 "
1534  "from the skin");
1535  }
1536  }
1537 
1538  // The skin of the initial file is a first value of a field that evolves. Without the
1539  // prognostic balance the skin is set back to rad_t_sfc at every radiation step.
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");
1544  }
1545 
1546  // The deep temperature is read only by the prognostic update of the skin, and the
1547  // wrfinput reader holds TMN only when that update runs.
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");
1552  }
1553 
1554  // The soil water of the file is a first value of q_s, which evolves only in the
1555  // prognostic balance; without it q_s is seb_q_sfc_default at every radiation step.
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");
1560  }
1561 
1562  // Moisture coupling: the surface mixing ratio is q_sat at the skin temperature, so
1563  // it needs the skin coupling; and beta needs a wilting point below field capacity.
1564  // The wilting point and field capacity: checked whenever they are given or used. The
1565  // drainage alone uses the field capacity and not the wilting point, so it checks fc only.
1567  pp.contains("radiation.seb_soil_moisture_wilt") ||
1568  (pp.contains("radiation.seb_soil_moisture_fc") && !seb_drainage_enable)) {
1569  if (!(std::isfinite(seb_soil_moisture_wilt) && std::isfinite(seb_soil_moisture_fc) &&
1571  seb_soil_moisture_fc <= 1.0)) {
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 = " +
1574  std::to_string(seb_soil_moisture_wilt) + ", fc = " +
1575  std::to_string(seb_soil_moisture_fc));
1576  }
1577  } else if (seb_drainage_enable) {
1578  if (!(std::isfinite(seb_soil_moisture_fc) && seb_soil_moisture_fc > 0.0 &&
1579  seb_soil_moisture_fc <= 1.0)) {
1580  amrex::Abort("erf.radiation.seb_soil_moisture_fc must be in (0, 1] with "
1581  "seb_drainage_enable (a volumetric water content); got " +
1582  std::to_string(seb_soil_moisture_fc));
1583  }
1584  }
1585  // Inputs that only the moisture coupling, the drainage or a vegetation type use: say so
1586  // rather than ignore them.
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");
1591  }
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");
1597  }
1598  if (seb_vegetation_type == 0 &&
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");
1603  }
1604 
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 "
1610  "temperature");
1611  }
1612  // With seb_init_soil_moisture_from_file the land columns start from the file and
1613  // the defaults are the values of the water columns, where the balance does not
1614  // run: the two NOTEs below would then describe a soil the run does not have.
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 = "
1620  << seb_q_sfc_default << ", seb_soil_moisture_wilt = "
1621  << seb_soil_moisture_wilt << "), so its soil-water factor is zero: "
1622  << (seb_soil_type != 0
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";
1629  }
1630  // q_s restores toward q_deep, which defaults to 0: a forgotten q_deep dries the soil
1631  // over seb_moisture_restore_timescale_s.
1634  amrex::ParallelDescriptor::IOProcessor()) {
1635  amrex::Print() << "NOTE: erf.radiation.seb_surface_layer_uses_moisture: "
1636  "seb_q_deep_default = " << seb_q_deep_default
1637  << " is below the wilting point (" << seb_soil_moisture_wilt
1638  << "), and q_s restores toward it over seb_moisture_restore_timescale_s"
1639  " (" << seb_moisture_restore_timescale_s << " s), drying the soil."
1640  " Set seb_q_deep_default to the deep soil's water content if that "
1641  "is not meant.\n";
1642  }
1643  }
1644 
1645  // The restoring term -(2 pi / tau)(T_s - T_deep) of the force-restore update
1646  // is the ground heat flux, so a ground flux in the balance as well removes
1647  // that heat twice.
1648  if (seb_prognostic_enable && seb_grdflx_default != 0.0 &&
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";
1653  }
1654 
1655 
1656  // Validate the prognostic parameters: each must be positive and finite when given
1657  // (the defaults are), so a typo stops here rather than running on another value.
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));
1662  }
1663  };
1664  require_positive("seb_surface_heat_capacity", seb_surface_heat_capacity);
1665  require_positive("seb_restore_timescale_s", seb_restore_timescale_s);
1666  require_positive("seb_moisture_layer_depth_m", seb_moisture_layer_depth_m);
1667  require_positive("seb_moisture_restore_timescale_s", seb_moisture_restore_timescale_s);
1668 
1669  // With a Noah-MP soil, the surface heat capacity of that soil at its initial water
1670  // content: the layer the restore period's temperature wave reaches.
1671  // The coupled surface layer's land roughness, from the same tables.
1673  const NoahMPVegetationParams* veg = (seb_vegetation_type != 0)
1675  const amrex::Real f_veg = veg ? seb_vegetation_fraction : amrex::Real(0.0);
1676  seb_land_roughness = f_veg * (veg ? veg->z0 : amrex::Real(0.0)) +
1677  (amrex::Real(1.0) - f_veg) * noahmp_soil_roughness;
1678  // At least min(Z0MVT, Z0SOIL) > 0: the categories with Z0MVT = 0 stop above.
1680  "erf.radiation.seb_*: the land roughness from Noah-MP's tables is not positive");
1681  }
1682 
1683  // A value given explicitly stands.
1684  if (seb_prognostic_enable && seb_soil_type != 0) {
1686  const amrex::Real theta = amrex::min(seb_q_sfc_default, soil->smc_max);
1687  const amrex::Real c = seb_soil_heat_capacity(theta, soil->smc_max, noahmp_soil_heat_capacity);
1688  const amrex::Real lambda = seb_soil_thermal_conductivity(theta, soil->smc_max, soil->quartz);
1689  const amrex::Real derived = seb_force_restore_heat_capacity(lambda, c, seb_restore_timescale_s);
1690  const bool given = pp.contains("radiation.seb_surface_heat_capacity");
1691  if (!given) { seb_surface_heat_capacity = derived; }
1692  if (amrex::ParallelDescriptor::IOProcessor()) {
1693  amrex::Print() << "NOTE: erf.radiation.seb_surface_heat_capacity = "
1694  << seb_surface_heat_capacity << " J/m^2/K"
1695  << (given ? " as given; Noah-MP soil category " :
1696  ", from Noah-MP soil category ")
1697  << seb_soil_type << " at a water content of " << theta
1698  << " (heat capacity " << c << " J/m^3/K, conductivity " << lambda
1699  << " W/m/K) over " << seb_restore_timescale_s << " s"
1700  << (given ? " gives " + std::to_string(derived) : std::string())
1701  << ".\n";
1702  }
1703  }
1704 
1705  // Clamp temperature bounds
1706  if (!std::isfinite(seb_prognostic_t_min_k)) seb_prognostic_t_min_k = 200.0;
1707  if (!std::isfinite(seb_prognostic_t_max_k)) seb_prognostic_t_max_k = 340.0;
1709  amrex::Real tmp = seb_prognostic_t_min_k;
1712  }
1713 
1714  // Clamp moisture bounds
1715  if (!std::isfinite(seb_prognostic_q_min)) seb_prognostic_q_min = 0.0;
1716  if (!std::isfinite(seb_prognostic_q_max)) seb_prognostic_q_max = 1.0;
1717  seb_prognostic_q_min = amrex::max(amrex::Real(0.0), amrex::min(amrex::Real(1.0), seb_prognostic_q_min));
1718  seb_prognostic_q_max = amrex::max(amrex::Real(0.0), amrex::min(amrex::Real(1.0), seb_prognostic_q_max));
1720  amrex::Real tmp = seb_prognostic_q_min;
1723  }
1724 
1726  check_seb_snow(pp);
1727  }
1728 
1729 }
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")
constexpr amrex::Real noahmp_soil_roughness
Definition: ERF_NoahMPSoilTable.H:42
constexpr amrex::Real noahmp_soil_heat_capacity
Definition: ERF_NoahMPSoilTable.H:35
amrex::Real noahmp_leaf_area_index(const NoahMPVegetationParams &params, 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
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
@ theta
Definition: ERF_Kessler.H:26
@ 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 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
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 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 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
std::string diag_file
Output file path for radiation diagnostics CSV. Paths are relative to the simulation working director...
Definition: ERF_RadStruct.H:278
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
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
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 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
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_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
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
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
bool lw_enabled
Enable longwave (thermal) radiation computation. Only used by the two-stream model.
Definition: ERF_RadStruct.H:160
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 cloud_base_height_m
Cloud layer base height [m]. Only used when tau_profile_type == CloudLayer.
Definition: ERF_RadStruct.H:342
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
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 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 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

Referenced by SolverChoice::init_params().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset_nonpositive()

static void RadChoice::reset_nonpositive ( const char *  key,
amrex::Real &  value,
amrex::Real  fallback 
)
inlinestatic
1054  {
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";
1059  }
1060  value = fallback;
1061  }
1062  }

Referenced by init_params().

Here is the caller graph for this function:

◆ seb_hydrology_enabled()

bool RadChoice::seb_hydrology_enabled ( ) const
inlinenoexcept

True when any of the force-restore hydrology inputs is on.

Referenced by TwoStreamRadiation::advance().

Here is the caller graph for this function:

◆ uses_two_stream_radiation()

bool RadChoice::uses_two_stream_radiation ( ) const
inlinenoexcept

Check if two-stream radiation is active.

Returns
true when erf.radiation_model = TwoStream.
1902  {
1903  return enabled;
1904  }

Member Data Documentation

◆ aerosol_enable

bool RadChoice::aerosol_enable = false

Enable prescribed bulk aerosol/turbidity optical depth. When true, aerosol optical depth is added on top of existing tau_base + cloud + dynamic-moisture contributions. When false (default), there is no aerosol contribution. Only used by the two-stream model and sw_enabled == true.

Referenced by init_params().

◆ aerosol_profile_type

AerosolProfileType RadChoice::aerosol_profile_type = AerosolProfileType::Constant

Aerosol optical depth profile type: Constant, Exponential, or Table.

  • Constant: uniform aerosol tau per layer (aerosol_tau_per_layer).
  • Exponential: tau decays with height via tau_aerosol(k) = aerosol_tau_surface * exp(-z(k) / aerosol_scale_height_m).
  • Table: per-level tau prescribed via lookup (future extension, currently not supported). Default Constant. Only used when aerosol_enable == true.

Referenced by init_params().

◆ aerosol_scale_height_m

amrex::Real RadChoice::aerosol_scale_height_m = 2000.0

Scale height for exponential aerosol profile [m]. Controls decay rate: tau_aerosol(k) = aerosol_tau_surface * exp(-z(k) / scale_height). Default 2000.0 m (typical scale height for tropospheric aerosols). Only used when aerosol_enable == true and aerosol_profile_type == Exponential.

Referenced by init_params().

◆ aerosol_tau_per_layer

amrex::Real RadChoice::aerosol_tau_per_layer = 0.0

Constant aerosol optical depth per layer [dimensionless]. Used for AerosolProfileType::Constant profile. Default 0.0 (no aerosol contribution). Only used when aerosol_enable == true and aerosol_profile_type == Constant.

Referenced by init_params().

◆ aerosol_tau_surface

amrex::Real RadChoice::aerosol_tau_surface = 0.0

Total-column aerosol optical depth at surface [dimensionless]. Used for AerosolProfileType::Exponential profile as the surface boundary condition. Default 0.0 (no aerosol contribution). Only used when aerosol_enable == true and aerosol_profile_type == Exponential.

Referenced by init_params().

◆ asymmetry_factor

amrex::Real RadChoice::asymmetry_factor = 0.0

Clear-sky (background gas) scattering asymmetry factor in [-1, 1] (0 = isotropic scattering, close to 1 = strongly forward-scattering). Only meaningful when single_scattering_albedo

0. Default 0.0.

Referenced by init_params().

◆ cloud_asymmetry_factor

amrex::Real RadChoice::cloud_asymmetry_factor = 0.0

Cloud scattering asymmetry factor in [-1, 1], used instead of asymmetry_factor for levels where the cloud-layer optical depth enhancement applies. Default 0.0. Typical liquid water cloud droplet values are around 0.85 (strongly forward-scattering). Only meaningful when cloud_single_scattering_albedo > 0.

Referenced by init_params().

◆ cloud_base_height_m

amrex::Real RadChoice::cloud_base_height_m = 500.0

Cloud layer base height [m]. Only used when tau_profile_type == CloudLayer.

Referenced by init_params().

◆ cloud_fraction

amrex::Real RadChoice::cloud_fraction = 0.0

Cloud fraction in [0, 1] used to blend clear-sky and cloudy-column fluxes: F = (1 - cloud_fraction) * F_clear + cloud_fraction * F_cloudy. Default 0.0 (fully clear sky), which reduces exactly to the clear-sky column regardless of tau_profile_type.

Referenced by TwoStreamRadiation::advance(), and init_params().

◆ cloud_fraction_prog_enable

bool RadChoice::cloud_fraction_prog_enable = false

Enable prognostic cloud fraction diagnosis from RH/qc. When true, cloud fraction is computed per-level from relative humidity and cloud water. When false (default), uses the static cloud_fraction. Only used by the two-stream model.

Referenced by init_params().

◆ cloud_fraction_qc_scale

amrex::Real RadChoice::cloud_fraction_qc_scale = 1.0e-3

Cloud water [kg/kg] at which the liquid-water term alone gives a cloud fraction of 1: cf += min(1, qc / cloud_fraction_qc_scale). Default 1.0e-3 kg/kg, so a typical stratus cloud water saturates the term. Only used when cloud_fraction_prog_enable == true.

Referenced by init_params().

◆ cloud_fraction_rh_max

amrex::Real RadChoice::cloud_fraction_rh_max = 1.0

Maximum relative humidity threshold for cloud fraction diagnosis [0, 1]. Must be >= cloud_fraction_rh_min. Cloud fraction saturates to 1 at this RH. Default 1.0 means cloud fraction increases linearly from rh_min to 1.0 RH. Only used when cloud_fraction_prog_enable == true.

Referenced by init_params().

◆ cloud_fraction_rh_min

amrex::Real RadChoice::cloud_fraction_rh_min = 0.0

Minimum relative humidity threshold for cloud fraction diagnosis [0, 1]. Cloud fraction ramps from 0 at rh < cloud_fraction_rh_min to 1 at rh >= cloud_fraction_rh_max. Default 0.0 means cloud fraction depends primarily on qc content. Only used when cloud_fraction_prog_enable == true.

Referenced by init_params().

◆ cloud_single_scattering_albedo

amrex::Real RadChoice::cloud_single_scattering_albedo = 0.0

Cloud single-scattering albedo in [0, 1], used instead of single_scattering_albedo for levels where the cloud-layer optical depth enhancement applies (i.e., within [cloud_base_height_m, cloud_top_height_m] on the "cloudy" column evaluation). Default 0.0 leaves the cloud band non-scattering for SW_Cloud_Layer unless explicitly configured otherwise. Typical liquid water cloud values are close to 1 (e.g., 0.9999). Only used when tau_profile_type == CloudLayer.

Referenced by init_params().

◆ cloud_tau_per_layer

amrex::Real RadChoice::cloud_tau_per_layer = 0.5

Additional optical depth per layer contributed by the cloud, added on top of the clear-sky tau_per_layer/tau_lw_per_layer background within [cloud_base_height_m, cloud_top_height_m]. Only used when tau_profile_type == CloudLayer.

Referenced by init_params().

◆ cloud_top_height_m

amrex::Real RadChoice::cloud_top_height_m = 1000.0

Cloud layer top height [m]. Only used when tau_profile_type == CloudLayer. Must be >= cloud_base_height_m.

Referenced by init_params().

◆ diag_callsite_mode

std::string RadChoice::diag_callsite_mode = "both"

Call-site filtering mode: "both" (pre+post rows), "pre_only", or "post_only".

Referenced by TwoStreamRadiation::advance(), and init_params().

◆ diag_csv_enable

bool RadChoice::diag_csv_enable = true

Enable CSV file append behavior. When false, no file writes; other enabled streams may still print. Default true.

Referenced by TwoStreamRadiation::advance(), and init_params().

◆ diag_dedup_tol

amrex::Real RadChoice::diag_dedup_tol = 1.0e-12

Tolerance for time equality in duplicate guard [s]. Times within this tolerance are considered equal. Default 1e-12.

Referenced by TwoStreamRadiation::advance(), and init_params().

◆ diag_enable

bool RadChoice::diag_enable = false

Master switch for radiation diagnostics emission. When false, no diagnostics output (stdout/tagged/regtest/csv). Default false: a run that did not ask for the diagnostics should not write a CSV row and a stdout block on every step. The per-stream switches below stay on by default, so setting this one input to true turns the whole set on.

Referenced by TwoStreamRadiation::advance(), and init_params().

◆ diag_file

std::string RadChoice::diag_file = "radiation_diag.dat"

Output file path for radiation diagnostics CSV. Paths are relative to the simulation working directory.

Referenced by TwoStreamRadiation::advance(), and init_params().

◆ diag_regtest_line_enable

bool RadChoice::diag_regtest_line_enable = true

Enable RADIATION_DIAG: line emission. Controls regtest-parsing diagnostics line. Default true.

Referenced by TwoStreamRadiation::advance(), and init_params().

◆ diag_stdout_enable

bool RadChoice::diag_stdout_enable = true

Enable human-readable stdout diagnostics block. Controls tagged [RAD][...] debug line emission (when verbosity >= 1). Default true.

Referenced by TwoStreamRadiation::advance(), and init_params().

◆ diag_tagged_enable

bool RadChoice::diag_tagged_enable = true

Enable tagged [RAD][...] debug lines. Controls emission of bracketed-tag debug output. Default true.

Referenced by TwoStreamRadiation::advance(), and init_params().

◆ enabled

bool RadChoice::enabled = false

True when erf.radiation_model = TwoStream. Set by init_params from the model SolverChoice read; the erf.radiation.* sub-options are read only then.

Referenced by TwoStreamRadiation::active(), TwoStreamRadiation::define_level(), init_params(), and uses_two_stream_radiation().

◆ fixed_solar_zenith_angle

amrex::Real RadChoice::fixed_solar_zenith_angle = -9999.0

erf.fixed_solar_zenith_angle: the COSINE of the solar zenith angle (mu0), as RRTMGP takes it, applied to every column when > 0. Otherwise (default) the sun follows the calendar: start_datetime sets the date and time, the position is evaluated at rad_cons_lat/lon or at the per-column latitude and longitude when the grid carries them.

Referenced by init_params().

◆ fixed_total_solar_irradiance

amrex::Real RadChoice::fixed_total_solar_irradiance = -9999.0

erf.fixed_total_solar_irradiance: top-of-atmosphere irradiance [W/m^2] when >= 0. Otherwise (default) 1360.9 W/m^2 scaled by the Earth-Sun distance factor of the date, as RRTMGP does.

Referenced by init_params().

◆ lw_enabled

bool RadChoice::lw_enabled = true

Enable longwave (thermal) radiation computation. Only used by the two-stream model.

Referenced by init_params().

◆ lw_kabs_cloud

amrex::Real RadChoice::lw_kabs_cloud = 158.0

Cloud-water LW mass absorption coefficient m^2/kg.

Referenced by init_params().

◆ lw_kabs_dry

amrex::Real RadChoice::lw_kabs_dry = 1.0e-4

Dry-air gray LW mass absorption coefficient [m^2/kg].

Referenced by init_params().

◆ lw_kabs_vapor

amrex::Real RadChoice::lw_kabs_vapor = 0.1

Water-vapor gray LW mass absorption coefficient [m^2/kg].

Referenced by init_params().

◆ lw_mass_absorption_enable

bool RadChoice::lw_mass_absorption_enable = false

Gray longwave optical depth from the layer mass path instead of the fixed tau_lw_per_layer (also selected by tau_model = mass): tau_lw(k) = rho dz (lw_kabs_dry + lw_kabs_vapor qv + lw_kabs_cloud qc) The cloud term is the Stephens (1978) emissivity, eps = 1 - exp(-a LWP) with a = 0.158 m^2/g, written as an optical depth. The column optical depth is then independent of the vertical resolution. The cloud-band, moisture-coefficient and aerosol additions still apply on top. Default false keeps tau_lw_per_layer.

Referenced by init_params().

◆ rad_cons_lat

amrex::Real RadChoice::rad_cons_lat = 39.809860

erf.rad_cons_lat / erf.rad_cons_lon: site latitude and longitude [degrees] when the grid has no lat/lon fields (RRTMGP defaults).

Referenced by init_params().

◆ rad_cons_lon

amrex::Real RadChoice::rad_cons_lon = -98.555183

Referenced by init_params().

◆ rad_orbital_eccentricity

amrex::Real RadChoice::rad_orbital_eccentricity = -9999.0

Referenced by init_params().

◆ rad_orbital_mvelp

amrex::Real RadChoice::rad_orbital_mvelp = -9999.0

Referenced by init_params().

◆ rad_orbital_obliquity

amrex::Real RadChoice::rad_orbital_obliquity = -9999.0

Referenced by init_params().

◆ rad_orbital_year

int RadChoice::rad_orbital_year = -9999

erf.rad_orbital_year and the orbital overrides: negative means the year of the timestamp and the Berger (1978) values for that year.

Referenced by init_params().

◆ rad_t_sfc

amrex::Real RadChoice::rad_t_sfc = -1.0

erf.rad_t_sfc: surface temperature [K] used as the longwave boundary condition wherever no land-surface model, surface layer or prognostic surface energy balance supplies one; also the initial value of the prognostic surface temperature. Required, as for RRTMGP.

Referenced by TwoStreamRadiation::advance(), TwoStreamRadiation::define_level(), and init_params().

◆ seb_deep_layer_depth_m

amrex::Real RadChoice::seb_deep_layer_depth_m = 1.0

Depth d_2 [m] of the soil column of seb_deep_prognostic_enable, and the depth over which seb_init_soil_moisture_from_file averages the file's soil moisture for q_deep. Default 1 m. Must be finite and deeper than seb_moisture_layer_depth_m; giving it without either input stops at start-up.

Referenced by check_seb_hydrology(), and init_params().

◆ seb_deep_prognostic_enable

bool RadChoice::seb_deep_prognostic_enable = false

Make seb_q_deep and seb_t_deep prognostic (ERF_ForceRestoreHydrology.H): q_deep becomes the mean water content of a soil column seb_deep_layer_depth_m deep, which gains rain and loses evaporation, and the deep temperature relaxes toward T_s over seb_restore_timescale_s. Needs seb_prognostic_enable and a porosity. Default false: both stay at seb_q_deep_default and seb_t_deep_default.

Referenced by check_seb_hydrology(), init_params(), seb_hydrology_enabled(), TwoStreamRadiation::seb_q_deep_is_state(), and TwoStreamRadiation::seb_t_deep_is_state().

◆ seb_diagnostic_enable

bool RadChoice::seb_diagnostic_enable = false

Enable diagnostic SEB residual computation and reporting. When true, computes and reports SEB residual = (SW_net + LW_net) - H - LE - G. When false (default), no residual computation or new diagnostic output. Requires seb_enable=true to be meaningful; if false but seb_enable=true, auto-enables internally. Note: this is diagnostic-only; it makes no prognostic T_s or flux update. Set seb_prognostic_enable for that.

Referenced by TwoStreamRadiation::advance(), and init_params().

◆ seb_drainage_c3_m

amrex::Real RadChoice::seb_drainage_c3_m = -1.0

Drainage coefficient times column depth, C_3 d_2 m. The step uses C_3 = seb_drainage_c3_m / seb_deep_layer_depth_m. Required with seb_drainage_enable and must be > 0; giving it otherwise stops at start-up. -1 = not given.

Referenced by check_seb_hydrology(), and init_params().

◆ seb_drainage_enable

bool RadChoice::seb_drainage_enable = false

Gravitational drainage of the soil column toward field capacity (Mahfouf and Noilhan 1996, Eq. 4) at the rate C_3 / (1 day): their Table 1 gives C_3 for a 1-day restore period, so seb_restore_timescale_s does not enter. Needs seb_deep_prognostic_enable, seb_drainage_c3_m and a field capacity (seb_soil_moisture_fc or seb_soil_type); init_params() stops otherwise. Default false.

Referenced by check_seb_hydrology(), and init_params().

◆ seb_enable

◆ seb_grdflx_default

amrex::Real RadChoice::seb_grdflx_default = 0.0

Fallback SEB ground heat flux [W/m^2]. The force-restore restoring term already represents the flux into the soil, so a nonzero value with seb_prognostic_enable counts that flux twice.

Referenced by TwoStreamRadiation::advance(), TwoStreamRadiation::define_level(), and init_params().

◆ seb_hfx_default

amrex::Real RadChoice::seb_hfx_default = 0.0

Fallback SEB sensible heat flux [W/m^2].

Referenced by TwoStreamRadiation::advance(), TwoStreamRadiation::define_level(), and init_params().

◆ seb_init_skin_from_file

bool RadChoice::seb_init_skin_from_file = false

At a fresh start, the skin temperature T_s of a land column begins at the skin temperature of the initial file (TSK of a wrfinput file, SKINTEMP of a metgrid file) in place of rad_t_sfc. A water column keeps rad_t_sfc. Requires seb_prognostic_enable (without it T_s is reset to rad_t_sfc at every radiation step) and an initial file with the field; a land value that is not finite or lies outside [seb_prognostic_t_min_k, seb_prognostic_t_max_k] stops the run. Not used on a restart: the checkpoint holds T_s. Default false: every column begins at rad_t_sfc.

Referenced by init_params().

◆ seb_init_soil_moisture_from_file

bool RadChoice::seb_init_soil_moisture_from_file = false

At a fresh start, the soil water of a land column is the soil moisture profile of the wrfinput file (SMOIS, with the layer thicknesses DZS) in place of seb_q_sfc_default and seb_q_deep_default: q_s is the thickness-weighted mean over the top seb_moisture_layer_depth_m, q_deep the mean over the top seb_deep_layer_depth_m (ERF_SEBSoilInit.H). A water column keeps the defaults. q_deep is then part of the state of the balance: it is not reset to seb_q_deep_default, it follows the grids through a regrid and it is written to the checkpoint and read back. Without seb_deep_prognostic_enable a column holds its q_deep for the run; with it the file's value is the first value of the reservoir. Requires seb_prognostic_enable and a wrfinput file with SMOIS and DZS whose layers reach seb_deep_layer_depth_m; a land mean that is not finite, lies outside [seb_prognostic_q_min, seb_prognostic_q_max] or, with a porosity, above it stops the run. Default false: q_s and q_deep begin at the defaults in every column.

Referenced by check_seb_hydrology(), init_params(), and TwoStreamRadiation::seb_q_deep_is_state().

◆ seb_init_t_deep_from_file

bool RadChoice::seb_init_t_deep_from_file = false

At a fresh start, the deep (restoring) temperature T_deep of a land column is the deep soil temperature of the wrfinput file (TMN) in place of seb_t_deep_default. A water column keeps seb_t_deep_default. T_deep is then part of the state of the balance: it is not reset to seb_t_deep_default, it follows the grids through a regrid and it is written to the checkpoint and read back. Without seb_deep_prognostic_enable a column holds its value for the run; with it the file's value is the first value of the evolving T_deep. Requires seb_prognostic_enable and a wrfinput file with TMN; a land value that is not finite or lies outside [seb_prognostic_t_min_k, seb_prognostic_t_max_k] stops the run. Default false: T_deep is seb_t_deep_default in every column.

Referenced by init_params(), and TwoStreamRadiation::seb_t_deep_is_state().

◆ seb_land_roughness

amrex::Real RadChoice::seb_land_roughness = -1.0

Land roughness length [m] the coupled surface layer takes when erf.most.z0 is not given (derived, not an input): with seb_surface_layer_uses_skin and seb_soil_type, f_veg Z0MVT + (1 - f_veg) Z0SOIL from Noah-MP's tables (f_veg = 0 without seb_vegetation_type); -1 otherwise. ERF::InitData_post hands it to the zlo surface layer as it builds it (SurfaceLayer::set_default_roughness).

Referenced by init_params().

◆ seb_leaf_area_index

amrex::Real RadChoice::seb_leaf_area_index = -1.0

Leaf area index [m^2/m^2] of the vegetated fraction (seb_vegetation_type; giving it otherwise stops at start-up). Default: the land-use category's monthly values interpolated to the run's start date and time (start_datetime), as Noah-MP does with its table LAI (noahmp_day_of_year: day 0 at 00:00 on 1 January), shifted half a year when erf.rad_cons_lat < 0 (one latitude for the domain, where Noah-MP uses each column's); fixed for the run.

Referenced by init_params().

◆ seb_lh_default

amrex::Real RadChoice::seb_lh_default = 0.0

Fallback SEB latent heat flux [W/m^2].

Referenced by TwoStreamRadiation::advance(), TwoStreamRadiation::define_level(), and init_params().

◆ seb_lw_flux_default

amrex::Real RadChoice::seb_lw_flux_default = 0.0

Fallback SEB surface net longwave flux [W/m^2].

Referenced by TwoStreamRadiation::advance(), TwoStreamRadiation::define_level(), and init_params().

◆ seb_moisture_layer_depth_m

amrex::Real RadChoice::seb_moisture_layer_depth_m = 0.1

Effective surface moisture layer depth [m]. Used in force-restore prognostic q_s equation: dq_s/dt = -(LE/(L_v*rho_w*d_s)) - (1/tau_q)*(q_s - q_deep). Default 0.1 m represents a thin surface-active moisture layer. Only used when seb_prognostic_enable=true. Must be > 0: init_params() stops otherwise.

Referenced by TwoStreamRadiation::advance(), check_seb_hydrology(), and init_params().

◆ seb_moisture_restore_timescale_s

amrex::Real RadChoice::seb_moisture_restore_timescale_s = 86400.0

Force-restore timescale for surface moisture [s]. Relaxation time constant toward q_deep in prognostic q_s equation. Default 86400.0 s (1 day) provides weak damping on diurnal timescales. Only used when seb_prognostic_enable=true. Must be > 0: init_params() stops otherwise.

Referenced by TwoStreamRadiation::advance(), and init_params().

◆ seb_precipitation_source

SEBPrecipitationSource RadChoice::seb_precipitation_source = SEBPrecipitationSource::None

Rain into the force-restore surface (ERF_ForceRestoreHydrology.H). Default none: the balance as before. microphysics needs seb_prognostic_enable, a microphysics scheme with surface precipitation, and a porosity (seb_soil_porosity or seb_soil_type): water above it runs off.

Referenced by check_seb_hydrology(), check_seb_snow(), init_params(), and seb_hydrology_enabled().

◆ seb_prognostic_enable

bool RadChoice::seb_prognostic_enable = false

Enable prognostic SEB surface temperature and moisture evolution. When true, integrates SEB residual forward in time to evolve T_s and q_s using force-restore formulation. When false (default), no prognostic update occurs. Requires seb_enable=true and seb_diagnostic_enable=true; auto-enables internally if needed. Only active when Noah-MP is NOT driving LSM fields at that level.

Referenced by TwoStreamRadiation::advance(), check_seb_hydrology(), check_seb_snow(), init_params(), TwoStreamRadiation::seb_prognostic_active(), TwoStreamRadiation::seb_q_deep_is_state(), and TwoStreamRadiation::seb_t_deep_is_state().

◆ seb_prognostic_q_max

amrex::Real RadChoice::seb_prognostic_q_max = 1.0

Maximum clamping bound for prognostic surface moisture [kg/kg]. After each Euler update, q_s is clamped to [seb_prognostic_q_min, seb_prognostic_q_max]. Default 1.0 kg/kg ensures physically meaningful moisture. Only used when seb_prognostic_enable=true.

Referenced by TwoStreamRadiation::advance(), check_seb_hydrology(), and init_params().

◆ seb_prognostic_q_min

amrex::Real RadChoice::seb_prognostic_q_min = 0.0

Minimum clamping bound for prognostic surface moisture [kg/kg]. After each Euler update, q_s is clamped to [seb_prognostic_q_min, seb_prognostic_q_max]. Default 0.0 kg/kg prevents negative moisture. Only used when seb_prognostic_enable=true.

Referenced by TwoStreamRadiation::advance(), and init_params().

◆ seb_prognostic_t_max_k

amrex::Real RadChoice::seb_prognostic_t_max_k = 340.0

Maximum clamping bound for prognostic surface temperature [K]. After each Euler update, T_s is clamped to [seb_prognostic_t_min_k, seb_prognostic_t_max_k]. Default 340.0 K (above typical surface temperatures, but prevents unrealistic excursions). Only used when seb_prognostic_enable=true.

Referenced by TwoStreamRadiation::advance(), and init_params().

◆ seb_prognostic_t_min_k

amrex::Real RadChoice::seb_prognostic_t_min_k = 200.0

Minimum clamping bound for prognostic surface temperature [K]. After each Euler update, T_s is clamped to [seb_prognostic_t_min_k, seb_prognostic_t_max_k] to prevent instability if dt is large relative to C_s/tau. Default 200.0 K (far below realistic surface temperatures). Only used when seb_prognostic_enable=true.

Referenced by TwoStreamRadiation::advance(), check_seb_snow(), and init_params().

◆ seb_q_deep_default

amrex::Real RadChoice::seb_q_deep_default = 0.0

Deep soil moisture the prognostic q_s restores to, in q_s's units (see seb_q_sfc_default).

Referenced by TwoStreamRadiation::advance(), check_seb_hydrology(), TwoStreamRadiation::define_level(), and init_params().

◆ seb_q_sfc_default

amrex::Real RadChoice::seb_q_sfc_default = 0.0

Fallback SEB surface moisture, and the initial value of the prognostic one. With seb_prognostic_enable q_s follows prognostic_dqs_dt, a volumetric water content [m^3/m^3] of the top seb_moisture_layer_depth_m of soil; with a land model that has one, the balance shows the land model's 2 m mixing ratio [kg/kg] instead.

Referenced by TwoStreamRadiation::advance(), check_seb_hydrology(), TwoStreamRadiation::define_level(), and init_params().

◆ seb_restore_timescale_s

amrex::Real RadChoice::seb_restore_timescale_s = 86400.0

Force-restore timescale for surface temperature [s]. Relaxation time constant toward T_deep in prognostic T_s equation. Default 86400.0 s (1 day) provides weak damping on diurnal timescales. Only used when seb_prognostic_enable=true. Must be > 0: init_params() stops otherwise. With seb_deep_prognostic_enable it is also the relaxation time of T_deep toward T_s (Noilhan and Planton 1989, Eq. 6). The drainage does not use it (seb_drainage_enable).

Referenced by TwoStreamRadiation::advance(), and init_params().

◆ seb_snow_albedo

amrex::Real RadChoice::seb_snow_albedo = 0.70

Snow albedo alpha_n -. Must be in [0, 1]; given without seb_snow_enable stops at start-up.

Referenced by check_seb_snow(), and init_params().

◆ seb_snow_critical_swe_kg_m2

amrex::Real RadChoice::seb_snow_critical_swe_kg_m2 = 10.0

Critical snow water equivalent W_crn [kg/m^2] of the snow cover fraction p_ng = W_n / (W_n + W_crn) (Douville et al. 1995, Eq. 7; their 10 mm). Must be finite and > 0; given without seb_snow_enable stops at start-up.

Referenced by check_seb_snow(), and init_params().

◆ seb_snow_enable

bool RadChoice::seb_snow_enable = false

One bulk snow layer on the force-restore surface (ERF_ForceRestoreSnow.H): the snow routine of the ISBA scheme as in Douville, Royer and Mahfouf (1995), Sec. 2.1, for bare ground. Frozen surface precipitation (snow, graupel, hail; for WSM6 and WDM6 also the cloud ice that fell out) builds a snow water equivalent; the snow raises the surface albedo, sublimates, and melts where the balance takes T_s above 273.16 K, with the melt water going to the soil as rain. Needs seb_prognostic_enable, seb_use_radiation_fluxes, seb_precipitation_source = microphysics, no surface_albedo_sw_diffuse, no seb_vegetation_type and seb_prognostic_t_min_k at or below 273.16; init_params() stops otherwise. Default false: the surface has no snow and results are unchanged.

Referenced by TwoStreamRadiation::advance(), check_seb_snow(), and init_params().

◆ seb_snow_initial_swe_kg_m2

amrex::Real RadChoice::seb_snow_initial_swe_kg_m2 = 0.0

Snow water equivalent at the start of the run [kg/m^2], every column, every level. Must be finite and >= 0; given without seb_snow_enable stops at start-up. A water column of the land mask loses it at the first step.

Referenced by check_seb_snow(), and init_params().

◆ seb_soil_moisture_fc

amrex::Real RadChoice::seb_soil_moisture_fc = 0.329

Field capacity [m^3/m^3]: at or above it the soil-water factor is 1, so without seb_soil_type the surface evaporates at the potential rate (seb_surface_layer_uses_moisture; giving it otherwise stops at start-up). Default 0.329, Noah-MP's loam (REFSMC, STAS soil type 6).

Referenced by check_seb_hydrology(), and init_params().

◆ seb_soil_moisture_wilt

amrex::Real RadChoice::seb_soil_moisture_wilt = 0.066

Wilting point [m^3/m^3]: at or below it the soil-water factor is 0, so the vegetation does not transpire and, without seb_soil_type, the surface does not evaporate (with one, the bare soil's nearly dry pore air keeps it near zero) (seb_surface_layer_uses_moisture; giving it otherwise stops at start-up). Default 0.066, Noah-MP's loam (WLTSMC, STAS soil type 6).

Referenced by init_params().

◆ seb_soil_porosity

amrex::Real RadChoice::seb_soil_porosity = -1.0

Porosity w_sat [m^3/m^3] of the force-restore soil: above it, water runs off. Needed with seb_precipitation_source = microphysics or seb_deep_prognostic_enable; with seb_soil_type it is Noah-MP's MAXSMC and giving it stops at start-up. In (0, 1]; with seb_drainage_enable also above field capacity; at or above seb_q_sfc_default (and seb_q_deep_default with the deep reservoir); with rain, at or below seb_prognostic_q_max. -1 = not given.

Referenced by check_seb_hydrology(), and init_params().

◆ seb_soil_type

int RadChoice::seb_soil_type = 0

Noah-MP soil category (STAS, 1-19, not 14 (water), as in NoahmpTable.TBL; see ERF_NoahMPSoilTable.H). The balance takes its wilting point (WLTSMC) and field capacity (REFSMC) – giving either seb_soil_moisture_wilt or seb_soil_moisture_fc as well is an error –, the surface heat capacity of the soil unless seb_surface_heat_capacity is given, with seb_surface_layer_uses_moisture the bare-soil resistance (vegetation or not), and with seb_surface_layer_uses_skin the surface layer's land roughness unless erf.most.z0 is given. 0 (the default): none of these.

Referenced by check_seb_hydrology(), and init_params().

◆ seb_surface_heat_capacity

amrex::Real RadChoice::seb_surface_heat_capacity = 2.0e4

Effective surface heat capacity [J/(m^2*K)]. Used in force-restore prognostic T_s equation: dT_s/dt = SEB_residual / C_s - (2*pi/tau)*(T_s - T_deep). Default 2.0e4 J/(m^2*K) represents a thin surface-active layer. With seb_soil_type it is derived from Noah-MP's soil instead (seb_force_restore_heat_capacity of the soil's heat capacity and conductivity at seb_q_sfc_default, over seb_restore_timescale_s) unless it is given explicitly. Only used when seb_prognostic_enable=true. Must be > 0: init_params() stops otherwise.

Referenced by TwoStreamRadiation::advance(), and init_params().

◆ seb_surface_layer_uses_moisture

bool RadChoice::seb_surface_layer_uses_moisture = false

Two-way coupling of moisture as well: the surface layer takes its land surface mixing ratio from the balance's surface water, so its moisture flux follows the soil and dries as the balance's q_s does. Without seb_soil_type it is beta * q_sat(T_s, p_s) + (1 - beta) * q_air with beta the soil-water factor clamp((q_s - seb_soil_moisture_wilt) / (seb_soil_moisture_fc - seb_soil_moisture_wilt), 0, 1). With seb_soil_type, the bare soil evaporates from its pore air (Noah-MP's relative humidity exp(psi g / (R_v T_s)) times q_sat) through Noah-MP's bare-soil resistance, and with seb_vegetation_type the canopy transpires through its own, each in series with the aerodynamic one (erf_surface_moisture::two_source_surface_mixing_ratio). q_s is then the volumetric water content [m^3/m^3] of the top seb_moisture_layer_depth_m of soil. Requires seb_surface_layer_uses_skin. Default false: the surface layer keeps its own surface moisture (erf.most.surf_moist).

Referenced by TwoStreamRadiation::define_level(), and init_params().

◆ seb_surface_layer_uses_skin

bool RadChoice::seb_surface_layer_uses_skin = false

Two-way coupling with the zlo surface layer: the surface layer takes its land surface temperature from the SEB's prognostic skin temperature T_s (converted to potential temperature), so its sensible heat flux responds to T_s. Requires seb_prognostic_enable and seb_turbulent_flux_source = surface_layer. Default false: the surface layer keeps its own temperature.

Referenced by init_params().

◆ seb_sw_flux_default

amrex::Real RadChoice::seb_sw_flux_default = 0.0

Fallback SEB surface net shortwave flux [W/m^2].

Referenced by TwoStreamRadiation::advance(), TwoStreamRadiation::define_level(), and init_params().

◆ seb_t_deep_default

amrex::Real RadChoice::seb_t_deep_default = 300.0

SEB deep soil temperature [K] of every column; with seb_init_t_deep_from_file, of the water columns and of a restart from a checkpoint without the deep temperature.

Referenced by TwoStreamRadiation::advance(), TwoStreamRadiation::define_level(), and init_params().

◆ seb_turbulent_flux_source

SEBTurbulentFluxSource RadChoice::seb_turbulent_flux_source = SEBTurbulentFluxSource::SurfaceLayer

Source of the SEB's sensible and latent heat fluxes when no land-surface model supplies them: "surface_layer" (default) or "defaults". See SEBTurbulentFluxSource.

Referenced by TwoStreamRadiation::advance(), and init_params().

◆ seb_use_radiation_fluxes

bool RadChoice::seb_use_radiation_fluxes = false

Take the SEB's net surface shortwave and longwave fluxes from the two-stream sweep itself (per column, absorbed fluxes positive) wherever the LSM does not expose them. When false (default) those fluxes are the LSM fields or, without an LSM, the seb_sw_flux_default and seb_lw_flux_default constants. Sensible, latent and ground heat fluxes are unaffected.

Referenced by TwoStreamRadiation::advance(), check_seb_snow(), and init_params().

◆ seb_vegetation_fraction

amrex::Real RadChoice::seb_vegetation_fraction = 1.0

Vegetated fraction of the surface [0, 1] (seb_vegetation_type; giving it otherwise stops at start-up). Default 1.

Referenced by init_params().

◆ seb_vegetation_type

int RadChoice::seb_vegetation_type = 0

Noah-MP land-use category (modified IGBP MODIS, 1-20 except the unvegetated 15, 16 and 17, as in NoahmpTable.TBL; see ERF_NoahMPVegetationTable.H) of the vegetated fraction. With it, the surface's moisture availability comes from a canopy resistance (Jarvis, Noah-MP's parameters RS, RGL, HS, TOPT, RSMAX) for the vegetated fraction and a bare-soil resistance (Noah-MP's Sakaguchi-Zeng form, on seb_soil_type) for the rest, each in series with the aerodynamic one. Needs seb_surface_layer_uses_moisture and seb_soil_type. 0 (the default): bare soil, the soil's resistance alone (f_veg = 0).

Referenced by check_seb_snow(), and init_params().

◆ single_scattering_albedo

amrex::Real RadChoice::single_scattering_albedo = 0.0

Clear-sky (background gas) single-scattering albedo in [0, 1] for the SW diffuse (scattering) two-stream calculation. Default 0.0 means the clear-sky column is purely absorbing, and the diffuse SW contribution from the clear-sky column is exactly zero — reducing exactly to the direct-beam-only result. Only used by the two-stream model and sw_enabled == true.

Referenced by init_params().

◆ surface_albedo_sw

amrex::Real RadChoice::surface_albedo_sw = 0.3

Shortwave surface albedo fallback [0, 1] for per-column heterogeneous-surface-property resolution. Used when per-column LSM/radiation interface albedo field is unavailable or invalid. Default 0.3 represents typical land/water reflectivity. Only used when hetero surface fields not present or disabled.

Referenced by TwoStreamRadiation::advance(), TwoStreamRadiation::define_level(), and init_params().

◆ surface_albedo_sw_diffuse

amrex::Real RadChoice::surface_albedo_sw_diffuse = -1.0

Shortwave surface albedo for diffuse light [0,1]. A negative value (default) uses surface_albedo_sw for both direct and diffuse light.

Referenced by check_seb_snow(), and init_params().

◆ surface_emissivity_lw

amrex::Real RadChoice::surface_emissivity_lw = 0.99

Longwave surface emissivity fallback [0, 1] for per-column heterogeneous-surface-property resolution. Used when per-column LSM/radiation interface emissivity field is unavailable or invalid. Default 0.99 represents typical land/water/ice emissivity (nearly blackbody). Only used when hetero surface fields not present or disabled.

Referenced by TwoStreamRadiation::advance(), TwoStreamRadiation::define_level(), and init_params().

◆ sw_cloud_g

amrex::Real RadChoice::sw_cloud_g = 0.85

Mass model, SW: cloud-water asymmetry factor.

Referenced by init_params().

◆ sw_cloud_omega

amrex::Real RadChoice::sw_cloud_omega = 0.9999

Mass model, SW: cloud-water single-scattering albedo.

Referenced by init_params().

◆ sw_enabled

bool RadChoice::sw_enabled = true

Enable shortwave (solar) radiation computation. Only used by the two-stream model.

Referenced by TwoStreamRadiation::advance(), and init_params().

◆ sw_kabs_dry

amrex::Real RadChoice::sw_kabs_dry = 4.0e-6

Mass model, SW: dry-air gray absorption coefficient [m^2/kg].

Referenced by init_params().

◆ sw_kabs_vapor

amrex::Real RadChoice::sw_kabs_vapor = 4.0e-3

Mass model, SW: water-vapor gray absorption coefficient [m^2/kg].

Referenced by init_params().

◆ sw_kext_cloud

amrex::Real RadChoice::sw_kext_cloud = 150.0

Mass model, SW: cloud-water extinction coefficient m^2/kg.

Referenced by init_params().

◆ sw_kscat_dry

amrex::Real RadChoice::sw_kscat_dry = 3.0e-6

Mass model, SW: dry-air (Rayleigh) scattering coefficient [m^2/kg], omega = 1, g = 0.

Referenced by init_params().

◆ tau_lw_coeff_qc

amrex::Real RadChoice::tau_lw_coeff_qc = 0.0

Longwave optical depth coefficient for cloud liquid water [dimensionless]. Default 0.0. When both coefficients are 0, dynamic path still invoked but yields tau_lw_per_layer unchanged. Only used when tau_lw_dynamic_enable == true.

Referenced by init_params().

◆ tau_lw_coeff_qv

amrex::Real RadChoice::tau_lw_coeff_qv = 0.0

Longwave optical depth coefficient for water vapor [dimensionless]. Dynamic LW tau = tau_lw_coeff_qv * qv + tau_lw_coeff_qc * qc + tau_lw_per_layer. Default 0.0 means tau is purely from static tau_lw_per_layer (no dynamic component). Only used when tau_lw_dynamic_enable == true.

Referenced by init_params().

◆ tau_lw_dynamic_enable

bool RadChoice::tau_lw_dynamic_enable = false

Enable dynamic longwave optical depth diagnosis from moisture/clouds. When true, LW optical depth is computed per-level from qv and qc. When false (default), uses the static tau_lw_per_layer. Only used by the two-stream model and lw_enabled == true.

Referenced by init_params().

◆ tau_lw_per_layer

amrex::Real RadChoice::tau_lw_per_layer = 1.0

Longwave optical depth per layer (constant for all layers). Used in gray-gas LW two-stream solver. Only used by the two-stream model.

Referenced by init_params().

◆ tau_model

TauModel RadChoice::tau_model = TauModel::PerLayer

Optical depth model: "per_layer" (default, fixed tau per layer) or "mass" (from the layer mass path in both bands; see TauModel).

Referenced by init_params().

◆ tau_per_layer

amrex::Real RadChoice::tau_per_layer = 0.05

Shortwave optical depth per layer (constant for all layers). Used in Beer-Lambert direct-beam formula. Only used by the two-stream model.

Referenced by init_params().

◆ tau_profile_type

TauProfileType RadChoice::tau_profile_type = TauProfileType::Constant

Optical depth profile type: "constant" (default, the thickness-independent tau) or "cloud_layer" (adds height-varying cloud optical depth between cloud_base_height_m and cloud_top_height_m).

Referenced by init_params().

◆ tau_sw_coeff_qc

amrex::Real RadChoice::tau_sw_coeff_qc = 0.0

Shortwave optical depth coefficient for cloud liquid water [dimensionless]. Default 0.0. When both coefficients are 0, dynamic path still invoked but yields tau_per_layer unchanged. Only used when tau_sw_dynamic_enable == true.

Referenced by init_params().

◆ tau_sw_coeff_qv

amrex::Real RadChoice::tau_sw_coeff_qv = 0.0

Shortwave optical depth coefficient for water vapor [dimensionless]. Dynamic SW tau = tau_sw_coeff_qv * qv + tau_sw_coeff_qc * qc + tau_per_layer. Default 0.0 means tau is purely from static tau_per_layer (no dynamic component). Only used when tau_sw_dynamic_enable == true.

Referenced by init_params().

◆ tau_sw_dynamic_enable

bool RadChoice::tau_sw_dynamic_enable = false

Referenced by init_params().

◆ verbosity

int RadChoice::verbosity = 0

Debug verbosity level (0=off, 1+=debug output). Gated debug prints only emit when this is >= 1.

Referenced by TwoStreamRadiation::advance(), and init_params().


The documentation for this struct was generated from the following file: