Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GEOS-Chem 14.5.0 build in CESM by excluding hard dependencies on HEMCO #2542

Open
wants to merge 3 commits into
base: dev/no-diff-to-benchmark
Choose a base branch
from

Conversation

jimmielin
Copy link
Contributor

Name and Institution (Required)

Name: Haipeng Lin
Institution: Harvard Univ.

Describe the update

In the CESM model, emissions through HEMCO are provided to GEOS-Chem through the physics buffer and not through the HEMCO subroutine calls. A side-effect of this implementation is that HEMCO versions and GEOS-Chem versions in CESM can be decoupled, and thus hard-dependencies on HEMCO data structures should not apply.

In this particular case, additional ExtState fields in HEMCO are causing CESM build failures in the latest GEOS-Chem version. Most (but not all) subroutines in hco_interface_gc_mod.F90 are unused in CESM and are now blocked off from MODEL_CESM to avoid this hard dependency.

Note: HCOI_GC_WriteDiagn was rearranged in the module but otherwise unchanged, in order to use one #if !defined( MODEL_CESM )

Expected changes

None

Reference(s)

N/A

Related Github Issue

Building CESM with latest GEOS-Chem tag 14.5.0-rc.0

…HEMCO

In the CESM model, emissions through HEMCO are provided to GEOS-Chem through the physics buffer and not through the HEMCO subroutine calls. A side-effect of this implementation is that HEMCO versions and GEOS-Chem versions in CESM can be decoupled, and thus hard-dependencies on HEMCO data structures should not apply.

In this particular case, additional ExtState fields in HEMCO are causing CESM build failures in the latest GEOS-Chem version. Most (but not all) subroutines in hco_interface_gc_mod.F90 are unused in CESM and are now blocked off from MODEL_CESM to avoid this hard dependency.

Signed-off-by: Haipeng Lin <[email protected]>
@yantosca yantosca self-assigned this Oct 31, 2024
@yantosca yantosca self-requested a review October 31, 2024 16:07
@yantosca yantosca added category: Interface to External Model Related to GEOS-Chem updates needed to interface with other models topic: CESM Related to running GEOS-Chem in CESM category: Bug Fix Fixes a previously-reported bug and removed category: Bug Fix Fixes a previously-reported bug labels Oct 31, 2024
Copy link
Contributor

@yantosca yantosca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @jimmielin. We just need a changelog update.

@jimmielin
Copy link
Contributor Author

Thanks @yantosca, changelog updated!

@lizziel lizziel self-requested a review November 1, 2024 14:21
CHANGELOG.md Outdated
@@ -40,6 +40,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Removed EDGAR8_CH4_AWB emissions from CH4 and carbon simulations to avoid double counting with GFED
- Fixed formatting error in `.github/workflows/stale.yml` that caused the Mark Stale Issues action not to run
- Fixed emissions in GCHP carbon ExtData.rc so that data in molecules/cm2/s are converted to kg/m2/s
- Excluded HEMCO interface and ExtState fields from `MODEL_CESM` in `hco_interface_gc_mod.F90` for compatibility with CESM, which runs HEMCO separately
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you move this to Changed? Fixed implies there was a bug in a previous version which in this case I don't think there was.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, done! Thank you

Copy link
Contributor

@yantosca yantosca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@msulprizio msulprizio changed the base branch from dev/14.5.0 to dev/no-diff-to-benchmark November 1, 2024 18:13
@msulprizio
Copy link
Contributor

Note that I have changed the base branch to dev/no-diff-to-benchmark since this will go into 14.5.1 and not 14.5.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Interface to External Model Related to GEOS-Chem updates needed to interface with other models topic: CESM Related to running GEOS-Chem in CESM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants