Conservation Checks
If the model is a physically closed system (e.g., in the slabplanet
configuration with free slip conditions), it should conserve mass (including water), energy and momentum. The conservation checker logs global conservation.
Only energy and water are currently implemented.
Note that kinetic energy is not included in the calculation of the global energy, reflecting the formulation on ClimaAtmos
, which assumes that kinetic energy is negligible in comparison with the moist static energy components.
ConservationChecker API
ClimaCoupler.ConservationChecker.EnergyConservationCheck
— TypeEnergyConservationCheck{A} <: AbstractConservationCheck
Struct of type AbstractConservationCheck
containing global energy conservation logs.
ClimaCoupler.ConservationChecker.WaterConservationCheck
— TypeWaterConservationCheck{A} <: AbstractConservationCheck
Struct of type AbstractConservationCheck
containing global water mass conservation logs.
ClimaCoupler.ConservationChecker.check_conservation!
— Functioncheck_conservation!(coupler_sim::Interfacer.CoupledSimulation; runtime_check = false)
itertes over all specified conservation checks.
check_conservation!(
cc::EnergyConservationCheck,
coupler_sim::Interfacer.CoupledSimulation,
runtime_check = false,
)
computes the total energy, ∫ ρe dV, of the model components of the coupled simulations and the TOA radiation, and updates cc
with these values.
check_conservation!(
cc::WaterConservationCheck,
coupler_sim::Interfacer.CoupledSimulation,
runtime_check = false,
)
computes the total water, ∫ ρq_tot dV, of the various components of the coupled simulations, and updates cc
with the values.
Note: in the future this should not use push!
.
ConservationChecker Internal Functions
ClimaCoupler.ConservationChecker.surface_water_gain_from_rates
— Functionsurface_water_gain_from_rates(cs::Interfacer.CoupledSimulation)
Determines the total water content gain/loss of a surface from the beginning of the simulation based on evaporation and precipitation rates.