Skip to content
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Added multiphase sulfate chemistry and cloud Hplus diagnostic for Travis et al. (2025)
- Added `IONIC` output argument in calls to HETP driver routine `MACH_HETP_Main15Cases`
- Added APM restart file paths to `run/shared/download_data.yml`
- Added code blocks for MAPL3 code in development

### Changed
- Renamed `State_Chm%Isorrop*` fields to `State_Chm%Ate*` (aerosol thermodynamical equilibrium), as ISORROPIA is no longer used
Expand All @@ -21,13 +22,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Updated `run/shared/download_data.py` and `run/shared/setupForRestarts.sh` to read APM restart file paths
- Selected RODAS3.1 as the default integration method for the fullchem mechanism; Regenerated fullchem solver files with KPP 3.4.0
- Updated the minimum version of KPP needed to build the fullchem mechanism from 3.2.0 to 3.4.0
- Changed C-preprocessor switch MODEL_ to MODEL_EXTERNAL, and ESMF_ to USE_ESMF

### Fixed
- Fixed incorrect variable names and removed unused variables in `NcdfUtil/ncdf_mod.F90`

### Fixed
- Fixed incorrect Arrhenius "A" coefficient (1.97d-12 --> 1.97d-11) in C3H8 + OH = A3O2 rxn

### Removed
- Removed obsolete code in dust_mod.F90
- Removed unused subroutine I_Am_UnOPENed in inquireMod.F90

## [14.7.1] - 2026-04-08
### Added
- Added `HTAP_SHIP` toggle in `HEMCO_Config.rc.carbon` templates for GC-Classic and GCHP
Expand Down
180 changes: 176 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@ message("=================================================================")
#
# Optionally, super project can define and configure this target.
#-----------------------------------------------------------------------------
if(NOT TARGET GEOSChemBuildProperties)
if(MODEL_GCHP)
add_library(GEOSChemBuildProperties INTERFACE)
else()
if(NOT TARGET GEOSChemBuildProperties)
add_library(GEOSChemBuildProperties INTERFACE)
endif()
endif()

#-----------------------------------------------------------------------------
Expand All @@ -54,15 +58,183 @@ add_subdirectory(GTMM)
add_subdirectory(GeosCore)

#-----------------------------------------------------------------------------
# Build GEOS-Chem Classic driver program (if MODEL_CLASSIC=T)
# Build GEOS-Chem Classic driver program if using GC-Classic
#-----------------------------------------------------------------------------
if(MODEL_CLASSIC)
add_subdirectory(Interfaces/GCClassic)
endif()

#-----------------------------------------------------------------------------
# Build GCHPctm driver program (if MODEL_GCHPCTM=T)
# Build GCHP driver program if using GCHP
#-----------------------------------------------------------------------------
if(MODEL_GCHPCTM)
if(MODEL_GCHP)
add_subdirectory(Interfaces/GCHP)
endif()

#-----------------------------------------------------------------------------
# Additional GEOS-Chem settings if using GCHP
#-----------------------------------------------------------------------------
# This next part is in the GCHP repo if using MAPL2, but is moved here for
# MAPL3 to make maintenance of most GEOS-Chem settings confined to one
# repository, and the library hierarchy more logical.

if(MAPL3)
if(MODEL_GCHP)

set(RRTMG OFF CACHE BOOL
"Switch to build RRTMG as a component of GEOS-Chem"
)
set(TOMAS OFF CACHE BOOL
"Switch to build TOMAS as a component of GEOS-Chem"
)
set(LUO_WETDEP OFF CACHE BOOL
"Switch to build the Luo et al (2020) wetdep scheme into GEOS-Chem"
)
set(FASTJX OFF CACHE BOOL
"Switch to use legacy FAST-JX photolysis in GEOS-Chem"
)
set(KPPSA OFF CACHE BOOL
"Switch to build the KPP-Standalone Box Model"
)
set(MAPL3 OFF CACHE BOOL
"Switch to build with MAPL3 rather than MAPL2"
)

# Local variables
set(GTMM FALSE)
set(MECH "fullchem" CACHE STRING "Name of the chemistry mechanism to use")

# Configure build properties for GEOS-Chem
target_compile_definitions(GEOSChemBuildProperties INTERFACE
MODEL_GCHP
USE_ESMF
MAPL_ESMF
EXTERNAL_GRID
NC_HAS_COMPRESSION
$<$<BOOL:${USE_REAL8}>:USE_REAL8> $<$<BOOL:${RRTMG}>:RRTMG>
$<$<BOOL:${ADJOINT}>:ADJOINT>
$<$<BOOL:${REVERSE_OPERATORS}>:REVERSE_OPERATORS>
$<$<BOOL:${TOMAS}>:TOMAS>
$<$<STREQUAL:${TOMAS_BINS},15>:TOMAS15>
$<$<STREQUAL:${TOMAS_BINS},40>:TOMAS40>
$<$<BOOL:${LUO_WETDEP}>:LUO_WETDEP>
$<$<BOOL:${FASTJX}>:FASTJX>
$<$<BOOL:${MAPL3}>:MAPL3>
)

