|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
Where the simplified surface energy balance takes its sensible (H) and latent (LE) heat fluxes from. More...


Go to the source code of this file.
Enumerations | |
| enum class | SEBFluxOrigin { LandSurface , SurfaceLayer , Default } |
| Which of the three sources a field was filled from. More... | |
| enum class | SEBTurbulentFlux { Sensible , Latent } |
| The turbulent flux being filled: selects the unit conversion. More... | |
Functions | |
| SEBFluxOrigin | select_seb_flux_origin (bool land_surface_field_present, SEBTurbulentFluxSource source, bool surface_layer_flux_present) noexcept |
| The precedence rule: land-surface field, then surface layer, then default. More... | |
| SEBFluxOrigin | fill_seb_turbulent_flux (amrex::MultiFab &seb_flux, SEBTurbulentFlux kind, const amrex::MultiFab *land_surface_field, const amrex::MultiFab *surface_layer_flux, int surface_k, SEBTurbulentFluxSource source, amrex::Real fallback) |
| Fill the SEB's H or LE [W/m^2] on the valid cells of seb_flux. More... | |
| void | fill_seb_field_from_land_surface (amrex::MultiFab &seb_field, const amrex::MultiFab *field, amrex::Real fallback, amrex::Real scale=amrex::Real(1.0), const amrex::MultiFab *add_field=nullptr) |
| Fill one 2D surface-energy-balance input from land-surface model fields, cell by cell. More... | |
Where the simplified surface energy balance takes its sensible (H) and latent (LE) heat fluxes from.
The force-restore update removes H + LE from the ground. The air above receives the flux the lower surface layer applies, which it computes from the same skin temperature. Unless the two are the same flux the ground never loses what the air gains, so by default the balance takes the surface layer's flux.
Precedence, per field, per level and per cell:
The surface-layer flux is the conservative flux on the lowest z face (rho w'theta' and rho w'qv'), converted to W/m^2 by the same helpers as the sensible_heat_flux and latent_heat_flux 2D outputs, so the two cannot disagree. Positive is away from the surface, as in the balance.
|
strong |
|
strong |
| void fill_seb_field_from_land_surface | ( | amrex::MultiFab & | seb_field, |
| const amrex::MultiFab * | field, | ||
| amrex::Real | fallback, | ||
| amrex::Real | scale = amrex::Real(1.0), |
||
| const amrex::MultiFab * | add_field = nullptr |
||
| ) |
Fill one 2D surface-energy-balance input from land-surface model fields, cell by cell.
Each valid cell of seb_field is set to scale * field + add_field where both values are valid land-surface values (is_valid_lsm_value), and to fallback elsewhere. A land model leaves the lsm_undefined placeholder in cells it does not process (Noah-MP: open water and sea ice) and everywhere before its first step, which runs after the first radiation call; those cells take the scalar default rather than the placeholder. The halo always holds the fallback; only valid cells take land-surface values.
| [out] | seb_field | 2D SEB field (k = 0), laid out like the land-surface fields |
| [in] | field | land-surface field, or nullptr |
| [in] | fallback | the scalar default |
| [in] | scale | factor on field (Noah-MP's fira is positive upward; the balance wants the absorbed flux, so -1) |
| [in] | add_field | second land-surface field added on top, or nullptr (Noah-MP splits the absorbed shortwave into sav and sag) |
| SEBFluxOrigin fill_seb_turbulent_flux | ( | amrex::MultiFab & | seb_flux, |
| SEBTurbulentFlux | kind, | ||
| const amrex::MultiFab * | land_surface_field, | ||
| const amrex::MultiFab * | surface_layer_flux, | ||
| int | surface_k, | ||
| SEBTurbulentFluxSource | source, | ||
| amrex::Real | fallback | ||
| ) |
Fill the SEB's H or LE [W/m^2] on the valid cells of seb_flux.
The selected values go to the valid cells; the halo always holds the fallback. The force-restore update, the residual diagnostic and the seb_hfx/seb_lh outputs read valid cells only. A consumer that needs neighbouring values in the halo must fill it first (FillBoundary).
| [out] | seb_flux | 2D SEB field (k = 0), laid out like the level's state |
| [in] | kind | sensible or latent |
| [in] | land_surface_field | land-surface field of that name, or nullptr; cells holding no valid value take the next source |
| [in] | surface_layer_flux | conservative z-face flux the surface layer applies (rho w'theta' or rho w'qv'), or nullptr |
| [in] | surface_k | z index of the surface face in surface_layer_flux |
| [in] | source | erf.radiation.seb_turbulent_flux_source |
| [in] | fallback | the scalar default [W/m^2] |
|
inlinenoexcept |
The precedence rule: land-surface field, then surface layer, then default.
| [in] | land_surface_field_present | a land-surface model exposes the field |
| [in] | source | erf.radiation.seb_turbulent_flux_source |
| [in] | surface_layer_flux_present | the surface layer applies this flux |
Referenced by fill_seb_turbulent_flux().
