forked from NOAA-EMC/global-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split clean-up into separate job (NOAA-EMC#1906)
Moves the clean-up that was previously done in the archive jobs into their own separate job. The clean-up is also streamlined considerably by using only `COM_TOP` instead of going through every template. There is also additional streamlining/corrections in the function that does the actual removing. Some settings used by both jobs were elevated to `config.base`. Others only needed for cleanup were moved to the new config for that job. Also corrects a small error encountered when attempting to rerun an ensemble forecast. Resolves NOAA-EMC#583 Resolves NOAA-EMC#1872
- Loading branch information
1 parent
3de102c
commit 1a5d0b5
Showing
15 changed files
with
204 additions
and
375 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#! /usr/bin/env bash | ||
|
||
source "${HOMEgfs}/ush/preamble.sh" | ||
source "${HOMEgfs}/ush/jjob_header.sh" -e "cleanup" -c "base cleanup" | ||
|
||
"${HOMEgfs}/scripts/exglobal_cleanup.sh" | ||
status=$? | ||
[[ ${status} -ne 0 ]] && exit "${status}" | ||
|
||
########################################## | ||
# Remove the Temporary working directory | ||
########################################## | ||
cd "${DATAROOT}" || (echo "${DATAROOT} does not exist. ABORT!"; exit 1) | ||
[[ ${KEEPDATA} = "NO" ]] && rm -rf "${DATA}" | ||
|
||
exit 0 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,5 +16,4 @@ export jobid="${job}.$$" | |
"${HOMEgfs}"/jobs/JGLOBAL_ARCHIVE | ||
status=$? | ||
|
||
|
||
exit "${status}" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#! /usr/bin/env bash | ||
|
||
source "${HOMEgfs}/ush/preamble.sh" | ||
|
||
############################################################### | ||
# Source FV3GFS workflow modules | ||
. "${HOMEgfs}"/ush/load_fv3gfs_modules.sh | ||
status=$? | ||
[[ ${status} -ne 0 ]] && exit "${status}" | ||
|
||
export job="cleanup" | ||
export jobid="${job}.$$" | ||
|
||
############################################################### | ||
# Execute the JJOB | ||
"${HOMEgfs}"/jobs/JGLOBAL_CLEANUP | ||
status=$? | ||
|
||
exit "${status}" |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#! /usr/bin/env bash | ||
|
||
########## config.cleanup ########## | ||
echo "BEGIN: config.cleanup" | ||
|
||
# Get task specific resources | ||
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 | ||
|
||
# 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. | ||
case ${RUN} in | ||
gdas | gfs) exclude_string="*prepbufr*, *cnvstat*, *atmanl.nc" ;; | ||
enkf*) exclude_string="*f006.ens*" ;; | ||
*) exclude_string="" ;; | ||
esac | ||
export exclude_string | ||
|
||
echo "END: config.cleanup" |
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
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
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
Oops, something went wrong.