target_link_libraries(GEOSChemBuildProperties INTERFACE
$<LINK_ONLY:MAPL.base>
$<LINK_ONLY:FVdycoreCubed_GridComp>
$<LINK_ONLY:HCOI_MAPL_ESMF>
$<$<BOOL:${OMP}>:OpenMP::OpenMP_Fortran>
MPI::MPI_C MPI::MPI_Fortran
$<LINK_ONLY:mapl3g>
$<LINK_ONLY:MAPL.generic3g>
$<LINK_ONLY:MAPL.state>
)
target_include_directories(GEOSChemBuildProperties INTERFACE
$<TARGET_PROPERTY:mapl3g,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:MAPL.generic3g,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:MAPL.state,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:MAPL.base,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:FVdycoreCubed_GridComp,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:HCOI_MAPL_ESMF,INTERFACE_INCLUDE_DIRECTORIES>
${CMAKE_Fortran_MODULE_DIRECTORY}
)
# Turn off acg for now
#mapl_acg(GEOSchem_GridComp GEOSchem_StateSpecs.rc
# IMPORT_SPECS EXPORT_SPECS INTERNAL_SPECS
# GET_POINTERS DECLARE_POINTERS
# 3g
#)

set(GEOSChem_Fortran_FLAGS_Intel
-cpp -w -auto -noalign "SHELL:-convert big_endian" "SHELL:-fp-model source"
-mcmodel=medium -shared-intel -traceback -DLINUX_IFORT
CACHE STRING "GEOSChem compiler flags for all build types with Intel compilers"
)
set(GEOSChem_Fortran_FLAGS_RELEASE_Intel
-O2
CACHE STRING "GEOSChem compiler flags for build type release with Intel compilers"
)
set(GEOSChem_Fortran_FLAGS_RELWITHDEBINFO_Intel
-O2
CACHE STRING "GEOSChem compiler flags for build type relwithdebinfo with Intel compilers"
)
set(GEOSChem_Fortran_FLAGS_DEBUG_Intel
-g -O0 "SHELL:-check arg_temp_created" "SHELL:-debug all" -fpe0 -ftrapuv -check,bounds
CACHE STRING "GEOSChem compiler flags for build type debug with Intel compilers"
)

set(GEOSChem_Fortran_FLAGS_GNU
-cpp -w -std=legacy -fautomatic -fno-align-commons
-fconvert=big-endian -fno-range-check -mcmodel=medium
-fbacktrace -g -DLINUX_GFORTRAN -ffree-line-length-none
CACHE STRING "GEOSChem compiler flags for all build types with GNU compilers"
)
set(GEOSChem_Fortran_FLAGS_RELEASE_GNU
-O3 -funroll-loops
CACHE STRING "GEOSChem compiler flags for build type release with GNU compilers"
)
set(GEOSChem_Fortran_FLAGS_RELWITHDEBINFO_GNU
-O3 -funroll-loops
CACHE STRING "GEOSChem compiler flags for build type relwithdebinfo with GNU compilers"
)
set(GEOSChem_Fortran_FLAGS_DEBUG_GNU
-g -gdwarf-2 -gstrict-dwarf -O0 -Wall -Wextra -Wconversion -Warray-temporaries
-fcheck=array-temps -ffpe-trap=invalid,zero,overflow -finit-real=snan
-fcheck=bounds -fcheck=pointer
CACHE STRING "GEOSChem compiler flags for build type debug with GNU compilers"
)
set(CMAKE_Fortran_FLAGS "")
set(CMAKE_Fortran_FLAGS_RELEASE "")
set(CMAKE_Fortran_FLAGS_Debug "")
set(CMAKE_Fortran_FLAGS_RelWithDebInfo "")

set(GEOSChem_SUPPORTED_COMPILER_IDS "Intel" "GNU")
if(NOT CMAKE_Fortran_COMPILER_ID IN_LIST GEOSChem_SUPPORTED_COMPILER_IDS)
message(FATAL_ERROR "GEOSChem does not support ${CMAKE_Fortran_COMPILER_ID} compilers")
endif()

