Skip to content
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 call in case_setup to run CAM python script #4497

Merged
merged 4 commits into from
Nov 6, 2023

Conversation

lizziel
Copy link
Contributor

@lizziel lizziel commented Oct 13, 2023

The update is needed for use with GEOS-Chem chemistry so that run-time configuration files can be copied to the case directory upon case setup. This PR should be merged along with CAM PR ESCOMP/CAM#484 at the same time.

Test suite: I manually tested on derecho
Test baseline:
Test namelist changes:
Test status: [bit for bit, roundoff, climate changing]

Fixes [CIME Github issue #] None

User interface changes?: No

Update gh-pages html (Y/N)?: No

@jedwards4b
Copy link
Contributor

************* Module CIME.case.case_setup
CIME/case/case_setup.py:429:20: W1308: Duplicate string formatting argument 'camroot', consider passing as named argument (duplicate-string-formatting-argument)

This update is based on existing code for cism but uses a python script
rather than a shell script. The update is needed for use with GEOS-Chem
chemistry so that run-time configuration files can be copied to the case
directory upon case setup.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
@lizziel lizziel force-pushed the case_setup_commands_for_cam branch from 149d9e4 to de497e2 Compare October 13, 2023 20:25
@lizziel lizziel changed the title Add call in case_setup to run CAM shell script Add call in case_setup to run CAM python script Oct 13, 2023
lizziel added a commit to geoschem/CAM that referenced this pull request Oct 13, 2023
This update requires cime updates at:
ESMCI/cime#4497

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
@lizziel
Copy link
Contributor Author

lizziel commented Oct 13, 2023

Heads up I force pushed to my branch to change the shell script to python per comments on ESCOMP/CAM#484.

This avoids a duplicate string formatting warning when using a linter.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
@lizziel
Copy link
Contributor Author

lizziel commented Oct 13, 2023

I pushed an update to use named strings. I didn't know about that feature in python!

@jedwards4b
Copy link
Contributor

Please fix the github testing error by running:
black CIME/case/case_setup.py

@lizziel
Copy link
Contributor Author

lizziel commented Oct 20, 2023

Will do. I also have suggested updates from @gold2718 in geoschem/CAM#26 which I am going to test out.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
@lizziel
Copy link
Contributor Author

lizziel commented Oct 31, 2023

I pushed an update for compatibility to changes made to the cam.case_setup.py script in CAM. @jedwards4b, is black included in a module on derecho that I need to load?

@jedwards4b
Copy link
Contributor

do

pip install black 

@jedwards4b
Copy link
Contributor

Or you can do:

pre-commit install --install-hooks
from the cime directory in your sandbox.

@lizziel
Copy link
Contributor Author

lizziel commented Nov 3, 2023

All set. I pushed updates applied by black.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
@lizziel lizziel force-pushed the case_setup_commands_for_cam branch from ed3a662 to 627a3bc Compare November 3, 2023 14:54
@jedwards4b
Copy link
Contributor

Looks good to me - when you are ready to merge take the PR out of draft status.

@lizziel
Copy link
Contributor Author

lizziel commented Nov 6, 2023

I am changing this from Draft status to Ready for Review. This PR and the GEOS-Chem in CAM PR (ESCOMP/CAM#484) are dependent on each other so should be merged together. As far as I know there are no remaining TODOs for that PR before merge.

@lizziel lizziel marked this pull request as ready for review November 6, 2023 14:48
@jedwards4b jedwards4b merged commit dab95c1 into ESMCI:master Nov 6, 2023
7 checks passed
@fischer-ncar
Copy link
Contributor

This PR was merged before ESCOMP/CAM#484. This isn't a major issue, except the nightly aux_cime_baselines tests are failing for any test that use cam. They will continue to fail until this cam PR makes it into a
cam tag.

@jedwards4b
Copy link
Contributor

Sorry - I thought that they were ready to merge.

@lizziel
Copy link
Contributor Author

lizziel commented Nov 8, 2023

@fvitt requested more changes for the CAM PR. It is a no diff change so could in theory be changed later after GEOS-Chem is merged in to fix the test failing.

@jedwards4b
Copy link
Contributor

@lizziel no worries - we can wait. Thanks

@fischer-ncar fischer-ncar mentioned this pull request Dec 7, 2023
fischer-ncar added a commit that referenced this pull request Dec 7, 2023

Revert PR #4497 since it's break all of the cam tests. These changes will be added back in with a different PR.

Test suite: By hand
Test baseline:
Test namelist changes:
Test status: [bit for bit, roundoff, climate changing]

Fixes [CIME Github issue #]

User interface changes?:

Update gh-pages html (Y/N)?:
@lizziel
Copy link
Contributor Author

lizziel commented Feb 2, 2024

@jedwards4b, the GEOS-Chem PR ESCOMP/CAM#484 is in the final test stage. @fvitt is currently running tests and needs this update. Could you two coordinate for making these PR merges happen at the same time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants