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.
Refactoring of the marine B-matrix job (NOAA-EMC#2749)
Refactor the functionality of B-matrix generation from the GDASApp Resolves NOAA-EMC#2743
- Loading branch information
1 parent
65a7ab7
commit 8486596
Showing
33 changed files
with
655 additions
and
205 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
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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,66 @@ | ||
#!/bin/bash | ||
|
||
source "${HOMEgfs}/ush/preamble.sh" | ||
|
||
if (( 10#${ENSMEM:-0} > 0 )); then | ||
export DATAjob="${DATAROOT}/${RUN}marinebmat.${PDY:-}${cyc}" | ||
export DATA="${DATAjob}/${jobid}" | ||
# Create the directory to hold ensemble perturbations | ||
export DATAenspert="${DATAjob}/enspert" | ||
if [[ ! -d "${DATAenspert}" ]]; then mkdir -p "${DATAenspert}"; fi | ||
fi | ||
|
||
# source config.base, config.ocnanal and config.marinebmat | ||
# and pass marinebmat to ${machine}.env | ||
source "${HOMEgfs}/ush/jjob_header.sh" -e "marinebmat" -c "base ocnanal marinebmat" | ||
|
||
############################################## | ||
# Set variables used in the script | ||
############################################## | ||
# shellcheck disable=SC2153 | ||
GDATE=$(date --utc +%Y%m%d%H -d "${PDY} ${cyc} - ${assim_freq} hours") | ||
gPDY=${GDATE:0:8} | ||
gcyc=${GDATE:8:2} | ||
export GDUMP="gdas" | ||
export GDUMP_ENS="enkf${GDUMP}" | ||
|
||
############################################## | ||
# Begin JOB SPECIFIC work | ||
############################################## | ||
|
||
# Generate COM variables from templates | ||
RUN=${GDUMP} YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \ | ||
COMIN_OCEAN_HISTORY_PREV:COM_OCEAN_HISTORY_TMPL \ | ||
COMIN_ICE_HISTORY_PREV:COM_ICE_HISTORY_TMPL | ||
|
||
RUN=${GDUMP_ENS} YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \ | ||
COMIN_OCEAN_HISTORY_ENS_PREV:COM_OCEAN_HISTORY_TMPL \ | ||
COMIN_ICE_HISTORY_ENS_PREV:COM_ICE_HISTORY_TMPL | ||
|
||
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \ | ||
COMOUT_OCEAN_BMATRIX:COM_OCEAN_BMATRIX_TMPL \ | ||
COMOUT_ICE_BMATRIX:COM_ICE_BMATRIX_TMPL | ||
|
||
mkdir -p "${COMOUT_OCEAN_BMATRIX}" | ||
mkdir -p "${COMOUT_ICE_BMATRIX}" | ||
|
||
############################################################### | ||
# Run relevant script | ||
|
||
EXSCRIPT=${GDASMARINEBMATRUNPY:-${SCRgfs}/exglobal_marinebmat.py} | ||
${EXSCRIPT} | ||
status=$? | ||
[[ ${status} -ne 0 ]] && exit "${status}" | ||
|
||
############################################## | ||
# End JOB SPECIFIC work | ||
############################################## | ||
|
||
############################################## | ||
# Final processing | ||
############################################## | ||
if [[ -e "${pgmout}" ]] ; then | ||
cat "${pgmout}" | ||
fi | ||
|
||
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
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.