ecCKD Files

The core package defines dependency-free ecCKD schema objects:

  • EcCKDDefinition stores model name, version, dimensions, variables, and global attributes.
  • summarize_ecckd_definition extracts benchmark/report metadata such as LW/SW band counts, g-point counts, gases, pressure/temperature grid sizes, and source/Rayleigh table availability.
  • validate_ecckd_definition checks required dimensions and variable groups before any runtime gas-optics model is constructed.

NetCDF-backed loading lives in NumericalRadiationNCDatasetsExt, so NCDatasets.jl is an optional dependency rather than a hard dependency of the standalone runtime package. Load NCDatasets before calling read_ecckd_definition(path::String):

using NumericalRadiation
using NCDatasets

definition = read_ecckd_definition("ecckd-definition.nc")
summary = summarize_ecckd_definition(definition)
validate_ecckd_definition(definition)

Without NCDatasets, path-based loading throws a clear error while the core schema types remain available.

Reference ecCKD Data

The package resolves reference ecCKD definition files through Artifacts.toml. The pinned ecrad_data artifact points at the upstream ecRad source archive used by the validation suite. Users can override this with RH_ECRAD_DATA_PATH when they already have an ecRad checkout or unpacked data directory.

using NumericalRadiation

reference_ecckd_model_inventory()
spec = reference_ecckd_model_spec("32x32")
paths = reference_ecckd_definition_paths(spec)
paths.longwave
paths.shortwave

Resolution order is:

  1. RH_ECRAD_DATA_PATH
  2. lazy ecrad_data artifact
  3. a local developer checkout at validation/external/ecrad (the layout used by the validation-platform branch)

Individual files can be addressed by filename or by stable keys: :longwave_32, :shortwave_32, :longwave_64, :shortwave_64, and :shortwave_96.

Published model pairs can be selected with compact names:

reference_ecckd_model_specs()
read_reference_ecckd_gas_optics("64x32"; names=(:dry_air, :H₂O, :CO₂), water_vapor_mole_fraction=0.005)

The gas Symbols in names — :H₂O, :CO₂, :O₃, :CH₄, :N₂O, :CFC₁₁, :CFC₁₂ and :dry_air — are the chemical formulas, as in Breeze's BackgroundAtmosphere, and the dry air that the ecCKD files call the composite gas. The readers translate them to the files' variable prefixes (h2o_molar_absorption_coeff, composite_molar_absorption_coeff, …) with ecckd_file_gas_name; no other code sees the files' names.

Path lookup with require=false is non-mutating: it checks environment paths, installed artifacts, and local validation data without downloading the lazy artifact. Use the default require=true in production workflows when the reference files should be downloaded automatically if needed.

Reference ecCKD Source

The package also resolves the reference ecCKD source tree through the lazy ecckd_source artifact. This is the small C++/shell source release containing the original optimize_lut, cost-function, and training-script machinery. It does not include the large CKDMIP line-by-line spectral absorption database.

using NumericalRadiation

source = ecckd_source_path()
joinpath(source, "src", "ecckd", "optimize_lut.cpp")

Resolution order is:

  1. RH_ECCKD_SOURCE_PATH
  2. lazy ecckd_source artifact
  3. a local developer checkout at validation/external/ecckd (the layout used by the validation-platform branch)

Exact reconstruction of the published ecCKD training problem still requires the CKDMIP line-by-line training database in addition to this source tree.