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

Added RRTMG and RATS toggles and settings #649

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open

Conversation

msl3v
Copy link

@msl3v msl3v commented Oct 1, 2024

MSL

@msl3v msl3v requested a review from a team as a code owner October 1, 2024 21:39
AGCM.rc.tmpl Outdated
@@ -865,6 +865,8 @@ DIURNAL_BIOMASS_BURNING: yes
RATS_PROVIDER: @RATS_PROVIDER # options: PCHEM, GMICHEM, STRATCHEM (Radiatively active tracers)
AERO_PROVIDER: @AERO_PROVIDER # options: GOCART2G, MAM, none (Radiatively active aerosols)
ANALYSIS_OX_PROVIDER: @OANA_PROVIDER # options: PCHEM, GMICHEM, STRATCHEM, GOCART
CH4_PROVIDER: @CH4_PROVIDER # options: GOCART, GHG, none (GHG = RRG)
Copy link
Member

@mathomp4 mathomp4 Oct 2, 2024

Choose a reason for hiding this comment

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

Looks like no setup script is providing @CH4_PROVIDER (and I'm guessing @CO2_PROVIDER), so you probably need edits in those.

Copy link
Author

Choose a reason for hiding this comment

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

Ah. Yes. Thanks. Will do.

Copy link
Author

Choose a reason for hiding this comment

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

@mathomp4 OK. Done. Do I need to create a new PR? The changes are pushed to the mslong1/rrg+rad branch

Copy link
Member

Choose a reason for hiding this comment

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

No. You did right, though I found a small bug. I just pushed a fix and we'll see how CI goes.

AGCM.rc.tmpl Show resolved Hide resolved
@sdrabenh
Copy link
Collaborator

sdrabenh commented Oct 2, 2024

MSL

@msl3v can you please provide a description on what is intended behind this PR and what configurations these changes will support? Will there be corresponding changes to the setup scripts?

@msl3v msl3v added the 0 diff The changes in this pull request have verified to be zero-diff with the target branch. label Oct 2, 2024
@msl3v
Copy link
Author

msl3v commented Oct 3, 2024

There are two primary changes in this set of PRs.

Radiatively Relevant Gases (RRG) Gridcomp: This gridcomp was developed to supercede GOCART for GHG modeling in GEOS. This PR is the 1st formal introduction of RRG into the GEOS-ESM base. There are no gridcomps that currently depend on RRG by default. It lives in @GEOSchem_GridComp

RRTMG:
a) The RRTMG longwave radiation module was modified to receive 3D CO2 fields for LW forcing. CO2 can be provided by either GOCART or RRG. The default settings were not modified
b) A "double-call" was added to the RRTMG LW module that enables online computation of GHG-specific LW radiative forcing diagnostics for any of the RAT gases (CO2, CH4, CFCs, N2O, etc...)

The setup will be (should have been already :-/) modified to populate relevant AGCM.rc settings to default values that preserve a zero-diff result.

gcm_setup Outdated Show resolved Hide resolved
@mathomp4
Copy link
Member

mathomp4 commented Oct 3, 2024

@msl3v Well, first up the GNU build is not happy:

/root/project/GEOSgcm/src/Components/@GEOSgcm_GridComp/GEOSagcm_GridComp/GEOSphysics_GridComp/@GEOSchem_GridComp/@RRG/RRGMod.F90:350:45:

  350 |     type (MAPL_MetaComp), pointer     :: mapl
      |                                             1
Error: Symbol 'gridcomprun1' at (1) cannot have a type

here is a permalink for this: https://github.com/GEOS-ESM/RRG/blob/2324ec4cdb54cc961f0e868d762ad319e6448da7/RRGMod.F90#L350

I honestly do not know why it's unhappy. You are just declaring a pointer. @tclune any ideas?

But beyond that, Intel builds but the run is dying with:

exception: unknown provider none                                                                                                                                                                                                                                           
pe=00003 FAIL at line=01520    GEOS_ChemGridComp.F90                    <unknown error>

and the issue seems to be that none is not an allowed provider:

https://github.com/GEOS-ESM/GEOSchem_GridComp/blob/d7cf3052142bdd0156a3f1cd30bad6b80bb5cf93/GEOS_ChemGridComp.F90#L1483

@tclune
Copy link
Collaborator

tclune commented Oct 3, 2024

I don't know the precise problem, but do have some general recommendations. (And some might have an impact.)

  1. All modules should have a default private to avoid re-exporting things. Makes the compilation more efficient at the very least.
  2. Consider adding some namespace prefix to your module names. Some of them are rather generic (e.g., global_mod)and could cause a collision in other contexts.

@mathomp4
Copy link
Member

mathomp4 commented Oct 3, 2024

I'm going to try building the RRG model with GNU on discover. See if I can reproduce this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 diff The changes in this pull request have verified to be zero-diff with the target branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants