Atmospheric State
RRTMGP.AtmosphericStates.AbstractAtmosphericState — TypeAbstractAtmosphericStateAbstract type for atmospheric states: AtmosphericState for the spectral (correlated-$k$) methods and GrayAtmosphericState for gray radiation.
RRTMGP.AtmosphericStates.AtmosphericState — TypeAtmosphericState{FTA1D, FTA1DN, FTA2D, D, VMR, CLD, AER} <:
AbstractAtmosphericStateAtmospheric conditions, used to compute optical properties.
Fields
lon: Longitude in degrees(ncol); optional.lat: Latitude in degrees(ncol); optional.layerdata: Storage forcol_dry(column amount of dry air [molecules/cm²]), layer pressures [Pa, mb], layer temperatures [K], and relative humidity;(4, nlay, ncol).p_lev: Level pressures [Pa, mb](nlay+1, ncol).t_lev: Level temperatures [K](nlay+1, ncol).t_sfc: Surface temperatures [K](ncol).vmr: Volume mixing ratios of all relevant gases.cloud_state: Cloud state.aerosol_state: Aerosol state.
RRTMGP.AtmosphericStates.GrayAtmosphericState — TypeGrayAtmosphericState{FT, FTA1D, FTA2D, OTP} <: AbstractAtmosphericStateAtmospheric conditions, used to compute optical properties with the gray atmosphere approximation.
Fields
lat: Latitude in degrees for each column(ncol,).p_lay: Layer pressures [Pa, mb](nlay, ncol).p_lev: Level pressures [Pa, mb](nlay+1, ncol).t_lay: Layer temperatures [K](nlay, ncol).t_lev: Level temperatures [K](nlay+1, ncol).z_lev: Level altitudes [m](nlay+1, ncol).t_sfc: Surface temperatures [K](ncol).otp: Optical thickness parameters.
RRTMGP.AtmosphericStates.CloudState — TypeCloudState{CD, CF, CC, CM, CMT}Cloud state, used to compute optical properties.
Fields
cld_r_eff_liq: Effective radius of cloud liquid particles.cld_r_eff_ice: Effective radius of cloud ice particles.cld_path_liq: Cloud water path.cld_path_ice: Cloud ice path.cld_frac: Cloud fraction.cld_cover_sw: McICA effective shortwave cloud cover in[0, 1];(ncol,), ornothingif unused.cld_cover_lw: McICA effective longwave cloud cover in[0, 1];(ncol,), ornothingif unused.mask_lw: Cloud mask (longwave);trueif clouds are present.mask_sw: Cloud mask (shortwave);trueif clouds are present.mask_type: Cloud mask type.ice_rgh: Ice roughness; 1 = none, 2 = medium, 3 = rough.
RRTMGP.AtmosphericStates.AerosolState — TypeAerosolState{A, B, D}Aerosol state, used to compute optical properties.
Fields
aod_sw_ext: Shortwave aerosol optical depth.aod_sw_sca: Shortwave aerosol optical depth (scattering component).aero_mask: Aerosol mask;trueif any aerosol is present.aero_size: Aerosol size [microns].aero_mass: Aerosol column mass [kg/m²].
RRTMGP.AtmosphericStates.TransposedStateCache — TypeTransposedStateCache{D2, D3}Column-first copies of the hot AtmosphericState fields, refreshed once per solve (by refresh_transposed_state!). The gas-optics kernels re-read the layer pressures, temperatures, dry-air column amounts, and level temperatures for every g-point; in the caller-owned AtmosphericState those arrays are vertical-first, so neighboring GPU threads (one per column) read memory nlay or 4 nlay elements apart. Reading the transposed copies instead makes those loads consecutive (coalesced) across the threads of a warp.
The cache trades one permutedims! per solve plus (4 nlay + nlev) ncol extra storage for coalesced reads in the g-point loop. Pass the same cache to the longwave and shortwave workspaces to share the storage, or nothing to opt out (the kernels then read the AtmosphericState directly, as before). The workspace constructors default to a cache on the GPU and to nothing on the CPU, where the state's vertical-first layout is already cache-friendly for the per-column sweeps.
Fields
layerdata:(ncol, nlay, 4)copy ofAtmosphericState.layerdata(dry-air column amount, layer pressure, layer temperature, relative humidity).t_lev:(ncol, nlay + 1)copy ofAtmosphericState.t_lev.
RRTMGP.AtmosphericStates.AbstractCloudMask — TypeAbstractCloudMaskAbstract type for cloud-overlap sampling masks; see MaxRandomOverlap.
RRTMGP.AtmosphericStates.MaxRandomOverlap — TypeMaxRandomOverlapMaximum-random cloud overlap for McICA sampling: clouds in adjacent layers overlap maximally, and clouds separated by clear sky overlap randomly. Used by build_cloud_mask! to sample the g-point cloud masks from the cloud fraction.
RRTMGP.AtmosphericStates.AbstractGrayOpticalThickness — TypeAbstractGrayOpticalThicknessAbstract type for the gray-radiation optical-thickness parameterizations: GrayOpticalThicknessSchneider2004 and GrayOpticalThicknessOGorman2008.
RRTMGP.AtmosphericStates.GrayOpticalThicknessSchneider2004 — TypeGrayOpticalThicknessSchneider2004{FT} <: AbstractGrayOpticalThickness
GrayOpticalThicknessSchneider2004(FT; α = 3.5, te = 300, tt = 200, Δt = 60)Parameters of the semi-grey optical-thickness profile of [5]. The vertical longwave optical depth scales with pressure as $\widehat{\tau}(p) = d_0(\phi)\,(p/p_0)^\alpha$, so the exponent α controls how the absorber is distributed with height (α = 1 for a well-mixed absorber, larger α for one concentrated near the surface). The optical thickness at the surface, $d_0(\phi)$, is set by the latitude-dependent radiative-equilibrium temperature built from te, tt, and Δt.
Fields
α: Pressure exponent of the optical-depth profile.te: Global-mean surface temperature [K].tt: Temperature at the top of the atmosphere [K].Δt: Equator-to-pole surface temperature difference [K].
RRTMGP.AtmosphericStates.GrayOpticalThicknessOGorman2008 — TypeGrayOpticalThicknessOGorman2008{FT} <: AbstractGrayOpticalThickness
GrayOpticalThicknessOGorman2008(FT; α = 1.0, fₗ = 0.2, τₑ = 7.2, τₚ = 1.8, τ₀ = 0.22)Parameters of the grey optical-thickness profile of [3] and [4]. The vertical longwave optical depth blends a linear and a quartic dependence on the normalized pressure $\sigma = p/p_0$, $\widehat{\tau} \propto f_\ell\,\sigma + (1 - f_\ell)\,\sigma^4$, so that it stays finite aloft while thickening toward the surface, with an equator-to-pole contrast set by τₑ and τₚ. The shortwave optical depth scales as $\sigma^2$ with amplitude τ₀. This is the default optical-thickness model for solve_gray.
Fields
α: Overall scaling factor for the longwave optical depth.fₗ: Weight of the linear (versus quartic) pressure dependence.τₑ: Longwave optical thickness at the equator.τₚ: Longwave optical thickness at the poles.τ₀: Shortwave optical thickness amplitude.
RRTMGP.AtmosphericStates.setup_gray_as_pr_grid — Functionsetup_gray_as_pr_grid(
context::ClimaComms.AbstractCommsContext,
nlay::Int,
lat,
p0,
pe,
otp::AbstractGrayOpticalThickness,
param_set,
::Type{DA},
step = "linear",
)Build a GrayAtmosphericState on a pressure grid from surface pressure p0 to top-of-atmosphere pressure pe, with the analytic temperature profile of Schneider (2004), J. Atmos. Sci. 61 (12), 1317-1340 (doi: 10.1175/1520-0469(2004)061<1317:TTATTS>2.0.CO;2). One column is built per element of lat, with arrays of type DA.