Surface energy balance
This page is a work in progress. If you have any questions or notice any errors, please raise an issue.
The surface energy balance (SEB) describes how solar radiation, thermal radiation, and heat fluxes interact at the interface between the land and the atmosphere. The SEB broadly consists of four key components: the net radiation budget $R_\text{net}$ (W/m²), sensible heat flux $H_s$ (W/m²), latent heat flux $H_l$ (W/m²), and ground heat flux $G$ (W/m²). The energy balance can be expressed as a simple sum of each flux term:
\[\begin{equation} R_{\text{net}} + H_s + H_l - G = 0\,. \end{equation}\]
Following the standard convention of Terrarium and Oceananigans, all surface energy fluxes are defined positive upward. The negative sign in front of $G$ reflects that heat flows towards the surface from the uppermost ground layer.
The SurfaceEnergyBalance process is responsible for computing all of the above flux terms and thus closing the energy balance between the atmosphere and land surface. Implementations of AbstractSurfaceEnergyBalance should generally include, at minimum, representations of each of the four SEB components:
- An implementation of
AbstractSkinTemperaturethat defines and updates the skin temperature $T_s$, the effective radiative temperature of the land surface. For an implicit approach, $T_s$ self-consistently satisfies the energy balance at each time step. For a prescribed approach, $T_s$ is given as input. See Skin temperature for further details. - An implementation of
AbstractGroundHeatFluxthat determines the ground heat flux $G$, either as the residual that closes the energy balance or as an externally supplied input. See Ground heat flux for further details. - An implementation of
AbstractRadiativeFluxesthat compute the partitioning of the radiation budget. The radiative energy budget $R_{\text{net}}$ is the sum of all incoming and outgoing radiative fluxes at the interface between the atmosphere and the land surface. This typically consists of both shortwave and longwave radiation bands. See Radiative fluxes for further details. - An implementation of
AbstractTurbulentFluxesthat compute the turbulent (sensible and latent) heat fluxes. Sensible and latent heat fluxes are driven by temperature and humidity gradients between the surface and atmosphere, quantified through bulk aerodynamic approaches. These fluxes depend on wind speed, atmospheric stability, surface roughness, and the availability of soil moisture. See Turbulent fluxes for further details. - A scheme for representing the albedo in the Radiative energy budget.
Terrarium.SurfaceEnergyBalance — Type
struct SurfaceEnergyBalance{NF, SkinTemperature<:Terrarium.AbstractSkinTemperature{NF}, RadiativeFluxes<:Terrarium.AbstractRadiativeFluxes{NF}, TurbulentFluxes<:Terrarium.AbstractTurbulentFluxes{NF}, GroundHeatFlux<:Terrarium.AbstractGroundHeatFlux{NF}, Albedo<:Terrarium.AbstractAlbedo{NF}} <: Terrarium.AbstractSurfaceEnergyBalance{NF}Standard implementation of the surface energy balance (SEB) that computes the radiative, turbulent, and ground energy fluxes at the surface. The SEB is also responsible for defining and solving the so-called skin temperature (effective emission temperature of the land surface) as well as the albedo.
Each flux group is an exchangeable sub-process with (at least) a Prescribed and a Diagnosed implementation, so that any subset of the surface fluxes may be supplied externally. Note that the type parameters are declared in the same order as the fields.
variables(SurfaceEnergyBalance(Float32))Variables
├─ Prognostic:
├── skin_temperature [°C] on XY{Center, Center, Nothing} of the surface domain
├─ Auxiliary:
├── albedo [-] on XY{Center, Center, Nothing} of the surface domain
├── emissivity [-] on XY{Center, Center, Nothing} of the surface domain
├── surface_shortwave_up [W m^-2] on XY{Center, Center, Nothing} of the surface domain
├── surface_longwave_up [W m^-2] on XY{Center, Center, Nothing} of the surface domain
├── surface_net_radiation [W m^-2] on XY{Center, Center, Nothing} of the surface domain
├── sensible_heat_flux [W m^-2] on XY{Center, Center, Nothing} of the surface domain
├── latent_heat_flux [W m^-2] on XY{Center, Center, Nothing} of the surface domain
├── ground_heat_flux [W m^-2] on XY{Center, Center, Terrarium.Coordinate{typeof(lastindex), Face}} of the ground domain
├─ Inputs:
├── ground_temperature [°C] on XY{Center, Center, Terrarium.Coordinate{typeof(lastindex), Center}} of the ground domain
├─ Namespaces:
SurfaceEnergyBalance allows you to mix and match which terms in the SEB are diagnosed vs. prescribed depending on the choice of implementation. While this has the potential to be convenient in cases where data on skin temperature or turbulent heat fluxes is available, it should be noted that this may result in surface energy fluxes that are inconsistent and do not fully satisfy the SEB equation.
Supported configurations
Every flux group is an exchangeable sub-process, so the coupling designs are configurations rather than distinct types. The combinations of skin temperature and ground heat flux differ in their solve sequencing, and not every pairing is well posed:
| Skin temperature | Ground heat flux | Meaning |
|---|---|---|
ImplicitSkinTemperature | DiagnosedGroundHeatFlux | Standalone Terrarium (the default). |
PrescribedSkinTemperature | DiagnosedGroundHeatFlux | Coupled hybrid: $G$ as the residual evaluated at the coupler's $T_s$. |
PrescribedSkinTemperature | PrescribedGroundHeatFlux | Fully prescribed; see PrescribedSurfaceEnergyBalance below. |
ImplicitSkinTemperature | PrescribedGroundHeatFlux | Back out $T_s$ from a supplied $G$ by inverting the conduction relation. |
Terrarium.PrescribedSurfaceEnergyBalance — Type
PrescribedSurfaceEnergyBalance{NF, Albedo}Type alias for a SurfaceEnergyBalance in which all four surface energy fluxes, i.e. the skin temperature, the radiative fluxes, the turbulent fluxes, and the ground heat flux, are supplied externally as input variables. This is the configuration used when an external coupler owns the atmosphere-land interface and Terrarium should not re-close the surface energy budget itself.
The albedo is deliberately left free: with prescribed radiative fluxes it only feeds a computation that is itself prescribed, so it is inert.
Terrarium.PrescribedSurfaceEnergyBalance — Method
PrescribedSurfaceEnergyBalance(
::Type{NF};
albedo::Terrarium.AbstractAlbedo
) where NF -> SurfaceEnergyBalanceConstruct a PrescribedSurfaceEnergyBalance with number format NF.
variables(PrescribedSurfaceEnergyBalance(Float32))Variables
├─ Prognostic:
├─ Auxiliary:
├── surface_net_radiation [W m^-2] on XY{Center, Center, Nothing} of the surface domain
├─ Inputs:
├── skin_temperature [°C] on XY{Center, Center, Nothing} of the surface domain
├── surface_shortwave_up [W m^-2] on XY{Center, Center, Nothing} of the surface domain
├── surface_longwave_up [W m^-2] on XY{Center, Center, Nothing} of the surface domain
├── sensible_heat_flux [W m^-2] on XY{Center, Center, Nothing} of the surface domain
├── latent_heat_flux [W m^-2] on XY{Center, Center, Nothing} of the surface domain
├── ground_heat_flux [W m^-2] on XY{Center, Center, Terrarium.Coordinate{typeof(lastindex), Face}} of the ground domain
├─ Namespaces:
A PrescribedSurfaceEnergyBalance lets an external coupler (e.g. an atmosphere model computing turbulent fluxes via Monin-Obukhov similarity theory) own the entire atmosphere-land interface: the skin temperature, the radiative and turbulent fluxes, and the ground heat flux are all supplied as inputs, and Terrarium does not re-close the surface energy budget. The coupler-assembled $G$ routes straight to the soil column's Neumann top boundary condition. A partially prescribed configuration (PrescribedSkinTemperature + PrescribedTurbulentFluxes with DiagnosedRadiativeFluxes and DiagnosedGroundHeatFlux) instead leaves Terrarium to close $G = R_\text{net} + H_s + H_l$ itself.
Process interface
Terrarium.compute_auxiliary! — Method
compute_auxiliary!(state, grid, seb::SurfaceEnergyBalance)
compute_auxiliary!(
state,
grid,
seb::SurfaceEnergyBalance,
vegetation::Union{Nothing, Terrarium.AbstractVegetation}
)
compute_auxiliary!(
state,
grid,
seb::SurfaceEnergyBalance,
vegetation::Union{Nothing, Terrarium.AbstractVegetation},
snow::Union{Nothing, Terrarium.AbstractSnow},
args...
)Methods
The SurfaceEnergyBalance process provides two primary method interfaces:
Terrarium.solve_surface_energy_balance! — Method
solve_surface_energy_balance!(
state,
grid,
seb::SurfaceEnergyBalance{NF, SkinTemperature, RadiativeFluxes, TurbulentFluxes, GroundHeatFlux, Albedo} where {SkinTemperature<:Terrarium.AbstractSkinTemperature{NF}, RadiativeFluxes<:Terrarium.AbstractRadiativeFluxes{NF}, TurbulentFluxes<:Terrarium.AbstractTurbulentFluxes{NF}, GroundHeatFlux<:Terrarium.AbstractGroundHeatFlux{NF}, Albedo<:Terrarium.AbstractAlbedo{NF}},
constants::PhysicalConstants,
atmos::Terrarium.AbstractAtmosphere
) where NF
solve_surface_energy_balance!(
state,
grid,
seb::SurfaceEnergyBalance{NF, SkinTemperature, RadiativeFluxes, TurbulentFluxes, GroundHeatFlux, Albedo} where {SkinTemperature<:Terrarium.AbstractSkinTemperature{NF}, RadiativeFluxes<:Terrarium.AbstractRadiativeFluxes{NF}, TurbulentFluxes<:Terrarium.AbstractTurbulentFluxes{NF}, GroundHeatFlux<:Terrarium.AbstractGroundHeatFlux{NF}, Albedo<:Terrarium.AbstractAlbedo{NF}},
constants::PhysicalConstants,
atmos::Terrarium.AbstractAtmosphere,
hydrology::Union{Nothing, Terrarium.AbstractSurfaceHydrology}
) where NF
solve_surface_energy_balance!(
state,
grid,
seb::SurfaceEnergyBalance{NF, SkinTemperature, RadiativeFluxes, TurbulentFluxes, GroundHeatFlux, Albedo} where {SkinTemperature<:Terrarium.AbstractSkinTemperature{NF}, RadiativeFluxes<:Terrarium.AbstractRadiativeFluxes{NF}, TurbulentFluxes<:Terrarium.AbstractTurbulentFluxes{NF}, GroundHeatFlux<:Terrarium.AbstractGroundHeatFlux{NF}, Albedo<:Terrarium.AbstractAlbedo{NF}},
constants::PhysicalConstants,
atmos::Terrarium.AbstractAtmosphere,
hydrology::Union{Nothing, Terrarium.AbstractSurfaceHydrology},
snow::Union{Nothing, Terrarium.AbstractSnow},
args...
) where NFSolve the surface energy balance for skin temperature on grid based on the current atmospheric and surface hydrology state.
Terrarium.compute_surface_energy_fluxes! — Method
compute_surface_energy_fluxes!(
state,
grid,
seb::SurfaceEnergyBalance,
constants::PhysicalConstants,
atmos::Terrarium.AbstractAtmosphere
)
compute_surface_energy_fluxes!(
state,
grid,
seb::SurfaceEnergyBalance,
constants::PhysicalConstants,
atmos::Terrarium.AbstractAtmosphere,
hydrology::Union{Nothing, Terrarium.AbstractSurfaceHydrology},
args...
)Compute the surface energy fluxes on grid based on the current atmospheric state.
The fused kernel evaluates each flux group through a per-process mutating variant, so a diagnosed process computes and stores its fluxes while a prescribed one (whose fluxes are supplied as input fields) is a no-op: compute_radiative_fluxes!, compute_turbulent_fluxes!, and compute_ground_heat_flux!. The ground heat flux is always evaluated last, since it depends on the other three flux terms.