-
Notifications
You must be signed in to change notification settings - Fork 170
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
Add KPP Standalone into GEOS-Chem 14.5.1 #2588
Merged
yantosca
merged 44 commits into
dev/no-diff-to-benchmark
from
feature/kpp-standalone-in-14.5.1
Dec 2, 2024
Merged
Add KPP Standalone into GEOS-Chem 14.5.1 #2588
yantosca
merged 44 commits into
dev/no-diff-to-benchmark
from
feature/kpp-standalone-in-14.5.1
Dec 2, 2024
Conversation
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
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
run/shared/kpp_standalone_interface.yml - Fixed typo: "output_dir" -> "output_directory" Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
GeosCore/fullchem_mod.f90 - Use keyword arguments, for clarity GeosCore/kpp_standalone_interface.F90 - Remove Active_Cell and Active_Cell_Name from KPP_Standalone_YAML - Add new derived type KPP_Standalone_ActiveCell_Type, which is now declared with !$OMP THREADPRIVATE. This contains the Active_Cell and Active_Cell_Name fields. - Added new variable KPP_Standalone_ActiveCell, based on new KPP_Standalone_ActiveCell_Type NOTE: The KPP_Standalone_YAML is initialized outside of a parallel loop, so it does not need to be declared !$OMP THREADPRIVATE. But the choice of whether an (I,J,L) location corresponds to one of the "active_cells" (listed in the kpp_standalone_interface.yml file) happens within a parallelized loop. Thus we need to move the Active_Cell and Active_Cell_Name fields out of KPP_Standalone_YAML and into KPP_Standalone_ActiveCell. Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
run/shared/kpp_standalone_interface.yml - Reorganize file so that "settings:" comes first, then "active_cells:", and then "locations:" - Add "settings:activate" YAML tag to toggle the KPP standalone interface on or off GeosCore/kpp_standalone_interface.F90 - Add call to QFYAML_Add_Get to parse the "settings:activate" YAML tag - Set KPP_Standalone_YAML%SkipIt to .TRUE. if "settings:activate" is false. This will cause the code to ignore saving out the state of the model for the KPP standalone even if kpp_standalone_interface.yml is present in the run directory. Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
run/GCClassic/createRunDir.sh - Copy run/shared/kpp_standalone_interface.yml to fullchem rundirs run/shared/cleanRunDir.sh - Skip removing bpch files (and {diag,tracer}info.dat files), we no longer generate bpch output - Add comments and usage examples - Remove all fort.* files - Remove OututDir/*.txt files as well (these are KPP standalone interface files) CHANGELOG.md - Updated accordingly Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
.gitignore - Also ignore *.exe files GeosCore/fullchem_mod.F90 - Remove State_Grid from call to Check_ActiveCell GeosCore/kpp_standalone_interface.F90 - Updated subroutine header comments - Added cosmetic changes for clarity (mostly making code fit within 80 characters, for better readability) - Removed Active_Cell and Active_Cell_name from the KPP_Standalone_Interface_Type (should have been done previously) - Remove State_Grid argument from Check_ActiveCell, this was only used for debugging. Also removed commented out debug prints. - Use Format statements with write statments where expedient - Echo a message when the KPP standalone interface is manually disabled (i.e. when settings:activate = false) - Added display of location names and lon/lats at end of the routine Config_KPP_Standalone - In routine Write_Samples, wrap file I/O in an !$OMP CRITICAL block, in order to prevent more than one thread from writing to each file. - Removed RETURN statement from within !$OMP CRITICAL block, this is not allowed. - Bug fix: Write Kpp_Standalone_ActiveCell%Active_Cell_Name to file, and not Kpp_Standalone_YAML%Active_Cell_Name (which has been removed). Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
GeosCore/kpp_standalone_interface.F90 - Moved to kppsa_interface_mod.F90 GeosCore/kppsa_interface_mod.F90 - Moved from kpp_standalone_interface - Renamed types, variables and routines using "KppSa" prefix: - KPP_Standalone_Interface_Type -> KppSa_Interface_Type - KPP_Standalone_ActiveCell_Type -> KppSa_ActiveCell_Type - KPP_Standalone_YAML -> KppSa_State - KPP_Standalone_ActiveCell -> KppSa_ActiveCell - Check_Domain -> KppSa_Check_Domain - Check_ActiveCell -> KppSa_Check_ActiveCell - Config_KPP_Standalone -> KppSa_Config - Write_Samples -> KppSa_Write_Samples - Cleanup_KPP_Standalone -> KppSa_Cleanup - Added KppSa_Check_Time function to determine if it is time to write KPP standalone output. This allows you to only write output e.g. at the end of a run instead of for each timestep. - Added KppSa_State%SkipWriteAtThisTime field, which is used to determine if we need to exit a routine early. GeosCore/fullchem_mod.F90 - "USE Kpp_Standalone_Interface" -> "USE KppSa_Interface_Mod" - Call renamed routines from kppsa_interface_mod.F90 - Now call KppSa_Check_Domain only if it is the first call to DO_FULLCHEM. This is to avoid repeated computations. - Now call KppSa_Check_Time to determine if we are in the time window when the model state should be archived to disk. - Updated comments and comment headers run/shared/kpp_standalone_interface.yml - Added "start_output_at" to denote starting date time for archiving model state - Added "stop_output_at" to denote ending date time for archiving model state - Updated comments CHANGELOG.md GeosCore/CMakeLists.txt - Updated accordingly Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
GeosCore/kppsa_interface_mod.F90 - In routine KppSa_Check_Time: - rRmoved leftover debug print statements - In routine Kpp_Check_ActiveCell - Added an IF statement to exit after setting KppSa_State%Active_Cell to .FALSE. and KppSa_Active_Cell_Name to '' if we are outside of the time window specified in the kpp_standalone_interface.yml fiel. - This will ensure that we only archive model state to disk during the specified time window, which helps with computatonal efficiency. - In routine KppSa_Config: - Now write starting & ending date of archival window to log file Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
run/GCHP/createRunDir.sh - Added an if statement to copy run/shared/kpp_standalone_interface.yml to GCHP fullchem run directories (any option) Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
Changed the CEDS TMB emission fields to actually emit TMB like they're supposed to, instead of emitting HCOOH. I'm not sure if this fix needs to go into any other HEMCO_Config.rc template files, either in run/GCClassic or in other run/ directories, but hopefully we can make any other necessary changes down the line
KPP/standalone - Folder which contains source code from the GitHub repository: https://github.com/geoschem/KPP-Standalone. This is a fork of the https://github.com/KineticPreProcessor/KPP-Standalone repo by Obin Sturm, Mike Long, and Christoph Keller. The branch geoschem-dev is checked out. This is where we can place GEOS-Chem-specific updates without touching the original code in the kpp-standalone branch. branch is set to geoschem-dev, which is the branch to be used for interfacing into the GEOS-Chem model .gitmodules - This was updated by running the command: git submodule add -b geoschem-dev \ https://github.com/geoschem/KPP-Standalone \ KPP/standalone CHANGELOG.md - Updated accordingly KPP/fullchem/Makefile KPP/fullchem/kpp_standalone*.F90 KPP/fullchem/samples_kpp_standalone/* - Removed from the KPP/fullchem folder. KPP/standalone - Folder containing code from https://github.com/geoschem/KPP-Standalone Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
KPP/CMakeLists.txt - Add calls to "add_directory(standalone)" in the fullchem and custom "if" blocks. This will tell CMake to look for the CMakeLists.txt file in the KPP/standalone folder, and to build the standalone files (libKppStandalone.a) after libKPP.a has been built. Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
Changed the CEDS TMB emission fields to actually emit TMB like they're supposed to, instead of emitting HCOOH.
Changed the CEDS TMB emission fields to actually emit TMB like they're supposed to, instead of emitting HCOOH.
This merge brings PR #2483 (KPP standalone from Obin Sturm, by @obin1 and @lizziel) into the GEOS-Chem 14.6.0 development stream. This PR does the following: 1. Adds submodule https://github.com/geoschem/KPP-Standalone in the KPP/standalone folder 2. Updates KPP/CMakeListst.txt to build the KPP standalone executable when the GEOS-Chem executable is built (currently only for fullchem or custom mechanisms) Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
This merge brings PR #2482 (KPP standalone interface from Obin Sturm, by @lizziel) into the GEOS-Chem 14.5.1 development stream. This PR brings the interface for the KPP standalone box model into GEOS-Chem 14.6.0. A new kpp_standalone_interface.yml file is placed into the run directory. In this YAML file, the user can select the locations and times for archiving model state to text files that can be fed into the KPP standalone model. Also the writing of files is now done in a thread-safe manner. Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
This merge brings PR #2483 (KPP standalone from Obin Sturm, by @obin1 and @lizziel) into the GEOS-Chem 14.5.1 development stream. This PR does the following: 1. Adds submodule https://github.com/geoschem/KPP-Standalone in the KPP/standalone folder 2. Updates KPP/CMakeListst.txt to build the KPP standalone executable when the GEOS-Chem executable is built (currently only for fullchem or custom mechanisms) Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
This commit informs the GEOS-Chem repository about the following commits that were pushed to the geoschem/KPP-Standalone repo: cfccbe7 (HEAD -> geoschem-dev, origin/geoschem-dev) Remove build_executable.sh from geoschem-dev branch 337668e Merge kpp-standalone into geoschem-dev (14.5.0 mechanism) Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
yantosca
added
category: Feature Request
New feature or request
topic: Chemical Mechanisms
Related to KPP and/or GEOS-Chem chemistry mechanisms
no-diff-to-benchmark
This update will not change the results of fullchem benchmark simulations
labels
Nov 22, 2024
This was referenced Nov 22, 2024
lizziel
requested changes
Nov 22, 2024
.gitmodules - Now pull the "GC_Interface" tag instead of the geoschem-dev branch GeosCore/fullchem_mod.F90 - Removed unused code run/shared/cleanRunDir.sh - Updated comments in header. Now use --force (but any non-empty argument) will cause files to be removed w/o user confirmation. CHANGELOG.md - Updated accordingly Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
CHANGELOG.md - Now note that we pull the KPP-Standalone repo from the "GC_Interface" tag, not a branch. Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
lizziel
requested changes
Dec 2, 2024
.gitmodules - Removed the "tag = GC_Interface" line. We only need to use the URL, as we will commit the hash that points to the most recent commit in the KPP-Standalone repo. Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
CHANGELOG.md - We no longer require to check out the GC_Interface tag for the KPP-Standalone submodule. We have made the corresponding edit to the CHANGELOG.md file. Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
lizziel
approved these changes
Dec 2, 2024
yantosca
force-pushed
the
feature/kpp-standalone-in-14.5.1
branch
from
December 2, 2024 17:24
0a2bdda
to
8bd451f
Compare
This was referenced Dec 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
category: Feature Request
New feature or request
no-diff-to-benchmark
This update will not change the results of fullchem benchmark simulations
topic: Chemical Mechanisms
Related to KPP and/or GEOS-Chem chemistry mechanisms
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Name and Institution (Required)
Name: Bob Yantosca
Institution: Harvard + GCST
Describe the update
This PR brings the updates that were formerly in geos-chem PR #2382 and geos-chem PR #2383 into the dev/no-diff-to-benchmark branch. These will ship in 14.5.1.
Expected changes
This is a zero-diff update
Related Github Issue