Atmospheric State

RRTMGP.AtmosphericStates.AtmosphericStateType
AtmosphericState{FTA1D, FTA1DN, FTA2D, D, VMR, CLD, AER} <:
    AbstractAtmosphericState

Atmospheric conditions, used to compute optical properties.

Fields

  • lon: Longitude in degrees (ncol); optional.
  • lat: Latitude in degrees (ncol); optional.
  • layerdata: Storage for col_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.
source
RRTMGP.AtmosphericStates.GrayAtmosphericStateType
GrayAtmosphericState{FT, FTA1D, FTA2D, OTP} <: AbstractAtmosphericState

Atmospheric 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.
source
RRTMGP.AtmosphericStates.CloudStateType
CloudState{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,), or nothing if unused.
  • cld_cover_lw: McICA effective longwave cloud cover in [0, 1]; (ncol,), or nothing if unused.
  • mask_lw: Cloud mask (longwave); true if clouds are present.
  • mask_sw: Cloud mask (shortwave); true if clouds are present.
  • mask_type: Cloud mask type.
  • ice_rgh: Ice roughness; 1 = none, 2 = medium, 3 = rough.
source
RRTMGP.AtmosphericStates.AerosolStateType
AerosolState{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; true if any aerosol is present.
  • aero_size: Aerosol size [microns].
  • aero_mass: Aerosol column mass [kg/m²].
source
RRTMGP.AtmosphericStates.TransposedStateCacheType
TransposedStateCache{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 of AtmosphericState.layerdata (dry-air column amount, layer pressure, layer temperature, relative humidity).
  • t_lev: (ncol, nlay + 1) copy of AtmosphericState.t_lev.
source
RRTMGP.AtmosphericStates.MaxRandomOverlapType
MaxRandomOverlap

Maximum-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.

source
RRTMGP.AtmosphericStates.GrayOpticalThicknessSchneider2004Type
GrayOpticalThicknessSchneider2004{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].
source
RRTMGP.AtmosphericStates.GrayOpticalThicknessOGorman2008Type
GrayOpticalThicknessOGorman2008{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.
source
RRTMGP.AtmosphericStates.setup_gray_as_pr_gridFunction
setup_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.

source