Skip to content

Chemistry Test Cases

David Fillmore edited this page Oct 8, 2026 · 2 revisions

Chemistry Test Cases

The global Chapman + NOx case is the compact end-to-end photochemistry example. It uses the x1.40962 mesh, 26 vertical levels, six transported chemistry species, four TUV-x photolysis reactions, and spatial solar geometry.

All declarative inputs are in examples/chemistry/chapman-nox-global/:

Base data

Download the JW baroclinic-wave archive. It supplies x1.40962.grid.nc and the exact eight-rank partition used by this example, but no initial state. Generate x1.40962.init.nc first: copy namelist.init_atmosphere and streams.init_atmosphere from examples/idealized/jw-baroclinic-wave/ into the extracted archive and run init_atmosphere_model there with the matching partition.

Create x1.40962.chapman_nox_init.nc as a copy of the JW initial state and add these f8(Time,nCells,nVertLevels) fields with units kg kg-1. For layer-center height z_km and dry-air molar mass Mair = 0.02897 kg mol-1:

Field Initial dry-air mass mixing ratio
qO2 0.21 * 0.032 / Mair
qO3 1.0e-5 * exp(-((z_km - 25)² / (2 * 7²)))
qO 1.0e-12
qO1D 0.0
qNO 1.0e-9 * 0.030 / Mair
qNO2 1.0e-9 * 0.046 / Mair

Use z_km = 0.001 * 0.5 * (zgrid(k) + zgrid(k+1)). Preserve every existing dimension, variable, attribute, value, and the mesh cell order.

The release script scripts/init_chapman_nox.py writes these fields:

python scripts/init_chapman_nox.py -i x1.40962.init.nc \
  -o x1.40962.chapman_nox_init.nc

It omits qO1D, which the model then creates at zero.

These are deliberately idealized initial concentrations. They are useful for a photolysis/coupling test but are neither assimilated nor chemically spun up.

Run directory

Stage:

atmosphere_model
LANDUSE.TBL
namelist.atmosphere
streams.atmosphere
stream_list.atmosphere.output
chapman_nox.yaml
tuvx_chapman_nox.json
tuvx_upper_atm.csv
data/
x1.40962.chapman_nox_init.nc
x1.40962.graph.info.part.8

data/ is the TUV-x data directory from pinned MUSICA. Launch with eight MPI ranks.

Expected configuration

  • dynamics step: 450 s;
  • duration: 24 hours;
  • chemistry every dynamics step;
  • TUV-x update: 3600 s;
  • upper column: legacy_static;
  • solar coordinates: each cell's latCell/lonCell; and
  • output: an hourly scalars array containing qO2, qO, qO1D, qO3, qNO, and qNO2, plus the four j_<reaction> diagnostics selected by the output list.

Check the log for all six species, four photolysis parameters, the resolved qO3 index, and normal model completion.

Clone this wiki locally