-
Notifications
You must be signed in to change notification settings - Fork 215
Refactor cleanup task and add checks for gempak files #4258
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 13 commits
3d0f427
4ad6542
00372f3
8e4322b
c6a23cf
484235c
749f917
ceeae5e
cea9f0e
7006ec5
4efde5a
214eb50
ebb0e33
cdf5a8f
ef21b22
3303cc4
473c7b5
7cda242
41effff
c8bc24c
30395ab
a88f475
159dc68
f15662b
73f4bcc
a8d5f41
cd59c0f
d2ebe7f
9331409
19e44a1
844d528
28659b9
38793d2
8e6333a
76bc130
f677e4f
bb7a31a
4a8bb34
8382dea
fb0f744
246487c
865a53d
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 |
|---|---|---|
|
|
@@ -9,22 +9,30 @@ source "${EXPDIR}/config.resources" cleanup | |
| export CLEANUP_COM="YES" # NO=retain ROTDIR. YES default in cleanup.sh | ||
|
|
||
| #--starting and ending hours of previous cycles to be removed from rotating directory | ||
| export RMOLDSTD=144 | ||
| export RMOLDEND=24 | ||
| # Selectively remove files between SELECTIVE_RM_MIN and SELECTIVE_RM_MIN hours old, based on exclude_string | ||
| # Remove all RTOFS files older than RTOFS_CLEANUP_MAX hours | ||
| # Remove all files, except GEMPAK files, older than SELECTIVE_RM_MAX hours, based on gempak_exclude_string | ||
| # Remove all files older than the max of all SELECTIVE_RM* variables | ||
| # Retain all files newer than SELECTIVE_RM_MIN hours | ||
|
|
||
| if [[ "${DO_GEMPAK}" == "YES" && "${RUN}" == "gfs" ]]; then | ||
| export RMOLDSTD=346 | ||
| export RMOLDEND=222 | ||
| export SELECTIVE_CLEANUP_MAX=144 | ||
| export SELECTIVE_CLEANUP_MIN=24 | ||
| export GEMPAK_CLEANUP_MAX=240 | ||
|
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. @ChristopherHill-NOAA Can you verify that this is the correct setting for the
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. @DavidHuber-NOAA This is generally correct - only the From the
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. It is supposed that the desired effect is a) to retain only
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. @ChristopherHill-NOAA Thank you for checking the directories. I had created a bug during a merge after testing and did not thoroughly test again. I have now fixed that bug and further improved the scripting. Would you mind checking the COM directory again? For clarity:
Please correct me if I am wrong about any of these bullets. If everything looks correct, I will run another test for cycle
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. The bullet points appear to be correct, and representative of the intended effort to clean all but From the latest test, it is observed that the Some of the
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. @ChristopherHill-NOAA I believe this was caused by the ptmp scrubber. I have rerun the test case from the beginning, i.e.
I then verified that the You can find the COM directory here: Does this look good to you?
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. @DavidHuber-NOAA The latest workflow run - with modified GEMPAK file cleanup through case
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. Great, thank you for confirming @ChristopherHill-NOAA! |
||
| export RTOFS_CLEANUP_MAX=48 | ||
|
DavidHuber-NOAA marked this conversation as resolved.
Outdated
|
||
| if [[ ${SELECTIVE_CLEANUP_MIN} -gt ${SELECTIVE_CLEANUP_MAX} ]]; then | ||
| echo "FATAL ERROR: Invalid selective cleanup times: " | ||
| echo " SELECTIVE_CLEANUP_MIN=${SELECTIVE_CLEANUP_MIN} > SELECTIVE_CLEANUP_MAX=${SELECTIVE_CLEANUP_MAX}" | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Specify the list of files to exclude from the first stage of cleanup | ||
| # Because arrays cannot be exported, list is a single string of comma- | ||
| # separated values. This string is split to form an array at runtime. | ||
| export exclude_string="" | ||
| case ${RUN} in | ||
| gdas | gfs) exclude_string="*prepbufr*, *cnvstat.tar*, *analysis.atm.a*.nc" ;; | ||
| enkf*) exclude_string="*f006.ens*" ;; | ||
| gdas | gfs) exclude_string+="*prepbufr*, *cnvstat.tar*, *analysis.atm.a*.nc" ;; | ||
| enkf*) exclude_string+="*f006.ens*" ;; | ||
| *) exclude_string="" ;; | ||
| esac | ||
| export exclude_string | ||
|
|
||
| echo "END: config.cleanup" | ||
Uh oh!
There was an error while loading. Please reload this page.