Ground heat flux
This page is a work in progress. If you have any questions or notice any errors, please raise an issue.
Overview
The ground heat flux $G$ (W/m²) is the energy flux across the top of the ground (soil) column. It is the term through which the surface energy balance influences the heat balance of the soil. Without snow, the ground_heat_flux field is the Neumann boundary condition on the soil's internal energy (see SoilHeatFlux), and with snow it feeds the blended conductive flux across the snow base.
Following the standard convention of Terrarium and Oceananigans, all surface energy fluxes are defined positive upward. A positive $G$ therefore removes energy from the ground column.
The quantity that the rest of the surface energy balance demands of the ground is the residual of the remaining three flux terms,
\[G^\star = R_{\text{net}} + H_s + H_l\]
where $G^\star$ is the ground heat flux demanded by the SEB, $R_{\text{net}}$ is the net radiation budget, $H_s$ is the sensible heat flux, and $H_l$ is the latent heat flux. How that demand is realized, and whether it is imposed at all, is the responsibility of the AbstractGroundHeatFlux sub-process.
Terrarium.AbstractGroundHeatFlux — Type
Base type for ground heat flux schemes, i.e. schemes that determine the energy flux G across the top of the ground (soil) column. All fluxes are positive upward.
Implementations
Diagnosed ground heat flux
Terrarium.DiagnosedGroundHeatFlux — Type
struct DiagnosedGroundHeatFlux{NF} <: Terrarium.AbstractGroundHeatFlux{NF}Ground heat flux G diagnosed from the rest of the surface energy balance. With all fluxes positive upward (aligned with +z), the energy arriving at the skin from below must balance the radiative and turbulent losses above, so the atmosphere-side demand is the residual G = R_net + H_s + H_l.
How that demand is realized depends on the skin temperature scheme: PrescribedSkinTemperature does not calculate G as a conductive flux and stores the demand, whereas ImplicitSkinTemperature stores the explicit conductive flux 2κ_g (T_g - T_s) / Δz_g evaluated at the current skin temperature, which coincides with the demand only at convergence.
DiagnosedGroundHeatFlux closes the surface energy balance internally. How the corresponding heat flux is calculated depends on the associated skin temperature scheme:
- With
PrescribedSkinTemperature, there is no separate conduction target, so the ground heat flux is simply equal to the demand, $G = G^\star = R_{\text{net}} + H_s + H_l$. - With
ImplicitSkinTemperature, the stored flux is the explicit bare-ground conductive flux evaluated at the current skin temperature, $G = 2\kappa_s (T_g - T_s) / \Delta z_1$. This coincides with the demand only at convergence of the skin temperature solve (see Skin temperature).
variables(DiagnosedGroundHeatFlux(Float32))Variables
├─ Prognostic:
├─ Auxiliary:
├── ground_heat_flux [W m^-2] on XY{Center, Center, Terrarium.Coordinate{typeof(lastindex), Face}} of the ground domain
├─ Inputs:
├─ Namespaces:
Prescribed ground heat flux
Terrarium.PrescribedGroundHeatFlux — Type
struct PrescribedGroundHeatFlux{NF} <: Terrarium.AbstractGroundHeatFlux{NF}Ground heat flux G supplied externally as an input variable, for example assembled by a coupler from the atmosphere-side surface energy budget. Nothing is computed: compute_ground_heat_flux! is a no-op, so whatever was written into the ground_heat_flux is passed on directly the ground (soil) top boundary condition. The same positive-upward convention applies as for DiagnosedGroundHeatFlux.
Note that with all four surface fluxes prescribed, the residual identity G = R_net + H_s + H_l is not enforced by construction; it is the caller's responsibility to supply a consistent set.
PrescribedGroundHeatFlux declares ground_heat_flux as an input variable and computes nothing. Whatever is written into the field (e.g. by a land-atmosphere coupler), is not modified by compute_auxiliary!. This is the configuration that makes PrescribedSurfaceEnergyBalance possible; see Surface energy balance for the supported combinations.
variables(PrescribedGroundHeatFlux(Float32))Variables
├─ Prognostic:
├─ Auxiliary:
├─ Inputs:
├── ground_heat_flux [W m^-2] on XY{Center, Center, Terrarium.Coordinate{typeof(lastindex), Face}} of the ground domain
├─ Namespaces:
PrescribedGroundHeatFlux is primarily intended for use with external land surface couplers. Thus, the energy balance $G = R_{\text{net}} + H_s + H_l$ is not enforced when the ground heat flux is prescribed alongside prescribed radiative and turbulent fluxes. It is the caller's responsibility to specify a consistent energy balance. Furthermore, use of PrescribedGroundHeatFlux with snow and canopy processes is not tested and may yield inconsistent results.
Process interface
Terrarium.compute_auxiliary! — Method
compute_auxiliary!(
state,
grid,
ghf::Terrarium.AbstractGroundHeatFlux,
seb::Terrarium.AbstractSurfaceEnergyBalance,
args...
)Methods
Terrarium.ground_heat_flux — Method
ground_heat_flux(i, j, grid, fields, ::AbstractGroundHeatFlux)Return the current ground heat flux at the given indices.
Terrarium.compute_ground_heat_flux_demand — Method
compute_ground_heat_flux_demand(
::DiagnosedGroundHeatFlux,
R_net,
H_s,
H_l
)Compute the residual ground heat flux that would close the surface energy balance. With all fluxes positive upward (aligned with +z), the energy arriving at the skin from below must balance the radiative and turbulent losses above, so G = R_net + H_s + H_l.
Terrarium.compute_ground_heat_flux! — Method
compute_ground_heat_flux!(
state,
grid,
ghf::Terrarium.AbstractGroundHeatFlux,
skinT::Terrarium.AbstractSkinTemperature,
seb::Terrarium.AbstractSurfaceEnergyBalance
)Compute and store ground_heat_flux on grid, dispatching on ghf and skinT to the type-specific kernel function. For PrescribedGroundHeatFlux this is a no-op, since the field is an input.
Kernel functions
Terrarium.compute_ground_heat_flux_demand — Method
compute_ground_heat_flux_demand(
i,
j,
grid,
fields,
ghf::DiagnosedGroundHeatFlux,
seb::Terrarium.AbstractSurfaceEnergyBalance
)Compute the ground heat flux demand at grid cell i, j: the flux implied by the radiative budget and the turbulent fluxes, G = R_net + H_s + H_l. This is the quantity the implicit skin temperature solve inverts its conduction relation against. The radiative and turbulent flux terms are read through the accessors of the seb sub-processes that own them.
Terrarium.compute_ground_heat_flux_demand — Method
compute_ground_heat_flux_demand(
i,
j,
grid,
fields,
ghf::PrescribedGroundHeatFlux,
::Terrarium.AbstractSurfaceEnergyBalance
)When the ground heat flux is prescribed, the demand is the prescribed flux; the surface energy budget is not re-closed from the radiative and turbulent terms.
Terrarium.compute_ground_heat_flux — Method
compute_ground_heat_flux(
i,
j,
grid,
fields,
ghf::DiagnosedGroundHeatFlux,
::PrescribedSkinTemperature,
seb::Terrarium.AbstractSurfaceEnergyBalance
)For PrescribedSkinTemperature, set the ground heat flux directly to the demand, i.e. G₀ = R_net + H_s + H_l.
Terrarium.compute_ground_heat_flux — Method
compute_ground_heat_flux(
i,
j,
grid,
fields,
::DiagnosedGroundHeatFlux,
skinT::ImplicitSkinTemperature,
::Terrarium.AbstractSurfaceEnergyBalance
)Compute the conductive ground heat flux from the current skin_temperature and ground_temperature.
Terrarium.compute_ground_heat_flux! — Method
compute_ground_heat_flux!(
out,
i,
j,
grid,
fields,
ghf::DiagnosedGroundHeatFlux,
skinT::Terrarium.AbstractSkinTemperature,
seb::Terrarium.AbstractSurfaceEnergyBalance
)Per-cell mutating variant used by the fused surface-energy-balance kernel: store the ground heat flux into the auxiliary output field out.