Skip to content

Fast-JX: interpolate all 8 pressure-axis cross-sections over P, not T (~2x surface-J inflation on carbonyls) - #237

Open
xk-y wants to merge 2 commits into
EarthSciML:mainfrom
xk-y:fix/fjx-pressure-axis-sigma
Open

Fast-JX: interpolate all 8 pressure-axis cross-sections over P, not T (~2x surface-J inflation on carbonyls)#237
xk-y wants to merge 2 commits into
EarthSciML:mainfrom
xk-y:fix/fjx-pressure-axis-sigma

Conversation

@xk-y

@xk-y xk-y commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

FJX_spec.dat marks four species' cross-section tables with the p prefix (rows p177 / p566 / p999): the interpolation axis is mid-layer pressure in hPa, and Cloud-J's JRATET dispatches them on the SQQ='p' flag, calling X_interp with PP (hPa). The port passed temperature (Kelvin) into these axes — evaluating σ at "P = T kelvin hPa" (~288 hPa at the surface instead of ~1000 hPa).

Affected channels and surface-J inflation (all 8 FJX p-blocks): J_ActAld ≈ 2.4×, J_MeVK(a/b/c) ≈ 2.3×, J_MEKeto ≈ 2.05×, J_MGlyxl ≈ 2.0×, J_Glyxla ≈ 1.6×; J_Aceta is 0.92× (the T-eval under-estimated it, so the fix slightly raises it); J_Glyxlb’s σ is pressure-flat (unchanged). Correction to an earlier revision of this description, which mis-stated J_Aceta as ~2.1× — that figure belongs to MEKeto. Carbonyl photolysis is an HOx source, so full-mechanism runs get a spurious radical boost.

Change

  • All eight p-block species (MeVKa/b/c, Aceta, ActAld, MGlyxl, MEKeto, Glyxla, Glyxlb, Glyxlc) now take pressure in hPa (self-documenting arg rename), with a comment tying them to the FJX p-rows.
  • Both call paths pass P / (100 P_unit): the online FastJX() equations, and the FastJX_interpolation_troposphere() builder via a species-key dispatch set (_FJX_PRESSURE_AXIS_J).
  • Verified in the built equations on both paths: they now read clamp(P / (100P_unit), 177.0, 999.0); mtkcompile passes for both constructors.

Scope

The SuperFast coupler wires none of these channels — SuperFast runs unaffected. Full GEOS-Chem-mechanism runs (mech=:all) are affected. At P > 999 hPa the Flat() clamp mirrors Cloud-J's own edge handling.

Found by a numerical equivalence audit of this stack against GEOS-Chem Classic 14.7.1 / Cloud-J v8.0 (p-prefix provenance + recomputed J ratios). Part of the Stage-6 series in #225. Independent of #234 (tables) — mergeable in any order.

…MGlyxl) over P, not T

FJX_spec.dat marks these four species' cross-section tables with the 'p'
prefix (rows p177/p566/p999): the interpolation axis is mid-layer PRESSURE
in hPa, and Cloud-J's JRATET dispatches them on the SQQ='p' flag, calling
X_interp with PP (hPa). The port passed TEMPERATURE (Kelvin) into these
axes, evaluating sigma at "P = T kelvin hPa" (~288 hPa at the surface
instead of ~1000 hPa) -- inflating the affected J values by ~2x at the
surface (J_ActAld ~2.4x, J_MeVK ~2.3x, J_MEK ~2.1x, J_MGlyxl ~2.0x)
with diurnal-integrated errors of +94% to +127%.

Both call paths are fixed and verified in the built equations (they now
read clamp(P / (100 P_unit), 177, 999)): the online FastJX() system and
the FastJX_interpolation_troposphere() builder, whose species-key dispatch
set (_FJX_PRESSURE_AXIS_J) selects P for exactly these channels. The
SuperFast coupler wires none of these channels, so SuperFast runs are
unaffected; full GEOS-Chem-mechanism runs (mech=:all) are.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.44%. Comparing base (4cb6241) to head (68dbcc7).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #237      +/-   ##
==========================================
+ Coverage   87.42%   87.44%   +0.01%     
==========================================
  Files          20       20              
  Lines        1463     1465       +2     
==========================================
+ Hits         1279     1281       +2     
  Misses        184      184              
Flag Coverage Δ
docs 71.16% <76.92%> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…yxlc

The initial commit covered only 4 of the 8 FJX_spec.dat p-prefixed blocks;
MEKeto, Glyxla, Glyxlb, Glyxlc still interpolated their cross-sections over
temperature. Their built equations (both the online FastJX() and the
interpolation path) now read clamp(P/(100 P_unit), 177, 999). Verified: no
p-axis species clamps T on either path; J_MEKeto surface old(T)/new(P) = 2.05x
(the inflation is removed). Glyxlb's sigma happens to be pressure-flat so its
value is unchanged, but it is included for correctness. The Glyxlc value test
compared the built j (now P-interpolated) against a hardcoded T=298 call; its
RHS now passes P/100 to match. Caught by an adversarial self-review of EarthSciML#237.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@xk-y xk-y changed the title Fast-JX: interpolate pressure-axis cross-sections (MeVK/Aceta/ActAld/MGlyxl) over P, not T (~2x surface-J inflation) Fast-JX: interpolate all 8 pressure-axis cross-sections over P, not T (~2x surface-J inflation on carbonyls) Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant