Reproduction code — Conditional maximum entropy production in Earth-system branch selection: transport closure, quasi-potentials, and dynamical accessibility

Published: 25 June 2026| Version 1 | DOI: 10.17632/fcwptcnh4p.1
Contributor:

Description

This dataset is the self-contained replication package for the paper "Conditional maximum entropy production in Earth-system branch selection: transport closure, quasi-potentials, and dynamical accessibility" (S. Kaneko). The paper asks when an Earth-system maximum-entropy-production (MEP) ordering selects the realized branch among the coexisting attractors of a specified slow transport dynamics. Once the slow transport variable is given an effective dynamics, branch selection is governed by the full Freidlin-Wentzell quasi-potential - of which the resolved entropy production is only the time-antisymmetric part - rather than by the dissipation rate. The omitted non-gradient structure, of which the time-symmetric activity (frenesy) is one part, is set by the eddy and turbulent transport closure that empirical parameterizations fix by hand; it is identified here through the closure-induced non-gradient current rather than decomposed. The scripts make this concrete in minimal predator-prey closures and in the standard reduced model of equatorial superrotation, and they quantify when a closure reverses the dissipation ordering. The package regenerates every figure (Figs. 1-11) and every numerical diagnostic in the paper, including: the closure-to-activity (Lyapunov) circulation table; the weak-noise Fokker-Planck selection scan within the bistable window, with its saddle-node threshold and crossing; the directly computed quasi-potential gap by the geometric minimum-action method (gMAM), with the Omega=0 gradient-limit validation and path-resolution convergence; the self-consistent single-channel model (MEP-aligned: the higher-dissipation branch is selected, frenesy not overturning the ordering); a two-channel closure that yields a genuine but conditional reversal (the lower-dissipation regime selected in a minority of cases); a deterministic straight-line quasi-potential predictor that forecasts which closures reverse in about nine of ten cases; a structurally distinct second (Hill-toggle) closure confirming the reversal is not a mass-action artifact; the superrotation quasi-potential under both the Hadley-cell-feedback and wave-jet-resonance mechanisms; and the Eyring-Kramers prefactor / Maxwell-degeneracy analysis. Contents: 11 Python reproduction scripts; the 11 figures they produce, as PDF and PNG; a README.md mapping each script to its paper figure and section and tabulating the numerical audit trail (grids, domains, noise strengths, boundary conditions, convergence); requirements.txt (minimum versions) and requirements-lock.txt (the exact verified build); run_all.sh; and run_all_expected_output.txt (expected stdout for the main-text scripts). All computations are deterministic - the predictor scan draws its closures from fixed random seeds - so all reported results are reproducible. Verified with Python 3.12, numpy 2.4.4, scipy 1.17.1, and matplotlib 3.10.8.

Files

Steps to reproduce

Step 1. Environment. Use Python 3.12 (3.10+ also works) on Linux or macOS. The package was verified with numpy 2.4.4, scipy 1.17.1, matplotlib 3.10.8. Step 2. Install dependencies. For the exact verified build, run: pip install -r requirements-lock.txt -- or, for the minimum-version constraints (any recent releases reproduce the deterministic results), run: pip install -r requirements.txt (equivalently: pip install numpy scipy matplotlib ). Step 3. Unpack. Extract MEP_sequel_replication.zip; all scripts and figures are in the MEP_sequel_replication/ folder. Run the scripts from inside that folder. Step 4. Run everything with: bash run_all.sh -- this executes all reproduction scripts in order; each writes its figure as a PDF and a PNG and prints its numerical diagnostics to stdout. To run individual results instead (script -> paper figure): python3 reproduce_eddy_activity.py -> Fig. 1 (closure-to-activity table; FP selection scan with saddle-node and selection-crossing thresholds) python3 reproduce_quasipotential.py -> Fig. 2 (gMAM quasi-potential gap; Omega=0 validation; crossing) python3 reproduce_unified_predprey.py -> Fig. 3 (self-consistent single-channel model; MEP-aligned) python3 reproduce_two_regime.py -> Fig. 4 (two-channel closure; conditional reversal) python3 reproduce_predictor.py -> Fig. 5 (straight-line quasi-potential predictor; scan accuracy) python3 reproduce_superrotation.py -> Figs. 6-7 (superrotation quasi-potential; Maxwell forcing) python3 reproduce_probe.py -> Fig. 8 (App. C divergence-free probe) python3 reproduce_control.py -> Fig. 9 (App. D skeleton-preserving lambda-scan) python3 reproduce_gmam.py run -> App. E 3D gMAM gap (bare call runs only the self-test) python3 reproduce_prefactor.py reg -> App. E 1/eps regression python3 reproduce_prefactor.py maxwell -> Fig. 10 (App. E Maxwell-set lambda_M and prefactor sign) python3 reproduce_second_closure.py -> Fig. 11 (App. F second, Hill-toggle, two-channel closure) Step 5. Check the output. Compare the printed numbers against run_all_expected_output.txt (the expected stdout of the main-text scripts: Figs. 1-7, Secs. IV and VII) and against the audit tables in README.md. The figures should match the PDF and PNG figure files in the package. Step 6. Notes. All computations are deterministic (fixed seeds). The main-text scripts run in seconds to a few minutes; the appendix-diagnostic scripts (reproduce_probe.py, reproduce_control.py, reproduce_gmam.py, reproduce_prefactor.py, reproduce_second_closure.py) take a few minutes each. The optional minority-fraction scan python3 reproduce_second_closure.py scan and the predictor scan are the longest (about 5-7 min). A benign scipy RuntimeWarning ("eigenvalue pair whose sum is very close to zero", resolved by perturbation) on the near-equilibrium Lyapunov solves is expected and does not affect results.

Categories

Statistical Mechanics, Non-Equilibrium Statistical Mechanics, Random Dynamical Systems, Atmospheric Dynamics

Licence