RRTMGP.jl
RRTMGP.jl is a Julia implementation of the radiative transfer solver RTE (Radiative Transfer for Energetics) and the RRTMGP (RRTM for General circulation model applications—Parallel) correlated-$k$ gas optics (Pincus et al. [1]), based on the reference Fortran implementation rte-rrtmgp. It computes longwave and shortwave fluxes and heating rates for clear, cloudy, and aerosol-laden atmospheres on CPUs and GPUs, and it includes an analytic gray-radiation mode for idealized studies. It is the radiation scheme of the CliMA Earth System Model.
Quick start
Build an idealized atmospheric column, then solve it. Gray radiation uses analytic formulas and needs no input data:
using RRTMGP
profile = RRTMGP.standard_atmosphere(Float64; kind = :tropical)
out = RRTMGP.solve(profile; method = RRTMGP.GrayRadiation()) # gray optics
out.heating_rate[1, 1] # heating rate at the bottom layer [K/s]2.8935702803079375e-5The full gas optics reads lookup tables, downloaded on first use; loading NCDatasets activates it:
using NCDatasets # activates the gas optics
out = RRTMGP.solve(profile) # clear-sky correlated-k
out.lw_flux_up[end, 1] # OLR [W/m²]282.7005931707845Code structure
RRTMGP is split into two parts:
- Optics computes optical properties and source functions given atmospheric conditions (pressure, temperature, gas concentrations, clouds, aerosols).
- RTE computes radiative fluxes given optical properties and source functions.
On top of this functional core sit the RRTMGPSolver, which host models drive through the getter contract, and standalone entry points (solve_gray, standard_atmosphere, solve) for single-column work.
How the documentation is organized
- Tutorials (learning-oriented, runnable end to end): A first radiation calculation and Radiative-convective equilibrium (Manabe's classic climate-sensitivity experiment). Start here if you want to learn about radiative transfer and how to run this code.
- How-to guides (task-oriented recipes): driving RRTMGP from a host model, adding clouds and aerosols, running on GPUs, caching the lookup tables, per-band fluxes, and validated test problems. Start here if you are coupling RRTMGP to a climate model.
- Explanation (the concepts and the math): the functional core, the RTE solvers, the optics, level interpolation, Float32 and Float64, and the Fortran and paper concordance for readers coming from rte-rrtmgp.
- Reference: the API, the getter contract, and per-module reference pages.
Authors
RRTMGP.jl is developed by the Climate Modeling Alliance. It is based on RTE+RRTMGP and its reference Fortran implementation, developed by Robert Pincus, Eli Mlawer, and Jennifer Delamere (Pincus et al. [1]), with several performance and robustness improvements relative to the original implementation.