Picket-fence radiation: multi-planet correlated-k scheme, CO2-adjustable Earth LW, numba acceleration, and the Experiments write-up#208
Merged
Conversation
…re-python component Retires the original pure_python_component and the EmanuelConvectionPythonV3 name; the V3 implementation now *is* EmanuelConvectionPython. Updates package __init__ exports and the three benchmark scripts to the single name. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…stic names
Renames heating-rate diagnostics to sympl's canonical
air_temperature_tendency_from_{long,short}wave[_per_band] in
GrayLongwaveRadiation and PicketFenceShortwave, and disambiguates the SW cloud
optical-thickness alias tau_cloud -> tau_cloud_sw. Tests and the gsplit-sweep
experiment script updated to the new names.
Also: fix an npz file-handle leak in parmentier.py (materialize into a dict
inside the as_file context) and add a --quadrature two-stretch / --g-split
option to the table generator for dense strong-line-tail sampling.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Cached outputs still had longwave_heating_rate; regenerated against the canonical air_temperature_tendency_from_longwave name from 04b2cc3. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR lands the full picket-fence radiation body of work and everything built around it since #207 merged. It is large (130 commits) because it spans a new radiation scheme, multi-planet support, a correlated-k table toolchain, performance work, a general condensibles framework for Emanuel convection, and a Quarto "Experiments" write-up with a reproducible notebook.
The bulk of the line count is shipped data and tooling output, not source: binary correlated-k
.nctables, the pre-executed companion notebook, and thegraphify-out/knowledge-graph artifacts.Warning
Breaking change — radiation diagnostic names.
GrayLongwaveRadiationandPicketFenceShortwavenow emit sympl's canonicalair_temperature_tendency_from_longwave/air_temperature_tendency_from_shortwave(and..._per_band) instead of the oldlongwave_heating_rate/shortwave_heating_rate. ThePicketFenceShortwavecloud input aliastau_cloudwas likewise renamed totau_cloud_sw. Any downstream code reading the old names must be updated. In-repo tests and experiment scripts are already migrated.Note
Also breaking (API surface):
EmanuelConvectionPythonV3is removed. The V3 implementation is now exported simply asEmanuelConvectionPython; the original pure-Python component was retired.What's in here
New: picket-fence radiation scheme
PicketFenceLongwaveandPicketFenceShortwavetendency components, each with two modes:.nck-tables.GrayLongwaveRadiation.tau_cloud_sw,ssa_cloud,g_cloud) and a per-band optical-depth / transmittance / heating-rate diagnostics tier (diagnostics_level).Multi-planet support
atmospheric_propertiesAPI, with profiles for Titan, TRAPPIST-1e (Hab1/Hab2), Mars, and Venus.Correlated-k table toolchain (
scripts/generate_picket_fence_tables.py+ helpers)--quadrature two-stretch/--g-splitoption that densely samples the strong-line tail (g→1).CO2-adjustable Earth LW table
earth_low_res_lwis a 14-band table with a runtime CO2 axis: CO2 VMR is read from state and threaded through correlated-k optical-depth assembly via quadrilinear (geometric log-k) interpolation. Shipsearth_hifi_lwas the high-fidelity RRTMG-matched variant.Performance (numba)
njit(parallel)kernels for the 7D CO2 optical-depth assembly, Planck-source assembly, and a consolidated LW transport kernel — roughly 540× speedups, benchmarked faster than RRTMG-LW for many columns. A no-numbanjitstub keeps the package importable without numba.General condensibles (Emanuel convection)
CondensibleParams/get_condensible_params/get_active_condensibleAPI, condensible species tracking, parallelised saturation-specific-humidity (compute_qs), and kernel helpers wired through the vectorized Emanuel path. Enables non-H2O condensibles (e.g. Titan CH4).Docs / experiments
CI / deps
numba,netcdf4, andimportlib_resources; flake8 cleanups; excludes slow RCE / line-by-line builder tests from routine CI while shipping theearth_hifi_lwintegration table.Validation
GrayLongwaveRadiation.Reviewer notes
bd1a95a,04b2cc3) are the breaking renames called out above and are the smallest, most reviewable units.graphify-out/(≈450 files) is a committed knowledge-graph artifact, shipped on purpose: it lets an LLM build climt models from a plain-text description by querying the graph for components, signatures, and relationships (seeCLAUDE.mdfor the workflow). It inflates the file count but is intentional, not stray tooling output.