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

Unify GeosCore module initializations to accept the same arguments #4

Merged
merged 1 commit into from
Aug 8, 2018

Conversation

jimmielin
Copy link
Contributor

This commit unifies all modules in GeosCore to accept the same set of arguments - (am_I_Root, Input_Opt, State_Chm, State_Diag, RC)

This is done in preparation for moving USE-associated arrays that are dependent on grid sizing (i.e. (IIPAR, JJPAR, LLPAR)) in these modules
to State_Chm, permitting multi-domain GC-WRF coupling and, in a broader sense, running simultaneous instances of GEOS-Chem modules in the same CPU.

Important Note: GCHP Code Update Necessary
This commit changes the entry point for Init_TOMS which is being called in GCHP by gigc_chunk_mod.F90, breaking compilation for GCHP.

Solution: That entry point should be removed - please refer to the following code context taken from gigc_chunk_mod, around lines 305:

    ! Initialize other GEOS-Chem modules
    CALL GC_Init_Extra( am_I_Root, HistoryConfig%DiagList, Input_Opt,    &
                        State_Chm, State_Diag, RC ) 
    ASSERT_(RC==GC_SUCCESS)

    ! ...

    ! Allocate array of overhead O3 columns for TOMS if chemistry is on
    IF ( Input_Opt%LCHEM ) THEN
       CALL Init_TOMS( am_I_Root, Input_Opt, RC )
       ASSERT_(RC==GC_SUCCESS)
    ENDIF

Within GC_Init_Extra (from GC_Environment_Mod), the following already exists:

    !-----------------------------------------------------------------
    ! Initialize "toms_mod.F"
    !-----------------------------------------------------------------
    CALL Init_Toms( am_I_Root, Input_Opt, State_Chm, State_Diag, RC )
    IF ( RC /= GC_SUCCESS ) THEN
       ErrMsg = 'Error encountered in "Init_Toms"!'
       CALL GC_Error( ErrMsg, RC, ThisLoc )
       RETURN
    ENDIF

Which runs independent of Input_Opt%LCHEM selection. Therefore I believe that in the GCHP source, the Init_TOMS code is redundant and should be removed. It does not throw a duplicate allocation error, because there are ALLOCATED sanity checks within Init_TOMS code.

Signed-off-by: Haipeng Lin [email protected]

(am_I_Root, Input_Opt, State_Chm, State_Diag, RC)

This is done in preparation for moving USE-associated arrays in these modules
to State_Chm, permitting multi-domain GC-WRF coupling.

Signed-off-by: Haipeng Lin <[email protected]>
@msulprizio msulprizio merged commit ab6a0c5 into geoschem:Dev Aug 8, 2018
@msulprizio
Copy link
Contributor

These changes passed diff tests and unit tests

@jimmielin jimmielin deleted the devel-unify-init branch December 1, 2018 10:06
yantosca added a commit that referenced this pull request Jan 28, 2019
Rename ND42 slot #9 to "POA_C" and ND42 slot #10 to "OPOA_C" to avoid
name confusion with ND42 slots #4 and #5.  This will write the
tracerinfo.dat file with unique ND42 tracer names.

Signed-off-by: Bob Yantosca <[email protected]>
yantosca added a commit that referenced this pull request Jan 25, 2023
test/GCClassic/README.md
test/GCHP/README.md
- Added point #2 to instruct the user to run the Git commmand
  "git submodule update --init --recursive" to make sure that all
   submodules are checked otut to the proper place.
- Updated points #3 & #4 to include the instruction to check out the
  proper branch if the GEOS-Chem/HEMCO submodules do not point to the
  proper commit.  This is because very often we test branches that
  are updated in GEOS-Chem/HEMCO but not in the superprojects.

Signed-off-by: Bob Yantosca <[email protected]>
lizziel pushed a commit that referenced this pull request Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants