Skip to content

Conversation

sshakoor1
Copy link
Contributor

@sshakoor1 sshakoor1 commented Apr 9, 2024

The purpose of this PR is to fully rewrite gcm_setup in python, as a small start of a larger effort to refactor the GEOS codebase.

Some notes:

  • This code has been refactored to match gcm_v12 which is future of the gcm, not the current develop branch (https://github.com/GEOS-ESM/GEOSgcm_App/tree/feature/sdrabenh/gcm_v12).
  • gcm_setup has been uncharacteristically edited/expanded upon quite a bit this past year, so a lot of features have yet to be added (e.g. singularity sandbox, etc.). In addition, some parts of the code may be outdated from the latest commit of the mainline script.
  • jinja2 templating is being used, and in order for it to work jinja's delimiter syntax needed to implemented into all the template files. This means that all variables in gcm_setup that previously had the syntax @foo now look like {{ foo }}.
  • Cloning experiments is still a work in progress and is not currently an option. In the future it will require passing in yaml files created from previous experiments.
  • Can only be run on python 3.11 and higher (run ml python/GEOSpyD to load the latest version on discover).
  • To run the script, simply navigate to ~/GEOSgcm/install/bin/gcmpy/scripts/ and run the command python gcm_setup.py

@sshakoor1 sshakoor1 self-assigned this Apr 9, 2024
@sshakoor1 sshakoor1 requested review from mathomp4 and tclune April 9, 2024 20:32
@sshakoor1 sshakoor1 added 0 diff The changes in this pull request have verified to be zero-diff with the target branch. 0 diff trivial The changes in this pull request are trivially zero-diff (documentation, build failure, &c.) 0 diff structural Structural changes to repository that are zero-diff labels Apr 9, 2024
@sshakoor1 sshakoor1 removed the 0 diff The changes in this pull request have verified to be zero-diff with the target branch. label Apr 9, 2024
@@ -0,0 +1,67 @@
import os, sys, platform
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"utility" is a bit vague. Possibly a more specific name could be thought of?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I agree. Env and utility should probably be merged into a new script down the line. These scripts were kind of thrown together early on and desperately need to be updated.

@mathomp4 mathomp4 changed the base branch from develop to feature/sdrabenh/gcm_v12 April 14, 2025 14:34
mathomp4 and others added 8 commits May 7, 2025 08:37
# Conflicts:
#	AGCM.rc.tmpl
#	HISTORY.AGCM.rc.tmpl
#	HISTORY.AOGCM-MOM5.rc.tmpl
#	HISTORY.AOGCM.rc.tmpl
#	fvcore_layout.rc
#	gcm_forecast.tmpl
#	gcm_regress.j
#	gcm_run.j
#	gcm_setup
#	linkbcs.tmpl
# Conflicts:
#	gcm_forecast.tmpl
#	gcm_regress.j
#	gcm_run.j
#	gcm_setup
@sshakoor1 sshakoor1 force-pushed the feature/sshakoor/gcmpy branch from 2e225fa to d02a7db Compare July 23, 2025 19:12
@mathomp4 mathomp4 removed the 0 diff trivial The changes in this pull request are trivially zero-diff (documentation, build failure, &c.) label Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0 diff structural Structural changes to repository that are zero-diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants