-
Notifications
You must be signed in to change notification settings - Fork 3
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 SHiELD-wrapper regression tests #2376
Merged
Merged
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
Base automatically changed from
initial-prognostic-run-shield-image
to
master
December 6, 2023 14:26
spencerkclark
force-pushed
the
SHiELD-wrapper-regression-tests
branch
from
December 6, 2023 14:30
1fb4e47
to
1ba95a9
Compare
spencerkclark
force-pushed
the
SHiELD-wrapper-regression-tests
branch
from
December 6, 2023 14:30
1ba95a9
to
bad6d92
Compare
AnnaKwa
approved these changes
Dec 7, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
spencerkclark
force-pushed
the
SHiELD-wrapper-regression-tests
branch
from
December 8, 2023 01:37
635d226
to
cb11a1a
Compare
spencerkclark
added a commit
that referenced
this pull request
Dec 21, 2023
This PR builds on #2376 and splits out from #2350 what is necessary to run SHiELD-wrapper-based prognostic simulations through our standard prognostic run argo workflow. No changes to the frontend API are needed; the prognostic run workflow is modified to infer which template (`run-fv3gfs` or `run-shield`) to run based on the input config. For convenience this also adds a starter base config for SHiELD, which is based on the configuration used in the PIRE simulations (but for simplicity with the mixed layer ocean turned off). I have tested the `prognostic-run` and `restart-prognostic-run` workflows using a SHiELD-based config offline. I'm not sure if we want to add an integration test yet or not. Significant internal changes: - Refactored the `prognostic-run` workflow to infer whether to use FV3GFS or SHiELD based on the config. - Refactored the `restart-prognostic-run` workflow to infer whether to use FV3GFS or SHiELD based on the config at the provided URL. - Refactored the directory structure of the base config YAMLs in `fv3kube` to better accommodate SHiELD configs. No user-facing changes to the FV3GFS configs are made. Note this PR makes use of YAML anchors and aliases to reduce the amount of duplicate configuration code. Some illustration of how these work can be found [here](https://support.atlassian.com/bitbucket-cloud/docs/yaml-anchors/). Use of this concept was already introduced in #2103 within the `training.yaml` template, though this is the first time using it in the prognostic run. ----- To illustrate the updated workflows I have included some example step outputs from `argo get` below (we ran the `prognostic-run` workflow for two segments and then ran one more segment via the `restart-prognostic-run` workflow). ### prognostic-run ``` STEP TEMPLATE PODNAME DURATION MESSAGE ✔ 2023-12-21-baseline-shield-example prognostic-run ├───✔ resolve-output-url resolve-output-url/resolve-output-url 2023-12-21-baseline-shield-example-681218977 3s ├───✔ convert-input-config-to-artifact convert-input-config-to-artifact 2023-12-21-baseline-shield-example-117187868 3s ├───✔ infer-wrapper infer-wrapper 2023-12-21-baseline-shield-example-3326365873 3s ├───○ prepare-config-fv3gfs prepare-config-fv3gfs when ''shield.wrapper' == 'fv3gfs.wrapper'' evaluated false ├───✔ prepare-config-shield prepare-config-shield 2023-12-21-baseline-shield-example-1872594915 3m ├───○ run-model-fv3gfs run-simulation/run-fv3gfs when ''shield.wrapper' == 'fv3gfs.wrapper'' evaluated false ├───✔ run-model-shield run-simulation/run-shield │ ├─┬─✔ choose-node-pool choose-node-pool 2023-12-21-baseline-shield-example-3672275837 4s │ │ └─✔ create-run create-run-shield 2023-12-21-baseline-shield-example-1572199652 3m │ └───✔ run-first-segment run-all-segments-shield │ ├───✔ append-segment append-segment-shield 2023-12-21-baseline-shield-example-2948602435 6m │ ├───✔ increment-segment increment-count 2023-12-21-baseline-shield-example-2887248493 5s │ └───✔ run-next-segment run-all-segments-shield │ ├───✔ append-segment append-segment-shield 2023-12-21-baseline-shield-example-256387028 5m │ ├───✔ increment-segment increment-count 2023-12-21-baseline-shield-example-2030482824 3s │ └───○ run-next-segment run-all-segments-shield when '2 < 2' evaluated false ├───○ online-diags prognostic-run-diags/diagnostics when 'false == true' evaluated false ├───○ online-diags-report prognostic-run-diags/report-single-run when 'false == true' evaluated false └───○ exit exit when 'Skipped == Failed || Succeeded == Failed' evaluated false ``` ### restart-prognostic-run ``` STEP TEMPLATE PODNAME DURATION MESSAGE ✔ 2023-12-21-restart-baseline-shield-example restart-prognostic-run ├───✔ choose-node-pool run-simulation/choose-node-pool 2023-12-21-restart-baseline-shield-example-1554740548 3s ├───✔ infer-wrapper infer-wrapper 2023-12-21-restart-baseline-shield-example-3018678792 4s ├───○ restart-run-fv3gfs run-simulation/run-all-segments when ''shield.wrapper' == 'fv3gfs.wrapper'' evaluated false └───✔ restart-run-shield run-simulation/run-all-segments-shield ├───✔ append-segment append-segment-shield 2023-12-21-restart-baseline-shield-example-26558483 5m ├───✔ increment-segment increment-count 2023-12-21-restart-baseline-shield-example-4132074205 4s └───○ run-next-segment run-all-segments-shield when '1 < 1' evaluated false ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR builds on #2365 and makes the changes necessary to add
predictor
andnudging
regression tests for SHiELD-wrapper-based prognostic runs. In so doing it refactorstest_regression.py
to parametrize over the wrapper type, and move the base fortran configs into YAML files in their own subdirectory.Note that unlike in #2350 no changes are required to the time loop of the prognostic run, thanks to ai2cm/SHiELD-wrapper#18, which has now been merged upstream. I updated the SHiELD-wrapper submodule accordingly in this PR.
Significant internal changes:
Added a
wrapper
parameter tofile_configs_to_namelist_settings
, since one of the namelist parameters used to control the output frequency of physics diagnostics in SHiELD is different than that in FV3GFS.Moved the base fortran config for the FV3GFS prognostic run regression tests into a YAML file in a subdirectory alongside the base fortran config for the SHiELD prognostic run regression tests.
Tests added