Skip to content

gcm python conversion#602

Draft
sshakoor1 wants to merge 69 commits intofeature/sdrabenh/gcm_v12from
feature/sshakoor/gcmpy
Draft

gcm python conversion#602
sshakoor1 wants to merge 69 commits intofeature/sdrabenh/gcm_v12from
feature/sshakoor/gcmpy

Conversation

@sshakoor1
Copy link
Copy Markdown
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
Comment thread gcmpy/CMakeLists.txt Outdated
Comment thread gcmpy/jinjafy.py Outdated
Comment thread gcmpy/scripts/utility.py Outdated
@@ -0,0 +1,67 @@
import os, sys, platform
Copy link
Copy Markdown
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
Copy Markdown
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.

Shayon Shakoorzadeh and others added 28 commits September 16, 2025 05:04
# Conflicts:
#	AGCM.rc.tmpl
#	gcm_setup
#	linkbcs.tmpl
# Conflicts:
#	gcm_forecast.tmpl
#	gcm_run.j
# Conflicts:
#	AGCM.rc.tmpl
#	HISTORY.AGCM.rc.tmpl
#	HISTORY.rc.tmpl
#	gcm_regress.j
#	gcm_run.j
#	gcm_setup
#	linkbcs.tmpl
#	scm_run.j
…ixes-2026Mar23

v12: Further fixes for gcm_setup.py
@sshakoor1 sshakoor1 changed the title gcm_setup python conversion gcm python conversion Apr 29, 2026
# Conflicts:
#	AGCM.rc.tmpl
#	gcm_forecast.tmpl
#	gcm_run.j
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