RRTMGP.jl

A Julia implementation of Rapid and accurate Radiative Transfer Model for General Circulation Models.
https://github.com/CliMA/RRTMGP.jl

Category: Atmosphere
Sub Category: Radiative Transfer

Keywords

atmospheric-science climate climate-model correlated-k cuda earth-system-model gpu julia radiation radiative-transfer rrtmgp rte

Keywords from Contributors

pde climate-modeling data-assimilation numerical-methods finite-difference dynamical-core aerosols spectral-elements cloud-microphysics atmospheric-physics

Last synced: 5 days ago
JSON representation

Repository metadata

Fast, GPU-ready atmospheric radiative transfer in Julia: the RTE solver with RRTMGP correlated-k gas optics.

README.md

RRTMGP.jl

The RRTMGP.jl package 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., 2019), based on the
reference Fortran implementation
rte-rrtmgp. It computes
longwave and shortwave radiative fluxes and heating rates for clear, cloudy,
and aerosol-laden atmospheres, and is the radiation scheme of the
CliMA Earth System Model.

Documentation stable dev
Version version
License license
Tests gha ci buildkite
Code Coverage codecov
Downloads Downloads

Quick Start

Installation

using Pkg
Pkg.add("RRTMGP")

Basic Usage

The standalone front door provides a quick start. A gray (single-band)
atmosphere uses analytic formulas:

using RRTMGP

out = RRTMGP.solve_gray(Float64; nlay = 60, ncol = 1)
out.net          # net flux at each level [W/m²]
out.heating_rate # radiative heating rate at each layer [K/s]

For the full correlated-k gas optics, build an idealized clear-sky profile
and solve it (the lookup tables are downloaded automatically; loading
NCDatasets activates them):

using RRTMGP, NCDatasets

profile = RRTMGP.standard_atmosphere(Float64; kind = :tropical)
out = RRTMGP.solve(profile)
out.lw_up[end, 1]   # outgoing longwave radiation at the top of the atmosphere [W/m²]
out.heating_rate    # radiative heating rate at each layer [K/s]

Host-Model Usage

Climate models construct an RRTMGPSolver once, write their state through the
getter contract, and call
update_fluxes!(solver) every radiation step:

solver = RRTMGP.RRTMGPSolver(grid_params, method, params, bcs_lw, bcs_sw, as)
RRTMGP.update_fluxes!(solver)          # allocation-free, in place
F = RRTMGP.net_flux(solver)            # (nlev, ncol) view into solver memory

Key Features

  • Full RRTMGP gas optics: longwave and shortwave correlated-k lookup
    tables, clouds (with McICA sampling of partial cloudiness), and MERRA
    aerosols, validated against the Fortran rte-rrtmgp reference fluxes.
  • Gray radiation: analytic single-band optics for idealized-climate and
    teaching use.
  • Two-stream and no-scattering solvers for both bands, with optional
    per-band (spectrally resolved) flux output.
  • CPU and GPU: the same code runs single-threaded, multi-threaded, and on
    CUDA GPUs via ClimaComms.
  • Zero-allocation driver: update_fluxes! is allocation-free and
    type-stable (asserted in CI with @allocated and JET), allowing it to run
    fast within a climate simulation.
  • Dual precision: Float32 and Float64 throughout, with high accuracy
    (~ 1e-3 W/m²) at Float32 and an accuracy-ratchet test pinning the
    Float32Float64 flux differences.

Design

RRTMGP.jl is organized in three layers:

  1. Functional core: solve_lw! / solve_sw! kernels acting on explicit
    state (AtmosphericState, optics, sources, boundary conditions, flux
    workspaces). See the Functional core page.
  2. Solver aggregate: RRTMGPSolver bundles the configuration, state, and
    workspaces; hosts exchange data through documented
    getters and drive it
    with update_fluxes!.
  3. Standalone front door: solve_gray(FT), standard_atmosphere(FT), and
    solve(profile) for classroom use, single-column experiments, and quick
    starts.

Readers coming from the Fortran implementation can use the
Fortran and paper concordance
to map names between the two code bases and the underlying papers.

Documentation

Integration with Climate Models

RRTMGP.jl provides radiative fluxes and heating rates for the
CliMA ecosystem, including:

Getting Help

For questions, check the documentation
or open an issue on GitHub.

Contributing

Contributors should follow the shared CliMA engineering standards in
docs/dev-guides/, which cover architecture, performance,
code quality, documentation, and workflows. These are vendored from
CliMA/DeveloperGuides. The repo's
AGENTS.md is a starting point for AI agents with repo-specific
guidance.

Acknowledgments

  • Robert Pincus for his invaluable help.
  • Robert Pincus, Eli Mlawer, and Jennifer Delamere, the developers of RTE+RRTMGP
    and its reference Fortran implementation,
    on which this code is based.

Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 6 days ago

Total Commits: 536
Total Committers: 23
Avg Commits per committer: 23.304
Development Distribution Score (DDS): 0.513

