AtmosModel
AtmosProblem
ClimateMachine.Atmos.AtmosProblem — TypeAtmosProblemThe default problem definition (initial and boundary conditions) for AtmosModel.
AtmosModel balance law
ClimateMachine.Atmos.AtmosModel — TypeAtmosModel <: BalanceLawA BalanceLaw for atmosphere modeling. Users may over-ride prescribed default values for each field.
Usage
AtmosModel(
param_set,
problem,
orientation,
ref_state,
turbulence,
hyperdiffusion,
spongelayer,
moisture,
radiation,
source,
tracers,
data_config,
)Fields
param_setParameter Set (type to dispatch on, e.g., planet parameters. See CLIMAParameters.jl package)
problemProblem (initial and boundary conditions)
orientationAn orientation model
ref_stateReference State (For initial conditions, or for linearisation when using implicit solvers)
turbulenceTurbulence Closure (Equations for dynamics of under-resolved turbulent flows)
turbconvTurbulence Convection Closure (e.g., EDMF)
hyperdiffusionHyperdiffusion Model (Equations for dynamics of high-order spatial wave attenuation)
viscousspongeViscous sponge layers
moistureMoisture Model (Equations for dynamics of moist variables)
precipitationPrecipitation Model (Equations for dynamics of precipitating species)
radiationRadiation Model (Equations for radiative fluxes)
sourceSource Terms (Problem specific source terms)
tracersTracer Terms (Equations for dynamics of active and passive tracers)
data_configData Configuration (Helper field for experiment configuration)
AtmosModel methods
ClimateMachine.BalanceLaws.flux_first_order! — Methodflux_first_order!(
m::AtmosModel,
flux::Grad,
state::Vars,
aux::Vars,
t::Real
)Computes and assembles non-diffusive fluxes in the model equations.
ClimateMachine.BalanceLaws.flux_second_order! — Methodflux_second_order!(
atmos::AtmosModel,
flux::Grad,
state::Vars,
diffusive::Vars,
hyperdiffusive::Vars,
aux::Vars,
t::Real
)Diffusive fluxes in AtmosModel. Viscosity, diffusivity are calculated in the turbulence subcomponent and accessed within the diffusive flux function. Contributions from subcomponents are then assembled (pointwise).
ClimateMachine.BalanceLaws.init_state_auxiliary! — Methodinit_state_auxiliary!(
m::AtmosModel,
aux::Vars,
grid,
direction
)Initialise auxiliary variables for each AtmosModel subcomponent. Store Cartesian coordinate information in aux.coord.
ClimateMachine.BalanceLaws.source! — Methodsource!(
m::AtmosModel,
source::Vars,
state::Vars,
diffusive::Vars,
aux::Vars,
t::Real,
direction::Direction,
)Computes (and assembles) source terms S(Y) in:
∂Y
-- = - ∇ • F + S(Y)
∂tClimateMachine.BalanceLaws.init_state_prognostic! — Methodinit_state_prognostic!(
m::AtmosModel,
state::Vars,
aux::Vars,
coords,
t,
args...,
)Initialise state variables. args... provides an option to include configuration data (current use cases include problem constants, spline-interpolants).
Reference states
ClimateMachine.Atmos.HydrostaticState — TypeHydrostaticState{P,T} <: ReferenceStateA hydrostatic state specified by a virtual temperature profile and relative humidity.
By default, this is a dry hydrostatic reference state.
ClimateMachine.Atmos.InitStateBC — TypeInitStateBCSet the value at the boundary to match the init_state_prognostic! function. This is mainly useful for cases where the problem has an explicit solution.
TODO: This should be fixed later once BCs are figured out (likely want
different things here?)
ClimateMachine.Atmos.ReferenceState — TypeReferenceStateHydrostatic reference state, for example, used as initial condition or for linearization.
ClimateMachine.Atmos.NoReferenceState — TypeNoReferenceState <: ReferenceStateNo reference state used
Thermodynamics
ClimateMachine.Atmos.recover_thermo_state — Functionrecover_thermo_state(atmos::AtmosModel, state::Vars, aux::Vars)Recover the thermodynamic state, based on the state and the aux state, based on the existing temperature.
This method does not call the iterative saturation adjustment procedure.
ClimateMachine.Atmos.new_thermo_state — Functionnew_thermo_state(atmos::AtmosModel, state::Vars, aux::Vars)Create a new thermodynamic state, based on the state, and not the aux state.
This method calls the iterative saturation adjustment procedure for EquilMoist models.
Moisture
ClimateMachine.Atmos.DryModel — TypeDryModelAssumes the moisture components is in the dry limit.
ClimateMachine.Atmos.EquilMoist — TypeEquilMoistAssumes the moisture components are computed via thermodynamic equilibrium.
ClimateMachine.Atmos.NonEquilMoist — TypeNonEquilMoistDoes not assume that the moisture components are in equilibrium.
ClimateMachine.Atmos.NoPrecipitation — TypeNoPrecipitation <: PrecipitationModelNo precipitation.
ClimateMachine.Atmos.Rain — TypeRain <: PrecipitationModelPrecipitation model with rain only.
Stabilization
ClimateMachine.Atmos.RayleighSponge — TypeRayleighSponge{FT} <: SourceRayleigh Damping (Linear Relaxation) for top wall momentum components Assumes laterally periodic boundary conditions for LES flows. Momentum components are relaxed to reference values (zero velocities) at the top boundary.
BCs
ClimateMachine.Atmos.AtmosBC — TypeAtmosBC(momentum = Impenetrable(FreeSlip())
energy = Insulating()
moisture = Impermeable()
tracer = ImpermeableTracer())The standard boundary condition for AtmosModel. The default options imply a "no flux" boundary condition.
ClimateMachine.Atmos.DragLaw — TypeDragLaw(fn) :: MomentumDragBCDrag law for momentum parallel to the boundary. The drag coefficient is C = fn(state, aux, t, normu_int_tan), where normu_int_tan is the internal speed parallel to the boundary. _int refers to the first interior node.
ClimateMachine.Atmos.Impermeable — TypeImpermeable() :: MoistureBCNo moisture flux.
ClimateMachine.Atmos.PrescribedMoistureFlux — TypePrescribedMoistureFlux(fn) :: MoistureBCPrescribe the net inward moisture flux across the boundary by fn, a function with signature fn(state, aux, t), returning the flux (in kg/m^2).
ClimateMachine.Atmos.BulkFormulaMoisture — TypeBulkFormulaMoisture(fn) :: MoistureBCCalculate the net inward moisture flux across the boundary using the bulk formula. The drag coefficient is C_q = fn_C_q(state, aux, t, normu_int_tan). The surface qtot at the boundary is `qtot = fnqtot(state, aux, t)`.
Return the flux (in kg m^-2 s^-1).
ClimateMachine.Atmos.FreeSlip — TypeFreeSlip() :: MomentumDragBCNo surface drag on momentum parallel to the boundary.
ClimateMachine.Atmos.PrescribedTemperature — TypePrescribedTemperature(fn) :: EnergyBCPrescribe the temperature at the boundary by fn, a function with signature fn(state, aux, t) returning the temperature (in K).
ClimateMachine.Atmos.PrescribedEnergyFlux — TypePrescribedEnergyFlux(fn) :: EnergyBCPrescribe the net inward energy flux across the boundary by fn, a function with signature fn(state, aux, t), returning the flux (in W/m^2).
ClimateMachine.Atmos.BulkFormulaEnergy — TypeBulkFormulaEnergy(fn) :: EnergyBCCalculate the net inward energy flux across the boundary. The drag coefficient is C_h = fn_C_h(state, aux, t, normu_int_tan). The surface temperature and qtot are `T, qtot = fnTandqtot(state, aux, t)`.
Return the flux (in W m^-2).
ClimateMachine.Atmos.ImpermeableTracer — TypeImpermeableTracer() :: TracerBCNo tracer diffusion across boundary
ClimateMachine.Atmos.Impenetrable — TypeImpenetrable(drag::MomentumDragBC) :: MomentumBCDefines an impenetrable wall model for momentum. This implies:
- no flow in the direction normal to the boundary, and
- flow parallel to the boundary is subject to the
dragcondition.
ClimateMachine.Atmos.Insulating — TypeInsulating() :: EnergyBCNo energy flux across the boundary.
ClimateMachine.Atmos.NoSlip — TypeNoSlip() :: MomentumDragBCZero momentum at the boundary.
ClimateMachine.Atmos.average_density — Functionaverage_density(ρ_sfc, ρ_int)Average density between the surface and the interior point, given
ρ_sfcdensity at the surfaceρ_intdensity at the interior point
Sources
ClimateMachine.Atmos.RemovePrecipitation — TypeRemovePrecipitation{FT} <: SourceA sink to q_tot when cloud condensate is exceeding a threshold. The threshold is defined either in terms of condensate or supersaturation. The removal rate is implemented as a relaxation term in the Microphysics_0M module. The default thresholds and timescale are defined in CLIMAParameters.jl.
ClimateMachine.Atmos.CreateClouds — TypeCreateClouds{FT} <: SourceA source/sink to q_liq and q_ice implemented as a relaxation towards equilibrium in the Microphysics module. The default relaxation timescales are defined in CLIMAParameters.jl.