Skip to content

Abstract inlined code in fullchem_mod.F90 to separate subroutines in order to reduce clutter and duplciation#3235

Draft
yantosca wants to merge 2 commits intomainfrom
feature/abstract-code-in-fullchem-mod
Draft

Abstract inlined code in fullchem_mod.F90 to separate subroutines in order to reduce clutter and duplciation#3235
yantosca wants to merge 2 commits intomainfrom
feature/abstract-code-in-fullchem-mod

Conversation

@yantosca
Copy link
Copy Markdown
Contributor

@yantosca yantosca commented Mar 11, 2026

Name and Institution (Required)

Name: Bob Yantosca
Institution: Harvard + GCST

Describe the update

In this PR we seek to abstract long inlined code blocks in GeosCore/fullchem_mod.F90 (e.g. where diagnostics are archived, etc). into separate subroutines. This will reduce clutter and avoid duplication.

Inlined Code Moved to subroutine
Zeroing diagnostic arrays at start of DO_FULLCHEM Zero_Diagnostics_at_Start_of_Fullchem
Zeroing of counter and dummy species Zero_Dummy_Species
Archiving the ConcBeforeChem diagnostic Archive_ConcBeforeChem
Getting photolysis rates and updating diagnostics Get_Photolysis_Rates
CESM only: Photolyze soluble aerosols CESM_Photolyze_Soluble_Aerosols
Archiving RxnRates and RxnConst diagnostics Archive_RxnRate_Diags

Expected changes

This will be a no-diff-to-benchmark update.

Related Github Issue

Tagging @lizziel @msulprizio

@yantosca yantosca added this to the 14.7.1 milestone Mar 11, 2026
@yantosca yantosca self-assigned this Mar 11, 2026
@yantosca yantosca added category: Feature Request New feature or request topic: Structural Modifications Related to GEOS-Chem structural modifications (as opposed to scientific updates) no-diff-to-benchmark This update will not change the results of fullchem benchmark simulations Topic: Fullchem Simulations Related to full-chemistry simulations labels Mar 11, 2026
@yantosca yantosca modified the milestones: 14.7.1, 14.8.0 Apr 3, 2026
@yantosca yantosca changed the base branch from dev/no-diff-to-benchmark to main April 8, 2026 15:59
@yantosca yantosca removed this from the 14.8.0 milestone Apr 21, 2026
GeosCore/fullchem_mod.F90
- Abstracted inlined code into the following subroutines:
  - Zeroing of dummy species --> Zero_Dummy_Species
  - ConcAfterChem diagnostic --> ArchiveConcAfterChem
  - Photolysis rates /diags  --> Get_Photolysis_Rates
  - CESM unphysical fix      --> CESM_Photolyze_Soluble_Aerosols

CHANGELOG.md
- Updated accordingly

Signed-off-by: Bob Yantosca <[email protected]>
GeosCore/fullchem_mod.F90
- Moved the IF statements that zero diagnostic arrays at the start
  of DO_FULLCHEM to routine Zero_Diagnostics_at_Start_of_Fullchem
- Moved the archival of the RxnRates, RxnConst, and SatDiagnRxnRates
  collections to routine Archive_RxnRates_Diags

Signed-off-by: Bob Yantosca <[email protected]>
@yantosca yantosca force-pushed the feature/abstract-code-in-fullchem-mod branch from e8c9c2d to 056dcb6 Compare April 22, 2026 20:12
@yantosca
Copy link
Copy Markdown
Contributor Author

I have rebased this PR atop GEOS-Chem 14.7.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: Feature Request New feature or request no-diff-to-benchmark This update will not change the results of fullchem benchmark simulations Topic: Fullchem Simulations Related to full-chemistry simulations topic: Structural Modifications Related to GEOS-Chem structural modifications (as opposed to scientific updates)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Abstract diagnostic code from Do_Fullchem

1 participant