Commits in past year: 52
Committers in past year: 11
Avg Commits per committer in past year: 4.727
Development Distribution Score (DDS) in past year: 0.365

Name Email Commits
Charles Kawczynski k****s@g****m 261
Sriharsha Kandala s****s@g****m 134
Tapio Schneider t****o@c****u 33
Zhaoyi Shen 1****1 32
nefrathenrici n****i@g****m 18
Gabriele Bozzola s****r@g****m 11
skandalaCLIMA 5****A 9
github-actions[bot] 4****] 8
Simon Byrne s****e@g****m 6
Julia Sloan j****n@c****u 5
Akshay Sridhar a****r@c****u 3
jakebolewski j****i@g****m 3
Kaitlyn Alphonse k****e@e****m 2
Mosè Giordano m****e@g****g 2
Anna Jaruga a****a@c****u 1
Cheikh Mbengue c****e@w****g 1
George Datseris d****e@g****m 1
Jeff Yoder j****r@u****u 1
Navid C. Constantinou n****y 1
imreddyTeja t****5@g****m 1
claresinger c****s@g****m 1
Kaitlyn Alphonse k****e@e****l 1
ray-chew c****w@c****u 1

Committer domains:


Issue and Pull Request metadata

Last synced: 6 days ago

Total issues: 96
Total pull requests: 638
Average time to close issues: 12 months
Average time to close pull requests: 10 days
Total issue authors: 12
Total pull request authors: 21
Average comments per issue: 1.94
Average comments per pull request: 1.58
Merged pull request: 524
Bot issues: 0
Bot pull requests: 16

Past year issues: 2
Past year pull requests: 24
Past year average time to close issues: 9 months
Past year average time to close pull requests: 1 day
Past year issue authors: 2
Past year pull request authors: 10
Past year average comments per issue: 4.0
Past year average comments per pull request: 0.46
Past year merged pull request: 19
Past year bot issues: 0
Past year bot pull requests: 1

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/CliMA/RRTMGP.jl

Top Issue Authors

  • charleskawczynski (31)
  • szy21 (25)
  • sriharshakandala (20)
  • Sbozzolo (10)
  • simonbyrne (3)
  • zyue110026 (1)
  • akshaysridhar (1)
  • juliasloan25 (1)
  • emlawer (1)
  • jb-mackay (1)
  • tapios (1)
  • JuliaTagBot (1)

Top Pull Request Authors

  • charleskawczynski (271)
  • sriharshakandala (210)
  • szy21 (48)
  • nefrathenrici (29)
  • Sbozzolo (21)
  • github-actions[bot] (16)
  • tapios (11)
  • akshaysridhar (6)
  • simonbyrne (5)
  • juliasloan25 (4)
  • imreddyTeja (3)
  • jakebolewski (2)
  • navidcy (2)
  • trontrytel (2)
  • jty53 (2)

Top Issue Labels

  • documentation (6)
  • enhancement (2)
  • bug (2)
  • Performance (1)
  • help wanted (1)
  • Coverage (1)
  • Inference (1)
  • Dependencies :spider_web: (1)
  • Performance monitoring (1)
  • code quality (1)

Top Pull Request Labels

  • Breaking :boom: (15)
  • Performance (11)
  • Tests (6)
  • Launch Buildkite (4)
  • Dependencies :spider_web: (4)
  • do-not-merge-yet (4)
  • Performance monitoring (3)
  • bugfix :bug: (3)
  • enhancement (2)
  • Early feedback wanted (2)
  • work-in-progress (1)
  • Latency (1)
  • ClimaParameters :control_knobs: (1)
  • documentation (1)
  • GPU Performance (1)
  • code quality (1)
  • draft (1)

Package metadata

proxy.golang.org: github.com/CliMA/RRTMGP.jl

  • Homepage:
  • Documentation: https://pkg.go.dev/github.com/CliMA/RRTMGP.jl#section-documentation
  • Licenses: apache-2.0
  • Latest release: v0.22.2 (published 26 days ago)
  • Last Synced: 2026-08-04T17:01:45.105Z (6 days ago)
  • Versions: 51
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent packages count: 5.401%
    • Average: 5.583%
    • Dependent repos count: 5.764%
proxy.golang.org: github.com/clima/rrtmgp.jl

  • Homepage:
  • Documentation: https://pkg.go.dev/github.com/clima/rrtmgp.jl#section-documentation
  • Licenses: apache-2.0
  • Latest release: v0.22.2 (published 26 days ago)
  • Last Synced: 2026-08-04T17:01:45.601Z (6 days ago)
  • Versions: 51
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent packages count: 5.401%
    • Average: 5.583%
    • Dependent repos count: 5.764%
juliahub.com: RRTMGP

A Julia implementation of Rapid and accurate Radiative Transfer Model for General Circulation Models.

  • Homepage: https://clima.github.io/RRTMGP.jl/latest/
  • Documentation: https://docs.juliahub.com/General/RRTMGP/stable/
  • Licenses: Apache-2.0
  • Latest release: 0.21.7 (published 6 months ago)
  • Last Synced: 2026-03-24T16:32:23.256Z (5 months ago)
  • Versions: 46
  • Dependent Packages: 1
  • Dependent Repositories: 0
  • Downloads: 15,730 Last month
  • Rankings:
    • Dependent repos count: 9.94%
    • Stargazers count: 16.285%
    • Average: 18.425%
    • Dependent packages count: 22.97%
    • Forks count: 24.504%

