From 481ea943bd2745c47784b23b4d8d36c7d3467079 Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Fri, 12 Jul 2024 13:57:23 -0400 Subject: [PATCH] Throw a CMake error if FAST-JX is used for any mech except Hg src/GCHP_GridComp/GEOSChem_GridComp/CMakeLists.txt - Add an if block to throw a fatal error if the FASTJX compile option is selected for fullchem, custom, or carbon simulations. Fullchem and custom mechanisms use Cloud-J. We still need to use the FAST-JX photolysis scheme with Hg pending input file updates. CHANGELOG.md - Updated accordingly Signed-off-by: Bob Yantosca --- CHANGELOG.md | 14 +++++++++----- src/GCHP_GridComp/GEOSChem_GridComp/CMakeLists.txt | 8 ++++++++ 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ca2dc5a2..d2cd39021 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,18 @@ # Changelog This file documents all notable changes to the GCHP wrapper repository starting in version 14.0.0. See also CHANGELOG files for individual submodules, such as: -- src/GCHP_GridComp/GEOSChem_GridComp/geos-chem/CHANGELOG.md -- src/GCHP_GridComp/GEOSChem_GridComp/HEMCO/CHANGELOG.md -- src/GCHP_GridComp/GEOSChem_GridComp/Cloud-J/CHANGELOG.md -- src/GCHP_GridComp/GEOSChem_GridComp/HETP/CHANGELOG.md -- src/MAPL/CHANGELOG.md +- `src/GCHP_GridComp/GEOSChem_GridComp/geos-chem/CHANGELOG.md` +- `src/GCHP_GridComp/GEOSChem_GridComp/HEMCO/CHANGELOG.md` +- `src/GCHP_GridComp/GEOSChem_GridComp/Cloud-J/CHANGELOG.md` +- `src/GCHP_GridComp/GEOSChem_GridComp/HETP/CHANGELOG.md` +- `src/MAPL/CHANGELOG.md` The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] - TBD +### Changed +- CMake now throws an error if FAST-JX is used with any other mechanism than Hg + ## [14.4.1] - 2024-06-28 ### Fixed - Fixed formatting error in `.github/workflows/stale.yml` that caused the Mark Stale Issues action not to run diff --git a/src/GCHP_GridComp/GEOSChem_GridComp/CMakeLists.txt b/src/GCHP_GridComp/GEOSChem_GridComp/CMakeLists.txt index 1036e4ec4..48ea0fbb0 100755 --- a/src/GCHP_GridComp/GEOSChem_GridComp/CMakeLists.txt +++ b/src/GCHP_GridComp/GEOSChem_GridComp/CMakeLists.txt @@ -147,3 +147,11 @@ 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) + +# Throw an error unless we are using the Hg mechanism, +# The fullchem & custom mechanisms now use Cloud-J! +if(${FASTJX}) + if(NOT ${MECH} MATCHES "Hg") + message(FATAL_ERROR "FASTJX can only be used with the Hg mechanism!") + endif() +endif()