-
Notifications
You must be signed in to change notification settings - Fork 216
Archive the experiment directory along with git status/diff output #3105
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
Changes from 18 commits
e7e43d2
9f1a6fc
2746e46
1579844
95f04d4
23b0454
f88c077
6924428
d2db267
7d0b70a
5f67730
a61055e
f385f0c
1b4340e
7ca219c
12b6f95
b8cc2ef
5014922
7ab8dc1
0dd3eb8
6d89b5c
28bb727
729be32
979f2cb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| [flake8] | ||
| exclude = .git,.github,venv,__pycache__,old,build,dist | ||
| max-line-length = 160 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| {% set cycle_YMDH = current_cycle | to_YMDH %} | ||
|
|
||
| expdir: | ||
| name: "EXPDIR" | ||
| # Copy the experiment files from the EXPDIR into the ROTDIR for archiving | ||
| {% set copy_expdir = "expdir." ~ cycle_YMDH %} | ||
| FileHandler: | ||
| mkdir: | ||
| - "{{ ROTDIR }}/{{ copy_expdir }}" | ||
| copy: | ||
| {% for config in glob(EXPDIR ~ "/config.*") %} | ||
| - [ "{{ config }}", "{{ ROTDIR }}/{{ copy_expdir }}/." ] | ||
| {% endfor %} | ||
| - [ "{{ EXPDIR }}/{{ PSLOT }}.db", "{{ ROTDIR }}/{{ copy_expdir }}/." ] | ||
| - [ "{{ EXPDIR }}/{{ PSLOT }}.xml", "{{ ROTDIR }}/{{ copy_expdir }}/." ] | ||
| {% if ARCH_HASHES or ARCH_DIFFS %} | ||
| - [ "{{ EXPDIR }}/git_info.log", "{{ ROTDIR }}/{{ copy_expdir }}/." ] | ||
| {% endif %} | ||
| target: "{{ ATARDIR }}/{{ cycle_YMDH }}/expdir.tar" | ||
| required: | ||
| - "{{ copy_expdir }}/config.*" | ||
| - "{{ copy_expdir }}/{{ PSLOT }}.db" | ||
|
DavidHuber-NOAA marked this conversation as resolved.
Outdated
|
||
| - "{{ copy_expdir }}/{{ PSLOT }}.xml" | ||
| {% if ARCH_HASHES or ARCH_DIFFS %} | ||
| - "{{ copy_expdir }}/git_info.log" | ||
| {% endif %} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,7 +40,7 @@ datasets: | |
| # Determine if we will save restart ICs or not (only valid for cycled) | ||
| {% set save_warm_start_forecast, save_warm_start_cycled = ( False, False ) %} | ||
|
|
||
| {% if ARCH_CYC == cycle_HH | int%} | ||
| {% if ARCH_CYC == cycle_HH | int %} | ||
| # Save the forecast-only cycle ICs every ARCH_WARMICFREQ or ARCH_FCSTICFREQ days | ||
| {% if (current_cycle - SDATE).days % ARCH_WARMICFREQ == 0 %} | ||
| {% set save_warm_start_forecast = True %} | ||
|
|
@@ -97,3 +97,10 @@ datasets: | |
|
|
||
| # End of restart checking | ||
| {% endif %} | ||
|
|
||
| # Archive the EXPDIR if requested | ||
| {% if archive_expdir %} | ||
| {% filter indent(width=4) %} | ||
| {% include "expdir.yaml.j2" %} | ||
| {% endfilter %} | ||
| {% endif %} | ||
|
Comment on lines
+101
to
+106
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should only need this in one of gdas or gfs, but there is a bit of a coordination problem since either can be run without the other.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed. I added a method to archive.py to determine which |
||
| +15 −0 | .vscode/launch.json | |
| +11 −0 | .vscode/settings.json | |
| +1 −1 | setup.cfg | |
| +43 −8 | src/wxflow/file_utils.py | |
| +42 −18 | src/wxflow/fsutils.py | |
| +4 −0 | tests/conftest.py | |
| +1 −1 | tests/test_configuration.py | |
| +15 −0 | tests/test_file_utils.py | |
| +150 −0 | tests/test_fsutils.py |
Uh oh!
There was an error while loading. Please reload this page.