Dependencies

.github/workflows/JuliaFormatter.yml actions
  • actions/checkout v2.2.0 composite
  • dorny/paths-filter v2.9.1 composite
  • julia-actions/setup-julia latest composite
  • styfle/cancel-workflow-action 0.4.0 composite
.github/workflows/CompatHelper.yml actions
  • julia-actions/setup-julia latest composite
.github/workflows/OS-UnitTests.yml actions
  • actions/checkout v4 composite
  • codecov/codecov-action v5 composite
  • julia-actions/cache v2 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-processcoverage v1 composite
  • julia-actions/julia-runtest v1 composite
  • julia-actions/setup-julia v2 composite
.dev/Project.toml julia
  • JuliaFormatter *
.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite
.github/workflows/cla.yml actions
.github/workflows/docs.yml actions
  • actions/checkout v4 composite
  • julia-actions/cache v2 composite
  • julia-actions/setup-julia v2 composite
.github/workflows/downgrade.yml actions
  • actions/cache v4 composite
  • actions/checkout v5 composite
  • julia-actions/julia-buildpkg latest composite
  • julia-actions/julia-downgrade-compat v2 composite
  • julia-actions/julia-runtest latest composite
  • julia-actions/setup-julia latest composite
.github/workflows/downstream.yml actions
  • actions/checkout v4 composite
  • julia-actions/cache v2 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/setup-julia v2 composite
Project.toml julia
  • Adapt *
  • Artifacts *
  • ClimaComms *
  • DocStringExtensions *
  • Random *
docs/Manifest.toml julia
  • ANSIColoredPrinters 0.0.1
  • AbstractTrees 0.4.5
  • Adapt 4.3.0
  • ArgTools 1.1.1
  • BibInternal 0.3.7
  • BibParser 0.2.2
  • Bibliography 0.3.0
  • Bijections 0.2.2
  • ClimaComms 0.6.9
  • CodecZlib 0.7.8
  • Compat 4.18.0
  • CompilerSupportLibraries_jll 1.1.1+0
  • DataStructures 0.18.22
  • DocStringExtensions 0.9.5
  • Documenter 1.14.1
  • DocumenterCitations 1.4.0
  • Downloads 1.6.0
  • Expat_jll 2.6.5+0
  • FileIO 1.17.0
  • Git 1.4.0
  • Git_jll 2.50.1+0
  • IOCapture 0.2.5
  • JLLWrappers 1.7.1
  • JSON 0.21.4
  • JSON3 1.14.3
  • JSONSchema 1.4.1
  • LaTeXStrings 1.4.0
  • LazilyInitializedFields 1.3.0
  • LibCURL 0.6.4
  • LibCURL_jll 8.4.0+0
  • LibGit2_jll 1.6.4+0
  • LibSSH2_jll 1.11.0+1
  • Libiconv_jll 1.18.0+0
  • LoggingExtras 1.1.0
  • MarkdownAST 0.1.2
  • MbedTLS_jll 2.28.2+1
  • MozillaCACerts_jll 2023.1.10
  • NetworkOptions 1.2.0
  • OpenBLAS_jll 0.3.23+4
  • OpenSSH_jll 10.0.1+0
  • OpenSSL_jll 3.5.2+0
  • OrderedCollections 1.8.1
  • PCRE2_jll 10.42.0+1
  • Parsers 2.8.3
  • Pkg 1.10.0
  • PrecompileTools 1.2.1
  • Preferences 1.4.3
  • RRTMGP 0.21.31
  • RegistryInstances 0.1.0
  • Requires 1.3.1
  • SHA 0.7.0
  • StringEncodings 0.3.7
  • StructTypes 1.11.0
  • TOML 1.0.3
  • Tar 1.10.0
  • TestItems 1.0.0
  • TranscodingStreams 0.11.3
  • URIs 1.6.1
  • YAML 0.4.14
  • Zlib_jll 1.2.13+1
  • libblastrampoline_jll 5.11.0+0
  • nghttp2_jll 1.52.0+1
  • p7zip_jll 17.4.0+2
docs/Project.toml julia
  • Documenter *
  • DocumenterCitations *
  • LaTeXStrings *
  • RRTMGP *
test/Project.toml julia
  • Adapt *
  • Aqua *
  • Artifacts *
  • BenchmarkTools *
  • CUDA *
  • ClimaComms *
  • ClimaParams *
  • Compat *
  • Coverage *
  • DocStringExtensions *
  • Infiltrator *
  • JET *
  • NCDatasets *
  • Pkg *
  • Profile *
  • ProfileCanvas *
  • RRTMGP *
  • Random *
  • Suppressor *
  • Test *

Score: 17.00357540214262