#---------------------------------------------------------------------
# Assign comiler options to build properties
#---------------------------------------------------------------------
target_compile_options(GEOSChemBuildProperties
INTERFACE
$<$<STREQUAL:${CMAKE_Fortran_COMPILER_ID},Intel>:
${GEOSChem_Fortran_FLAGS_Intel}
$<$<CONFIG:Debug>:${GEOSChem_Fortran_FLAGS_DEBUG_Intel}>
$<$<CONFIG:RelWithDebInfo>:${GEOSChem_Fortran_FLAGS_RELWITHDEBINFO_Intel}>
$<$<CONFIG:Release>:${GEOSChem_Fortran_FLAGS_RELEASE_Intel}>
>
$<$<STREQUAL:${CMAKE_Fortran_COMPILER_ID},GNU>:
${GEOSChem_Fortran_FLAGS_GNU}
$<$<CONFIG:Debug>:${GEOSChem_Fortran_FLAGS_DEBUG_GNU}>
$<$<CONFIG:RelWithDebInfo>:${GEOSChem_Fortran_FLAGS_RELWITHDEBINFO_GNU}>
$<$<CONFIG:Release>:${GEOSChem_Fortran_FLAGS_RELEASE_GNU}>
>
)

target_compile_definitions(GEOSChemBuildProperties
INTERFACE
$<$<STREQUAL:${CMAKE_Fortran_COMPILER_ID},Intel>:LINUX_IFORT>
$<$<STREQUAL:${CMAKE_Fortran_COMPILER_ID},GNU>:LINUX_GFORTRAN>
)

# Print the options that are turned on in GEOS-Chem
list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_CURRENT_SOURCE_DIR}/CMakeScripts)
include(GC-Helpers)
gc_pretty_print(SECTION "Settings")
gc_pretty_print(VARIABLE MECH OPTIONS "fullchem" "carbon" "custom")
gc_pretty_print(VARIABLE OMP IS_BOOLEAN)
gc_pretty_print(VARIABLE USE_REAL8 IS_BOOLEAN)
gc_pretty_print(VARIABLE APM IS_BOOLEAN)
gc_pretty_print(VARIABLE TOMAS IS_BOOLEAN)
gc_pretty_print(VARIABLE RRTMG IS_BOOLEAN)
gc_pretty_print(VARIABLE GTMM IS_BOOLEAN)
gc_pretty_print(VARIABLE LUO_WETDEP IS_BOOLEAN)
gc_pretty_print(VARIABLE FASTJX IS_BOOLEAN)
gc_pretty_print(VARIABLE KPPSA IS_BOOLEAN)

endif()
endif()
1 change: 1 addition & 0 deletions GeosCore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ endif()

