geoschem / geos-chem

GEOS-Chem "Science Codebase" repository. Contains GEOS-Chem science routines, run directory generation scripts, and interface code. This repository is used as a submodule within the GCClassic and GCHP wrappers, as well as in other modeling contexts (external ESMs).
http://geos-chem.org
Other
163 stars 154 forks source link

[BUG/ISSUE]Errors when compiling custom mechanism in the GEOS-Chem version 13.4.1 #1332

Closed jinlx closed 2 years ago

jinlx commented 2 years ago

Hi there,

This is Lixu from The university of Montana. I was trying to customize chemistry mechanism by adding Furans in GEOS-Chem version 13.4.1. When I was tring to compile the custom mech by using make -j in the build directory, I got the error information below:

/home/lj152920/GEOS-CHEM/rundirs/GC13.4.1/FUR_custom/CodeDir/src/GEOS-Chem/GeosCore/fullchem_mod.F90(2441): error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [ACIDUPTAKE_DUSTCHEMFUNCS]
    USE aciduptake_DustChemFuncs, ONLY : aciduptake_InitDustChem
--------^
/home/lj152920/GEOS-CHEM/rundirs/GC13.4.1/FUR_custom/CodeDir/src/GEOS-Chem/GeosCore/fullchem_mod.F90(2441): error #6580: Name in only-list does not exist or is not accessible.   [ACIDUPTAKE_INITDUSTCHEM]
    USE aciduptake_DustChemFuncs, ONLY : aciduptake_InitDustChem
-----------------------------------------^
compilation aborted for /home/lj152920/GEOS-CHEM/rundirs/GC13.4.1/FUR_custom/CodeDir/src/GEOS-Chem/GeosCore/fullchem_mod.F90 (code 1)
make[2]: *** [src/GEOS-Chem/GeosCore/CMakeFiles/GeosCore.dir/fullchem_mod.F90.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/lj152920/GEOS-CHEM/rundirs/GC13.4.1/FUR_custom/CodeDir/src/GEOS-Chem/GeosCore/mercury_mod.F90(3708): error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [HG_HETSTATEFUNCS]
    USE Hg_HetStateFuncs, ONLY : Hg_SetStateHet
--------^
/home/lj152920/GEOS-CHEM/rundirs/GC13.4.1/FUR_custom/CodeDir/src/GEOS-Chem/GeosCore/mercury_mod.F90(3786): error #6632: Keyword arguments are invalid without an explicit interface.   [I]
         I          = I,                                                     &
---------^
/home/lj152920/GEOS-CHEM/rundirs/GC13.4.1/FUR_custom/CodeDir/src/GEOS-Chem/GeosCore/mercury_mod.F90(3787): error #6632: Keyword arguments are invalid without an explicit interface.   [J]
         J          = J,                                                     &
---------^
/home/lj152920/GEOS-CHEM/rundirs/GC13.4.1/FUR_custom/CodeDir/src/GEOS-Chem/GeosCore/mercury_mod.F90(3788): error #6632: Keyword arguments are invalid without an explicit interface.   [L]
         L          = L,                                                     &
---------^
/home/lj152920/GEOS-CHEM/rundirs/GC13.4.1/FUR_custom/CodeDir/src/GEOS-Chem/GeosCore/mercury_mod.F90(3789): error #6632: Keyword arguments are invalid without an explicit interface.   [INPUT_OPT]
         Input_Opt  = Input_Opt,                                             &
---------^
/home/lj152920/GEOS-CHEM/rundirs/GC13.4.1/FUR_custom/CodeDir/src/GEOS-Chem/GeosCore/mercury_mod.F90(3790): error #6632: Keyword arguments are invalid without an explicit interface.   [STATE_CHM]
         State_Chm  = State_Chm,                                             &
---------^
/home/lj152920/GEOS-CHEM/rundirs/GC13.4.1/FUR_custom/CodeDir/src/GEOS-Chem/GeosCore/mercury_mod.F90(3791): error #6632: Keyword arguments are invalid without an explicit interface.   [STATE_MET]
         State_Met  = State_Met,                                             &
---------^
/home/lj152920/GEOS-CHEM/rundirs/GC13.4.1/FUR_custom/CodeDir/src/GEOS-Chem/GeosCore/mercury_mod.F90(3792): error #6632: Keyword arguments are invalid without an explicit interface.   [H]
         H          = State_Het,                                             &
---------^
/home/lj152920/GEOS-CHEM/rundirs/GC13.4.1/FUR_custom/CodeDir/src/GEOS-Chem/GeosCore/mercury_mod.F90(3793): error #6632: Keyword arguments are invalid without an explicit interface.   [FRACORGAER]
         fracOrgAer = GLOB_FOA(I,J,L),                                       &
---------^
/home/lj152920/GEOS-CHEM/rundirs/GC13.4.1/FUR_custom/CodeDir/src/GEOS-Chem/GeosCore/mercury_mod.F90(3794): error #6632: Keyword arguments are invalid without an explicit interface.   [RC]
         RC         = RC                                                     )
---------^
/home/lj152920/GEOS-CHEM/rundirs/GC13.4.1/FUR_custom/CodeDir/src/GEOS-Chem/GeosCore/mercury_mod.F90(3708): error #6580: Name in only-list does not exist or is not accessible.   [HG_SETSTATEHET]
    USE Hg_HetStateFuncs, ONLY : Hg_SetStateHet
---------------------------------^
compilation aborted for /home/lj152920/GEOS-CHEM/rundirs/GC13.4.1/FUR_custom/CodeDir/src/GEOS-Chem/GeosCore/mercury_mod.F90 (code 1)
make[2]: *** [src/GEOS-Chem/GeosCore/CMakeFiles/GeosCore.dir/mercury_mod.F90.o] Error 1
make[1]: *** [src/GEOS-Chem/GeosCore/CMakeFiles/GeosCore.dir/all] Error 2
make: *** [all] Error 2

The only two things I modified are the eqn and kpp file in the .../src/GEOS-Chem/KPP/custom directory. I tried to find simlilar error in github but with no luck. To reproduce the error information, you may need to use custom.eqn and custom.kpp I used, which are attached. custom.kpp.txt custom.eqn.txt

Any inputs or insights will be appreciated -Lixu

yantosca commented 2 years ago

Thanks for writing @jinlx. The error isn't in KPP but in the GEOS-Chem Custom mechanism. There were some missing files/links and also I needed to sync custom.eqn and custom.kpp with the latest updates from the fullchem mechanism. I've pushed a fix in commit 81d37e0ef81221abd22fa06a954a04551043548e, which can go into 14.0.1.

yantosca commented 2 years ago

This fix has now been merged into our patch/14.0.1 branch and will be released in version 14.0.1. I'll close out this issue now.