forked from geoschem/geos-chem
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CMake and structural updates for the aciduptake simulation
CMake updates: (1) Added KPP/aciduptake/CMakeLists.txt (2) Added if block in KPP/CMakeLists.txt for add_subdirectory based on the value of MECH. If MECH=fullchem, configure KPP/fullchem, etc. (3) In all KPP/*/CMakeLists.txt, removed multiple target names. e.g. KPPFirstPass_fullchem, KPPFirstPass_custom, and KPPFirstPass_aciduptake is just KPP_FirstPass, and similarly for the KPP target. (4) GeosCore/CMakeLists.txt references the KPP target. (5) Headers/CMakeLists.txt references the KPP_FirstPass target. Other code updates: (1) Broke off acid dust uptake rate-law functions into a new module KPP/aciduptake/aciduptake_DustChemFuncs.F90. (2) KPP/aciduptake folder has symbolic links to the other fullchem_*.F90 and rateLawUtilFuncs.F90 modules in the KPP/fullchem folder. (3) Added a stub module KPP/fullchem/aciduptake_DustChemFuncs.F90 since this needs to be called from GeosCore/fullchem_mod.F90. (4) Updated comments, added formatting. Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
- Loading branch information
Showing
11 changed files
with
335 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,35 @@ | ||
add_library(Headers STATIC EXCLUDE_FROM_ALL | ||
charpak_mod.F90 | ||
CMN_DIAG_mod.F90 | ||
CMN_FJX_MOD.F90 | ||
CMN_O3_mod.F90 | ||
CMN_SIZE_mod.F90 | ||
diaglist_mod.F90 | ||
dictionary_m.F90 | ||
taggeddiaglist_mod.F90 | ||
errcode_mod.F90 | ||
input_opt_mod.F90 | ||
inquireMod.F90 | ||
physconstants.F90 | ||
precision_mod.F90 | ||
qfyaml_mod.F90 | ||
registry_mod.F90 | ||
registry_params_mod.F90 | ||
roundoff_mod.F90 | ||
species_database_mod.F90 | ||
species_mod.F90 | ||
state_chm_mod.F90 | ||
state_diag_mod.F90 | ||
state_grid_mod.F90 | ||
state_met_mod.F90 | ||
) | ||
target_link_libraries(Headers | ||
PUBLIC | ||
$<$<STREQUAL:${MECH},fullchem>:KPPFirstPass_fullchem> | ||
$<$<STREQUAL:${MECH},custom>:KPPFirstPass_custom> | ||
#------------------------------------------------------ | ||
### Kludge for KPP development (can remove this later) | ||
### bmy, msl, 3/16/21 | ||
$<$<STREQUAL:${MECH},aerochem>:KPPFirstPass_aerochem> | ||
#------------------------------------------------------ | ||
# Headers/CMakeLists.txt | ||
|
||
#---------------------------------------------------------------------------- | ||
# Define libHeaders.a | ||
#---------------------------------------------------------------------------- | ||
add_library(Headers | ||
STATIC EXCLUDE_FROM_ALL | ||
charpak_mod.F90 | ||
CMN_DIAG_mod.F90 | ||
CMN_FJX_MOD.F90 | ||
CMN_O3_mod.F90 | ||
CMN_SIZE_mod.F90 | ||
diaglist_mod.F90 | ||
dictionary_m.F90 | ||
taggeddiaglist_mod.F90 | ||
errcode_mod.F90 | ||
input_opt_mod.F90 | ||
inquireMod.F90 | ||
physconstants.F90 | ||
precision_mod.F90 | ||
qfyaml_mod.F90 | ||
registry_mod.F90 | ||
registry_params_mod.F90 | ||
roundoff_mod.F90 | ||
species_database_mod.F90 | ||
species_mod.F90 | ||
state_chm_mod.F90 | ||
state_diag_mod.F90 | ||
state_grid_mod.F90 | ||
state_met_mod.F90 | ||
) | ||
|
||
# Define dependencies for libHeaders.a | ||
target_link_libraries(Headers PUBLIC KPP_FirstPass) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
# Build the fullchem mechanism if configured with -DMECH=fullchem | ||
# (This is the default option) | ||
if("${MECH}" STREQUAL fullchem) | ||
add_subdirectory(fullchem) | ||
add_subdirectory(fullchem) | ||
endif() | ||
|
||
# Build the aciduptake mechanism if configured with -DMECH=aciduptake | ||
if("${MECH}" STREQUAL aciduptake) | ||
add_subdirectory(aciduptake) | ||
add_subdirectory(aciduptake) | ||
endif() | ||
|
||
# Build the custom mechanism if configured with -DMECH=custom | ||
if("${MECH}" STREQUAL custom) | ||
add_subdirectory(custom) | ||
add_subdirectory(custom) | ||
endif() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# KPP/aciduptake/CMakeLists.txt | ||
|
||
#---------------------------------------------------------------------------- | ||
# Add libKPPFirstPass.a -- aciduptake mechanism | ||
#---------------------------------------------------------------------------- | ||
add_library(KPP_FirstPass | ||
STATIC EXCLUDE_FROM_ALL | ||
gckpp_Precision.F90 | ||
gckpp_Parameters.F90 | ||
gckpp_Monitor.F90 | ||
) | ||
|
||
# Define dependencies for libKPP_FirstPass.a | ||
target_link_libraries(KPP_FirstPass PUBLIC GEOSChemBuildProperties) | ||
|
||
#---------------------------------------------------------------------------- | ||
# Add libKPP.a -- aciduptake mechanism | ||
#---------------------------------------------------------------------------- | ||
add_library(KPP | ||
STATIC EXCLUDE_FROM_ALL | ||
aciduptake_DustChemFuncs.F90 | ||
fullchem_HetStateFuncs.F90 | ||
fullchem_RateLawFuncs.F90 | ||
fullchem_SulfurChemFuncs.F90 | ||
gckpp_Function.F90 | ||
gckpp_Global.F90 | ||
gckpp_Initialize.F90 | ||
gckpp_Integrator.F90 | ||
gckpp_Jacobian.F90 | ||
gckpp_JacobianSP.F90 | ||
gckpp_LinearAlgebra.F90 | ||
gckpp_Model.F90 | ||
gckpp_Monitor.F90 | ||
gckpp_Parameters.F90 | ||
gckpp_Precision.F90 | ||
gckpp_Rates.F90 | ||
gckpp_Util.F90 | ||
rateLawUtilFuncs.F90 | ||
) | ||
|
||
# Define dependencies for libKPP.a | ||
target_link_libraries(KPP PUBLIC GeosUtil) | ||
|
||
# When building libKPP.a, treat REAL as if it were REAL*8 | ||
target_compile_options(KPP | ||
PRIVATE "" | ||
$<$<STREQUAL:"${CMAKE_Fortran_COMPILER_ID}","Intel">:-r8> | ||
$<$<STREQUAL:"${CMAKE_Fortran_COMPILER_ID}","GNU">:-fdefault-real-8 -fdefault-double-8> | ||
) |
Oops, something went wrong.