-
Notifications
You must be signed in to change notification settings - Fork 168
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
Convert archive jobs to proper j-jobs #1115
Changes from 15 commits
77e9aeb
5dfb5e0
0a40e5f
f80ee72
838ecd7
25846f7
e729e01
7a6b62d
103b6a2
c29bca3
9fc35a9
bfe11c6
9930520
8c045ce
ed8bd67
9715c78
b97d453
686a63d
e802183
d286dce
9d54a70
de26d30
11b1718
823f5f6
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,91 @@ | ||
#! /usr/bin/env bash | ||
|
||
source "$HOMEgfs/ush/preamble.sh" | ||
|
||
############################# | ||
# Source relevant config files | ||
############################# | ||
export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} | ||
configs="base earc" | ||
config_path=${EXPDIR:-${NWROOT}/gfs.${gfs_ver}/parm/config} | ||
for config in ${configs}; do | ||
. ${config_path}/config.${config} | ||
status=$? | ||
[[ ${status} -ne 0 ]] && exit ${status} | ||
done | ||
|
||
########################################## | ||
# Source machine runtime environment | ||
########################################## | ||
. ${HOMEgfs}/env/${machine}.env earc | ||
status=$? | ||
[[ ${status} -ne 0 ]] && exit $status | ||
|
||
############################################## | ||
# Obtain unique process id (pid) and make temp directory | ||
############################################## | ||
export pid=${pid:-$$} | ||
export DATA=${DATA:-${DATAROOT}/${jobid:?}} | ||
mkdir -p $DATA | ||
cd $DATA | ||
|
||
|
||
############################################## | ||
# Run setpdy and initialize PDY variables | ||
############################################## | ||
export cycle="t${cyc}z" | ||
setpdy.sh | ||
. ./PDY | ||
|
||
|
||
############################################## | ||
# Determine Job Output Name on System | ||
############################################## | ||
export pgmout="OUTPUT.${pid}" | ||
export pgmerr=errfile | ||
|
||
|
||
############################################## | ||
# Set variables used in the script | ||
############################################## | ||
export CDATE=${CDATE:-${PDY}${cyc}} | ||
export CDUMP=${CDUMP:-${RUN:-"gfs"}} | ||
aerorahul marked this conversation as resolved.
Show resolved
Hide resolved
|
||
export COMPONENT=${COMPONENT:-atmos} | ||
export n=$((ENSGRP)) | ||
aerorahul marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
############################################## | ||
# Begin JOB SPECIFIC work | ||
############################################## | ||
|
||
# ICS are restarts and always lag INC by $assim_freq hours. | ||
export EARCINC_CYC=${ARCH_CYC} | ||
export EARCICS_CYC=$((ARCH_CYC-assim_freq)) | ||
if [ ${EARCICS_CYC} -lt 0 ]; then | ||
export EARCICS_CYC=$((EARCICS_CYC+24)) | ||
fi | ||
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. Please move these to |
||
|
||
# EnKF update in GFS, GDAS or both | ||
export CDUMP_ENKF=$(echo ${EUPD_CYC:-"gdas"} | tr a-z A-Z) | ||
|
||
export ARCH_LIST="${ROTDIR}/enkf${CDUMP}.${PDY}/${cyc}/${COMPONENT}/earc${ENSGRP}" | ||
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. This belongs to |
||
|
||
############################################################### | ||
# Run archive script | ||
############################################################### | ||
|
||
$SCRgfs/exgdas_enkf_earc.sh | ||
status=$? | ||
[[ $status -ne 0 ]] && exit $status | ||
|
||
############################################################### | ||
|
||
echo "ENDED NORMALLY." | ||
|
||
########################################## | ||
# Remove the Temporary working directory | ||
########################################## | ||
cd $DATAROOT | ||
[[ ${KEEPDATA} = "NO" ]] && rm -rf $DATA | ||
|
||
date | ||
WalterKolczynski-NOAA marked this conversation as resolved.
Show resolved
Hide resolved
|
||
exit 0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
#! /usr/bin/env bash | ||
|
||
source "$HOMEgfs/ush/preamble.sh" | ||
|
||
export RUN_ENVIR=${RUN_ENVIR:-"nco"} | ||
|
||
############################################# | ||
# Source relevant config files | ||
############################################# | ||
export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} | ||
configs="base arch" | ||
config_path=${EXPDIR:-$NWROOT/gfs.${gfs_ver}/parm/config} | ||
for config in $configs; do | ||
. $config_path/config.$config | ||
status=$? | ||
[[ $status -ne 0 ]] && exit $status | ||
done | ||
|
||
########################################## | ||
# Source machine runtime environment | ||
########################################## | ||
. $HOMEgfs/env/${machine}.env arch | ||
status=$? | ||
[[ $status -ne 0 ]] && exit $status | ||
|
||
############################################# | ||
# Source workflow level common utilities | ||
############################################# | ||
#### This utility is under development as of 20221020 | ||
#### will not use it at this time | ||
#### source "${HOMEgfs}/ush/file_utils.sh" | ||
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. Please delete. |
||
|
||
############################################## | ||
# Obtain unique process id (pid) and make temp directory | ||
############################################## | ||
export pid=${pid:-$$} | ||
export DATA=${DATA:-${DATAROOT}/${jobid:?}} | ||
mkdir -p $DATA | ||
cd $DATA | ||
|
||
|
||
############################################## | ||
# Run setpdy and initialize PDY variables | ||
############################################## | ||
export cycle="t${cyc}z" | ||
setpdy.sh | ||
. ./PDY | ||
|
||
|
||
############################################## | ||
# Determine Job Output Name on System | ||
############################################## | ||
export pgmout="OUTPUT.${pid}" | ||
export pgmerr=errfile | ||
|
||
|
||
############################################## | ||
# Set variables used in the script | ||
############################################## | ||
export CDATE=${CDATE:-${PDY}${cyc}} | ||
export CDUMP=${CDUMP:-${RUN:-"gfs"}} | ||
export COMPONENT=${COMPONENT:-atmos} | ||
|
||
|
||
############################################## | ||
# Begin JOB SPECIFIC work | ||
############################################## | ||
|
||
# ICS are restarts and always lag INC by $assim_freq hours | ||
export ARCHINC_CYC=$ARCH_CYC | ||
export ARCHICS_CYC=$((ARCH_CYC-assim_freq)) | ||
if [ $ARCHICS_CYC -lt 0 ]; then | ||
ARCHICS_CYC=$((ARCHICS_CYC+24)) | ||
fi | ||
|
||
# CURRENT CYCLE | ||
export APREFIX="${CDUMP}.t${cyc}z." | ||
export ASUFFIX=${ASUFFIX:-$SUFFIX} | ||
|
||
if [ $ASUFFIX = ".nc" ]; then | ||
format="netcdf" | ||
else | ||
format="nemsio" | ||
fi | ||
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. Please move these to |
||
|
||
############################################################### | ||
# Run archive script | ||
############################################################### | ||
|
||
${GLOBALARCHIVESH:-$SCRgfs/exglobal_archive.sh} | ||
status=$? | ||
[[ $status -ne 0 ]] && exit $status | ||
|
||
############################################################### | ||
|
||
echo "ENDED NORMALLY." | ||
|
||
########################################## | ||
# Remove the Temporary working directory | ||
########################################## | ||
cd $DATAROOT | ||
[[ $KEEPDATA = "NO" ]] && rm -rf $DATA | ||
|
||
date | ||
WalterKolczynski-NOAA marked this conversation as resolved.
Show resolved
Hide resolved
|
||
exit 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.