Constant volume-mixing-ratio test (mass consistency)

Purpose

This case reproduces the SILAM constant volume-mixing-ratio (VMR) test with real-wind conditions (Sofiev et al., Geosci. Model Dev. 8, 3497–3522, 2015, Fig. 15). It is a verification of the constancy invariant of the transport core: a uniform mixing-ratio field must stay uniform under any wind, including a realistic, non-divergence-free one.

A passive tracer is initialised to a uniform mixing ratio φ ≡ 1 everywhere and advected with real ERA5 pressure-level winds. There are no emissions, no diffusion, no deposition, and no chemistry, so the exact solution is trivial — the field stays at 1 forever. Any departure of the model VMR from 1 is therefore a purely numerical spurious source or sink, and

\[L_\infty^{n} = \max_p \lvert \varphi_p^{n} - 1 \rvert\]

measures it directly. This isolates a failure mode that conservation alone does not catch: a scheme can conserve total tracer mass yet still smear a uniform field into spurious structure when the discrete wind is divergent.

Why a uniform field is a hard test

The discrete face-velocity field built from real ERA5 winds is not divergence-free on the model grid — its maximum discrete volume divergence ‖∇·u‖∞ is of order 10⁻⁴ s⁻¹, i.e. the air mass in a cell is genuinely changing from step to step. A scheme that advects the mixing ratio φ with bare volume fluxes — ignoring that the air density ρ is itself changing — converts this divergence into a spurious tracer tendency: cells where air converges accumulate tracer, cells where it diverges lose it, and a uniform field develops ± structure. This is exactly the artefact the SILAM test was designed to expose, and the reason TARSA's transport uses a mass-consistent update.

The mass-consistent update

TARSA's transport path (build_simulation / run!) preserves the uniform field by advancing the density-weighted pair (ρ, ρφ) with the same face fluxes and recovering the mixing ratio afterwards. With cell-face area A and upwind density-weighted fluxes

\[G = A\,\bigl(u^{+}\rho_L + u^{-}\rho_R\bigr), \qquad G_\varphi = A\,\bigl(u^{+}\rho_L\varphi_L + u^{-}\rho_R\varphi_R\bigr),\]

(with u⁺ = max(u, 0), u⁻ = min(u, 0), and L/R the upwind/downwind cells), the scheme advances both ρ and ρφ and then sets

\[\varphi^{*} = \frac{(\rho\varphi)^{*}}{\rho^{*}}.\]

For a uniform field φ ≡ 1 we have ρφ = ρ cell-by-cell, so the two updates are identical, (ρφ)^{*} = ρ^{*}, and hence φ^{*} = 1 exactly — to floating-point roundoff, independent of the wind divergence. This is the constancy invariant, and it holds for both members of the explicit mass-consistent dst_koren advection family (:dst_koren_rk3 and :dst_koren_dimsplit) when mass_consistent=true, which is the default explicit configuration. Legacy volume-flux paths and the implicit replay solver do not use this density-weighted update.

Configuration

The faithful run (the script default) is a regional ERA5 case over Europe:

  • region: 35–70 °N, −15–40 °E at ERA5 0.25° resolution, 25 pressure levels
  • period: a ~144 h (6-day) window in May 2025
  • advection: high-order TVD DST-Koren (:dst_koren_rk3), CFL = 0.6
  • vertical diffusion, emissions, scavenging, deposition, chemistry: all disabled (pure advection)
  • boundaries: Dirichlet edges held at VMR = 1

Domain, dates, scheme, and CFL are environment-overridable (see the table in the case README). The figures below are the archived out/ snapshot from a shorter representative sub-window so the case is reproducible without the multi-GB faithful download.

Results

Exact constancy

With the mass-consistent update the field stays uniform to floating-point roundoff. The final-time map is featureless: every panel is at VMR = 1 (white), at the boundary layer, in the upper troposphere, and in the zonal-mean cross-section.

Constant-VMR field, mass-consistent ERA5 run

The deviation metrics are identically zero for the whole run — at every step, not just at the end:

Metric (final time)Value
Linf (`maxVMR − 1
RMS0
range [min, max][1.000, 1.000]

Deviation over time

The time series confirms there is no drift: both Linf and RMS sit exactly on zero for the entire integration, even though the driving ERA5 wind is divergent.

Constant-VMR deviation over time

The interpretation is direct: the transport path satisfies the constancy invariant exactlyLinf = 0 at every step — so under pure advection it introduces no spurious tracer no matter how divergent the real wind is.

Why this case matters

  • verifies the constancy invariant that underpins TARSA's use as a mixing-ratio transport operator — a property conservation tests alone do not guarantee
  • guards the default density-weighted (ρ, ρφ) advection against regressions that would reintroduce a divergence-driven spurious source/sink
  • is the natural companion to the mass-conservation case: that case checks the total budget, this one checks that a uniform field stays uniform

How to run

Scripts

Folder: validation/VMR

  • validation/VMR/validation_vmr_realwind.jl — runs the case and writes metrics/fields
  • validation/VMR/validation_vmr_plot.py — reproduces the SILAM-Fig-15-style maps and the deviation time series

Run

Faithful run (Europe, ~144 h; needs CDS credentials in ~/.cdsapirc):

julia --project=. validation/VMR/validation_vmr_realwind.jl
python validation/VMR/validation_vmr_plot.py

Quick run on the shipped tutorial data (no download):

TARSA_VMR_LEVELS_FILE=examples/tutorial/data/era5_2024_04_01_levels.nc \
TARSA_VMR_SURFACE_FILE=examples/tutorial/data/era5_2024_04_01_surface.nc \
julia --project=. validation/VMR/validation_vmr_realwind.jl

Outputs

Written under validation/VMR/out/:

  • vmr_metrics_era5.csvstep,time_h,min_vmr,max_vmr,linf,l1,rms
  • vmr_field_era5.nc — mixing-ratio field slices for plotting
  • vmr_field_era5.pdf, vmr_deviation_timeseries.pdf — the figures shown above