Fluxes
RRTMGP.Fluxes.AbstractFlux — TypeRRTMGP.Fluxes.FluxLW — TypeFluxLW{FT, FTA2D}Upward, downward and net longwave fluxes at each level.
Fields
flux_up: Upward flux [W/m²](ncol, nlev).flux_dn: Downward flux [W/m²](ncol, nlev).flux_net: Net flux [W/m²](ncol, nlev).
RRTMGP.Fluxes.FluxSW — TypeFluxSW{FT, FTA2D}Upward, downward and net shortwave fluxes at each level.
Fields
flux_up: Upward flux [W/m²](ncol, nlev).flux_dn: Downward flux [W/m²](ncol, nlev).flux_net: Net flux [W/m²](ncol, nlev).flux_dn_dir: Direct downward flux [W/m²](ncol, nlev).
RRTMGP.Fluxes.FluxPresentation — TypeFluxPresentation{FTA2D, FD}Host-facing (nlev, ncol) copies of a broadband flux set, filled by update_presentation! from the column-first (ncol, nlev) compute buffers at the end of every update_lw_fluxes!/update_sw_fluxes! (and hence of update_fluxes!). The Layer-2 flux getters return plain domain-masked views of these arrays, so the getter contract (materializable with Array, broadcastable, reducible — also on the GPU, where lazily transposed views of the compute buffers would fall outside the wrapper types CUDA.jl dispatches on) holds without per-getter laziness.
Fields
flux_up: upward flux [W/m²](nlev, ncol).flux_dn: downward flux [W/m²](nlev, ncol).flux_net: net flux [W/m²](nlev, ncol).flux_dn_dir: direct downward flux [W/m²](nlev, ncol), ornothing(longwave).
RRTMGP.Fluxes.update_presentation! — Functionupdate_presentation!(pres::FluxPresentation, flux::AbstractFlux)Fill the (nlev, ncol) presentation arrays from the (ncol, nlev)-indexed compute buffers of flux (the direct beam only when present). On the GPU this is a transposing copy; on the CPU, the compute buffers' physical parents already have the presentation layout, so it is a plain copyto!.
RRTMGP.Fluxes.transpose_into! — Functiontranspose_into!(dest, src)Copy the 2D array src into dest with the two dimensions swapped (dest[i, j] = src[j, i]). Device arrays use a single broadcast kernel; host arrays use explicit loops, since broadcasts with a permuted-wrapper operand allocate a few bytes on Julia ≤ 1.11, tripping the zero-allocation tests.
RRTMGP.Fluxes.transpose_sum_into! — Functiontranspose_sum_into!(dest, a, b)Set dest[i, j] = a[j, i] + b[j, i] (transposing sum of two 2D arrays); the device/host split follows transpose_into!.
RRTMGP.Fluxes.set_flux_to_zero! — Functionset_flux_to_zero!(flux::FluxLW{FT}, gcol::Int, nlev::Int) where {FT<:AbstractFloat}
set_flux_to_zero!(flux::FluxLW{FT}, gcol::Int) where {FT<:AbstractFloat}Set longwave flux for column gcol to zero across nlev levels.
set_flux_to_zero!(flux::FluxSW{FT}, gcol::Int, nlev::Int) where {FT<:AbstractFloat}
set_flux_to_zero!(flux::FluxSW{FT}, gcol::Int) where {FT<:AbstractFloat}Set shortwave flux for column gcol to zero across nlev levels.
RRTMGP.Fluxes.compute_net_flux! — Functioncompute_net_flux!(flux::AbstractFlux, gcol, nlev)
compute_net_flux!(flux::AbstractFlux, gcol)Compute the net flux for column gcol across nlev levels:
flux.flux_net = flux.flux_up - flux.flux_dn