-
Notifications
You must be signed in to change notification settings - Fork 204
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
base: develop
Are you sure you want to change the base?
Changes from 3 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 | ||
|
||
| export RTOFS_CLEANUP_MAX=48 | ||
DavidHuber-NOAA marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 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.