Skip to content

feat(picket-fence): full picket-fence radiation scheme (LW + SW, correlated-k, multi-planet)#210

Merged
JoyMonteiro merged 2 commits into
developfrom
feature/picket-fence-radiation
Jun 15, 2026
Merged

feat(picket-fence): full picket-fence radiation scheme (LW + SW, correlated-k, multi-planet)#210
JoyMonteiro merged 2 commits into
developfrom
feature/picket-fence-radiation

Conversation

@JoyMonteiro

Copy link
Copy Markdown
Member

Summary

Adds a complete picket-fence radiation scheme to climt, along with multi-planet atmospheric profiles, a correlated-k table pipeline, and general condensible species support in Emanuel convection.

Core radiation components

  • PicketFenceLongwave — Parmentier-mode grey LW and correlated-k mode; njit(parallel) transport kernel (~540× faster than pure Python, faster than RRTMG-LW for large column counts)
  • PicketFenceShortwave — two-stream SW with ESFT overlap, Rayleigh scattering, cloud optical properties, correlated-k mode
  • Per-band diagnostics: optical depth, transmittance, heating rate; diagnostics_level control

Correlated-k tables

  • Earth LW (earth_low_res_lw.nc): 14-band, 8 g-pts, HITRAN 2024 / MT_CKD 4.3, runtime CO₂ axis (10–10000 ppm, log-k interpolation), runtime H₂O axis — validated against RRTMG-LW
  • Earth SW (earth_low_res_sw.nc): 3-band, 2 g-pts
  • Mars, Venus (LW + SW): from Chaverot Zenodo 16795590 (CC-BY 4.0)
  • TRAPPIST-1e Hab1/Hab2, Titan (LW + SW): built from HITRAN 2024 + CIA via linepyline pipeline
  • Table builder: scripts/pf_table_builder/ — linepyline kappa sampler, k-distribution with Gauss-Legendre quadrature, netCDF writer

CO₂ runtime axis

  • Quadrilinear log-k interpolation over (T, p, X_H₂O, X_CO₂)
  • CO₂ VMR read from state at call time; validated against LBL at off-node CO₂

Multi-planet atmospheric profiles

  • TOML-based profiles for Earth, Mars, Venus, Titan, TRAPPIST-1e (climt/_data/atmospheric_properties/)
  • get_active_condensible() / CondensibleParams API for condensible species (H₂O, CH₄)
  • Titan and TRAPPIST-1e stellar spectra shipped

Emanuel convection

  • V3 promoted to EmanuelConvectionPython (old pure-Python component dropped)
  • Condensible species (CondensibleParams) wired through vectorised kernel: saturation vapour pressure, latent heat, LCL pressure parameterised per-condensible

Canonical diagnostic names

  • air_temperature_tendency_from_longwave / _from_shortwave (replaces old *_heating_rate names)

CI / packaging

Test plan

  • tests/test_picket_fence_lw.py — 10 tests (Parmentier, correlated-k, CO₂ axis, per-band sums, isothermal equilibrium, surface emissivity)
  • tests/test_picket_fence_sw.py — two-stream, correlated-k, per-band sums, cloud hook
  • tests/test_rrtmg_vs_picket_fence.py — LW/SW broadband within 25% of RRTMG; H₂O response live
  • tests/test_grey_limit.py — bit-exact grey limit vs GrayLongwaveRadiation
  • tests/test_lw_kernel_consolidation.py — transport kernel regression
  • tests/test_condensibles.py — Titan CH₄ smoke test, saturation vapour pressure, CondensibleParams
  • tests/test_components.pyGrayLongwaveRadiation cached-output tests pass with renamed diagnostic
  • Full test suite passes on feature/picket-fence-radiation

🤖 Generated with Claude Code

JoyMonteiro and others added 2 commits June 15, 2026 22:48
Wheel: replace include_package_data=True with explicit package_data
covering only the runtime _data/ assets (ozone, TOML configs, correlated-k
.nc/.npz). Fortran sources, .pyx, PDFs, graphify-out/, etc. are no longer
bundled.

sdist: change MANIFEST.in to include only *.py from tests/, dropping ~59 MB
of binary NetCDF caches.

Delete 6 stale/defective Chaverot-sourced Earth LW tables and all code that
referenced them (test_resolution_convergence.py, benchmark_hotmoist_window_closure.py,
lw_convergence() in benchmark_picket_fence_vs_rrtmg.py). The 4-band/8-gpt
options are superseded by the 14-band linepyline table; the hotmoist table
has a molar-mass calibration defect at high H2O.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
chore: slim wheel/sdist, drop stale Chaverot Earth LW tables
@JoyMonteiro JoyMonteiro merged commit 05872cf into develop Jun 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant