Modeling
ClearSky.opticaldepth
— Functionopticaldepth(P₁, P₂, g, fT, fμ, θ, absorbers...; tol=1e-5)
Compute monochromatic optical depths (τ) between two pressure levels
Arguments
P₁
: first pressure level [Pa]P₂
: second pressure level [Pa]g
: gravitational acceleration [m/s$^2$]fT
: temperature [K] as a function of pressure [Pa],fT(P)
. This may be any callable object, likeMoistAdiabat
, for example.fμ
: mean molar mass as a function of temperature [K] and pressure [Pa],fμ(T,P)
θ
: angle [radians] of path, must be ∈ [0,π/2), where 0 is straight up/downabsorbers
: at least one gas object and any number ofCIATables
and functions in the form σ(ν, T, P)
Returns a vector of optical depths across all wavenumbers stored in gas objects. The tol
keyword argument adjusts integrator error tolerance.
ClearSky.transmittance
— Functiontransmittance(τ)
Evaluate transmittance from optical depth, $t = e^{-τ}$
transmittance(P₁, P₂, g, fT, fμ, θ, absorbers...; tol=1e-5)
Compute monochromatic transmittances between two pressure levels
Accepts the same arguments as opticaldepth
and returns a vector of transmittances across all wavenumbers stored in gas objects.
ClearSky.outgoing
— Functionoutgoing(Pₛ, Pₜ, g, fT, fμ, absorbers; nstream=5, tol=1e-5)
Compute outgoing monochromatic radiative fluxes [W/m$^2$/cm$^{-1}$], line-by-line. Integrates the schwarzschild
equation from Pₛ
to Pₜ
at each wavenumber in the provided gas object(s) using any number of streams/angles. Total flux [W/m$^2$] can be evaluated with the trapz
function.
Arguments
Pₛ
: surface pressure [Pa]Pₜ
: top of atmopshere pressure [Pa]g
: gravitational acceleration [m/s$^2$]fT
: temperature [K] as a function of pressure [Pa],fT(P)
. This may be any callable object, likeMoistAdiabat
, for example.fμ
: mean molar mass as a function of temperature [K] and pressure [Pa],fμ(T,P)
absorbers
: at least one gas object and any number ofCIATables
and functions in the form σ(ν, T, P)
The keyword argument nstream
specifies how many independent streams, or beam angles through the atmosphere, to integrate. The keyword argument tol
is a numerical error tolerance passed to the radau
integrator.
ClearSky.topfluxes
— Functiontopfluxes(Pₛ, Pₜ, g, fT, fμ, absorber::UnifiedAbsorber; nstream=5, θ=0.952, tol=1e-5)
Compute the upward and downward monochromatic fluxes at the top of the atmopshere.
Arguments
Pₛ
: surface pressure [Pa]Pₜ
: top of atmopshere pressure [Pa]g
: gravitational acceleration [m/s$^2$]fT
: temperature [K] as a function of pressure [Pa],fT(P)
. This may be any callable object, likeMoistAdiabat
, for example.fμ
: mean molar mass as a function of temperature [K] and pressure [Pa],fμ(T,P)
absorber
: aUnifiedAbsorber
, which is either aGroupedAbsorber
or anAcceleratedAbsorber
ClearSky.topimbalance
— Functiontopimbalance(Pₛ, Pₜ, g, fT, fμ, absorber::UnifiedAbsorber; nstream=5, θ=0.952, tol=1e-5)
Compute the difference between the total upward and downward radiative flux at the top of the atmopshere.
Arguments
Pₛ
: surface pressure [Pa]Pₜ
: top of atmopshere pressure [Pa]g
: gravitational acceleration [m/s$^2$]fT
: temperature [K] as a function of pressure [Pa],fT(P)
. This may be any callable object, likeMoistAdiabat
, for example.fμ
: mean molar mass as a function of temperature [K] and pressure [Pa],fμ(T,P)
absorber
: aUnifiedAbsorber
, which is either aGroupedAbsorber
or anAcceleratedAbsorber
ClearSky.GroupedAbsorber
— TypeGroupedAbsorber(absorbers...)
A struct for consolidating absorbers. Construct with any number of gas objects, functions in the form σ(ν, T, P)
and CIATables
.
ClearSky.AcceleratedAbsorber
— TypeAcceleratedAbsorber(ga, P, T)
An accelerated struct for getting cross-sections from groups of absorbers. Pressure and temperature coordinates must be provided.