GEOS-Chem photolysis completion: 62 new channels — 13 dedicated Cloud-J σ tables + 49 surrogate mappings (63 → 125 coupled) - #226
Open
xk-y wants to merge 3 commits into
Open
Conversation
Connect the organic surrogate photolysis channels that GEOS-Chem 14.1.1 photolyzes via surrogate cross-sections but the EarthSciML port left at j=0, and port the dedicated Cloud-J v7.3e cross-sections for the species that have them. The GEOSChemGasPhase<->FastJX coupling goes from 63 to 125 connected photolysis reactions (+62 organic channels). src/Fast-JX.jl: - Add 13 dedicated v7.3e cross-sections (ONIT1, ETNO3, IPRNO3, NPRNO3, MVKN, MACRN, MACRNP, ICN, ETHLN, NITP, HMHP, HP2, ENOL; ETNO3/IPRNO3 are two-temperature via create_fjx_interp([240, 298])), each with a j_X(t) output variable and a j_X ~ j_mean_X(T/T_unit, flux_vars) equation. The 18-bin layout was verified against the port's sigma_CH3OOH (17/18 bins). src/fastjx_couplings.jl: - couple2(GEOSChemGasPhase, FastJX): wire 62 organic channels. Hydroperoxides map to /CH3OOH/, organic & alkyl nitrates to /CH3NO3/, plus the 19 channels that use the 13 dedicated cross-sections, plus /MGlyxl//PrAld//H2O2/ for a few carbonyls/peroxides. Assignments and j-factors follow GEOS-Chem's FJX_j2j.dat (v7.3e). ETP keeps its 0.5 j-factor. Scope / correctness notes: - 62 (not 55) organic channels: several are multi-line reactions in geoschem_fullchem.jl that the original single-line survey missed. - j2j indices align with the port only in the organic block (j_79+); the inorganic block does not, so surrogate assignment matches by species and uses the index only to disambiguate a/b channels (e.g. INPDa -> /CH3OOH/ vs INPDb -> /ONIT1/). - Three inorganic same-species second channels are intentionally NOT added (j_17 HNO4->OH+NO3, j_29 BrNO3 2nd, j_36 N2O): the sibling channel is already wired at factor 1.0, so adding at 1.0 would double-count, and v7.3e collapses HNO4/CH3CHO to a single channel (no branching factor). These need the real 14.1.1 FJX_j2j.dat branching and are left as follow-up. - Halogen/iodine/SO4/aerosol-nitrate channels (~29) remain deferred (the port lacks those cross-sections; low tropospheric-O3 impact). Tests: - Extend "Compose GEOSChem FastJX" to assert all 62 new channel connections and the ETP 0.5 factor. - Add "GEOSChem dedicated photolysis cross-sections": 13 j-value regressions, two-temperature interpolation for ETNO3/IPRNO3, and diurnal zeroing at night. - 143/143 assertions pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…_INTERP_J_FULL 64→77) After merging photolysis-completion (13 dedicated-σ species + their j_mean_* funcs in Fast-JX.jl) into the interp branch, append those 13 species to _FJX_INTERP_J_FULL so FastJX_interpolation_ troposphere(mech=:all) exposes them. The .bson flux grid (P×cosSZA×18 WL bins) is channel- independent, so no regeneration is needed — only the list entries (the σ/ϕ are code in Fast-JX.jl). The interp test asserts all 13 dedicated channels are exposed and that GEOSChemGasPhase couples to them. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #226 +/- ##
==========================================
+ Coverage 87.45% 87.65% +0.20%
==========================================
Files 20 20
Lines 1467 1491 +24
==========================================
+ Hits 1283 1307 +24
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:
|
38 tasks
Member
|
@copilot resolve the merge conflicts in this pull request |
# Conflicts: # test/fastjx_test.jl
Member
|
@xk-y It seems that in bins 1-16:
But, in bin 17 all four are different from the formulas by a factor of 3. If this the case, please confirm that it's intentional and not a transcription mistake. And if all the values are supposed to match those formulas, we can just use the formulas rather than writing out all the values. |
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.
completion/bugfix · numerical drift for GEOS-Chem users (previously-zero channels activate)
Motivation
GEOSChemGasPhasedeclares ~154 photolysis reactions, but only 63 were wired to FastJX j-values — every remaining organic channel (carbonyls, organic nitrates, peroxides, epoxides, ...) ran with an effective rate of zero, systematically underestimating photolytic loss and radical production. This PR wires 62 of the remaining channels and leaves 29 deferred (63 + 62 + 29 = 154).Change (hybrid)
FJX_spec.dat) and inserted intoFast-JX.jlfor the species whose spectra have no adequate surrogate. The generator (gen_sigma.py) had anf0quantum-yield bug — fixed before table generation.couple2— 13 bind the new dedicated tables above, 49 bind spectrally similar surrogate σ (hybrid lookup); the 3 inorganic two-channel species are excluded from the surrogate path (they need per-channel quantum yields and stay on their dedicated treatment). Surrogate assignments and j-scaling factors follow GEOS-Chem'sFJX_j2j.dat(Cloud-J v7.3e, index-aligned in the organic block and species-verified), including the branch factors — e.g. ETP photolyzes at0.5 × j(CH3OOH), GEOS-Chem's ownFJX_j2j.datfactor, not an ad-hoc choice.FastJX_interpolation) covers the new couplings.Figure — left: coupled channels 63 → 125; right: full accounting of the ~154 declared photolysis reactions (63 already wired + 62 newly wired + 29 deferred). 13 of the 62 use new dedicated Cloud-J v7.3e σ tables; the rest reuse existing surrogate σ.
Compatibility impact
This is a bugfix: channels that previously contributed zero now photolyze, so GEOS-Chem coupled baselines shift — this aligns the port with the GEOS-Chem / Cloud-J v7.3e reference, where all these channels are active. No API change; SuperFast users unaffected. Note the baseline drift in release notes.
Validation
Pkg.testgreen (rc=0) in the upstream environment on this branch.Dependencies
None (cut from
main; independent of the aerosol stack). Suggested merge order: after #223 (rate_ALK), per the tracking issue.Limitations
Part of the coordinated cross-repo update tracked in #225.