# Define dependencies for libGeosCore.a
target_link_libraries(GeosCore PUBLIC
GeosUtil
ObsPack
History
KPP
Expand Down
8 changes: 3 additions & 5 deletions GeosCore/calc_met_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ MODULE CALC_MET_MOD
PUBLIC :: INTERP
PUBLIC :: SET_DRY_SURFACE_PRESSURE
PUBLIC :: Set_Clock_Tracer
#if defined( ESMF_ ) || defined( EXTERNAL_GRID )
#if defined( EXTERNAL_GRID )
PUBLIC :: GCHP_Cap_Tropopause_Prs
#endif
!
Expand Down Expand Up @@ -845,7 +845,7 @@ SUBROUTINE INTERP( NTIME0, NTIME1, NTDT, Input_Opt, State_Grid, State_Met )

END SUBROUTINE INTERP
!EOC
#if defined( ESMF_ ) || defined( EXTERNAL_GRID )
#if defined( EXTERNAL_GRID )
!------------------------------------------------------------------------------
! GEOS-Chem Global Chemical Transport Model !
!------------------------------------------------------------------------------
Expand All @@ -855,9 +855,7 @@ END SUBROUTINE INTERP
!
! !DESCRIPTION: Subroutine GCHP\_CAP\_TROPOPAUSE\_PRS caps the tropopause
! pressure in polar latitudes to 200 hPa, so that we don't end up doing
! troposheric chemistry too high over the poles. This is done in the
! standalone GEOS-Chem, and we also need to apply this when running
! GEOS-Chem within the GEOS-5 GCM.
! tropospheric chemistry too high over the poles.
!\\
!\\
! !INTERFACE:
Expand Down
2 changes: 0 additions & 2 deletions GeosCore/cleanup.F90
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ SUBROUTINE CLEANUP( Input_Opt, State_Grid, ERROR, RC )
USE Carbon_Gases_Mod, ONLY : Cleanup_Carbon_Gases
USE DEPO_MERCURY_MOD, ONLY : CLEANUP_DEPO_MERCURY
USE DRYDEP_MOD, ONLY : CLEANUP_DRYDEP
USE DUST_MOD, ONLY : CLEANUP_DUST
USE ErrCode_Mod
USE ERROR_MOD, ONLY : DEBUG_MSG
USE FullChem_MOD, ONLY : Cleanup_FullChem
Expand Down Expand Up @@ -121,7 +120,6 @@ SUBROUTINE CLEANUP( Input_Opt, State_Grid, ERROR, RC )
!=================================================================
CALL CLEANUP_CARBON()
CALL CLEANUP_DRYDEP()
CALL CLEANUP_DUST()
CALL CLEANUP_ATE()
CALL CLEANUP_PJC_PFIX()
CALL CLEANUP_PRESSURE()
Expand Down
2 changes: 1 addition & 1 deletion GeosCore/drydep_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3643,7 +3643,7 @@ FUNCTION AERO_SFCRSII( K, II, PRESS, TEMP, USTAR, RHB, W10, VTSout, Input_Opt, S
! Use the formulation of Slinn and Slinn (1980) for the impaction over
! water surfaces (jaegle 5/11/11)
IF (LUC == 14) THEN
#ifdef MODEL_GCHPCTM
#ifdef MODEL_GCHP
! Include check that winds are non-zero to avoid div by 0 error
IF ( IS_SAFE_DIV(1.e+0_f8, W10) ) THEN
RS = 1.e+0_f8 / (USTAR**2.e+0_f8/ (W10*VON_KARMAN) * &
Expand Down
46 changes: 0 additions & 46 deletions GeosCore/dust_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ MODULE DUST_MOD
PUBLIC :: RDUST_ONLINE
PUBLIC :: GET_DUST_ALK
PUBLIC :: INIT_DUST
PUBLIC :: CLEANUP_DUST
!
! !PRIVATE MEMBER FUNCTIONS:
!
Expand All @@ -56,10 +55,6 @@ MODULE DUST_MOD
INTEGER :: id_DALbin6, id_DALbin7, id_DUST01
INTEGER :: id_NK01

! Arrays
REAL(fp), ALLOCATABLE :: FRAC_S(:)
REAL(fp), ALLOCATABLE :: SRCE_FUNC(:,:,:)

#ifdef TOMAS
! To replicate the obsolete Input_Opt%IDDEP field
! Set to a large placeholder value
Expand Down Expand Up @@ -2076,9 +2071,6 @@ SUBROUTINE INIT_DUST( Input_Opt, State_Chm, State_Diag, State_Grid, RC )
id_DUST01 = Ind_('DUST01')
id_NK01 = Ind_('NK01' )

!----------------------------------
! Set up FRAC_S (only for Ginoux)
!----------------------------------
!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
!% NOTE: LDEAD has not been set by HCOI_GC_INIT yet. This code needs %
!% to be moved or modified accordingly (mps, 4/9/15) %
Expand All @@ -2105,44 +2097,6 @@ SUBROUTINE INIT_DUST( Input_Opt, State_Chm, State_Diag, State_Grid, RC )
ENDIF
#endif

#if defined( ESMF_ ) || defined( TOMAS )
! EXPERIMENTAL: For archiving the dust source for GCHP
!
! Changed to use the ESMF_ flag and not EXTERNAL_GRID/EXTERNAL_FORCING, as
! WRF-GC which uses these flags does not require SRCE_FUNC (hplin, 1/22/19)
ALLOCATE( SRCE_FUNC(State_Grid%NX,State_Grid%NY,3), STAT=AS )
IF ( AS /= 0 ) CALL ALLOC_ERR( 'SRCE_FUNC' )
SRCE_FUNC = 0.e+0_fp
#endif

END SUBROUTINE INIT_DUST
!EOC
!------------------------------------------------------------------------------
! GEOS-Chem Global Chemical Transport Model !
!------------------------------------------------------------------------------
!BOP
!
! !IROUTINE: cleanup_dust
!
! !DESCRIPTION: Subroutine CLEANUP\_DUST deallocates all module arrays.
!\\
!\\
! !INTERFACE:
!
SUBROUTINE CLEANUP_DUST
!
! !REVISION HISTORY:
! 30 Mar 2004 - R. Yantosca - Initial version
! See https://github.com/geoschem/geos-chem for complete history
!EOP
!------------------------------------------------------------------------------
!BOC
!=================================================================
! CLEANUP_DUST begins here!
!=================================================================
IF ( ALLOCATED( FRAC_S ) ) DEALLOCATE( FRAC_S )
IF ( ALLOCATED( SRCE_FUNC ) ) DEALLOCATE( SRCE_FUNC )

END SUBROUTINE CLEANUP_DUST
!EOC
END MODULE DUST_MOD
Loading