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
Open
Conversation
…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>
38 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FJX_spec.datmarks four species' cross-section tables with thepprefix (rowsp177 / p566 / p999): the interpolation axis is mid-layer pressure in hPa, and Cloud-J'sJRATETdispatches them on theSQQ='p'flag, callingX_interpwithPP(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
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 FJXp-rows.P / (100 P_unit): the onlineFastJX()equations, and theFastJX_interpolation_troposphere()builder via a species-key dispatch set (_FJX_PRESSURE_AXIS_J).clamp(P / (100P_unit), 177.0, 999.0);mtkcompilepasses 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 theFlat()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.