-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move remaining global post scripts over from UPP (#771)
Several scripts currently located under NOAA-EMC/UPP are only used for global, so they have been moved within global-workflow so they can be managed by the global-workflow team. Scripts are just copied from the current tip of UPP develop, other than some changes to standardize style and indentation. Also coming over are four parm files that are used to produce GFS products. As a result, we are no longer linking the entire upp parm directory; instead we are creating individual links for the files we use that still reside in upp. Fixes #630 Fixes #769
- Loading branch information
1 parent
d78c942
commit 59604d6
Showing
17 changed files
with
4,362 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
#!/bin/ksh | ||
set -x | ||
|
||
export RUN_ENVIR=${RUN_ENVIR:-"nco"} | ||
export PS4='$SECONDS + ' | ||
date | ||
|
||
|
||
############################# | ||
# Source relevant config files | ||
############################# | ||
configs="base post" | ||
export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} | ||
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 post | ||
status=$? | ||
[[ $status -ne 0 ]] && exit $status | ||
|
||
|
||
############################################## | ||
# Obtain unique process id (pid) and make temp directory | ||
############################################## | ||
export pid=${pid:-$$} | ||
export outid=${outid:-"LL$job"} | ||
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 | ||
|
||
#################################### | ||
# Specify version numbers | ||
#################################### | ||
export crtm_ver=${post_crtm_ver:-v2.2.6} | ||
export gfs_ver=${gfs_ver:-v15.0.0} | ||
export hwrf_ver=${hwrf_ver:-v11.0.5} | ||
export g2tmpl_ver=${g2tmpl_ver:-v1.5.0} | ||
|
||
############################################## | ||
# Set variables used in the exglobal script | ||
############################################## | ||
export CDATE=${CDATE:-${PDY}${cyc}} | ||
export CDUMP=${CDUMP:-${RUN:-"gfs"}} | ||
export COMPONENT=${COMPONENT:-atmos} | ||
|
||
|
||
############################################## | ||
# Begin JOB SPECIFIC work | ||
############################################## | ||
export APRUNP=${APRUN:-$APRUN_NP} | ||
export RERUN=${RERUN:-NO} | ||
export HOMECRTM=${HOMECRTM:-${NWROOT}/lib/crtm/${crtm_ver}} | ||
export FIXCRTM=${CRTM_FIX:-${HOMECRTM}/fix} | ||
export PARMpost=${PARMpost:-$HOMEgfs/parm/post} | ||
export INLINE_POST=${WRITE_DOPOST:-".false."} | ||
|
||
export COMIN=${COMIN:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT} | ||
export COMOUT=${COMOUT:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT} | ||
|
||
[[ ! -d $COMOUT ]] && mkdir -m 775 -p $COMOUT | ||
|
||
if [ $RUN = gfs ];then | ||
export FHOUT_PGB=${FHOUT_GFS:-3} #Output frequency of gfs pgb file at 1.0 and 0.5 deg. | ||
fi | ||
if [ $RUN = gdas ]; then | ||
export IGEN_GFS="gfs_avn" | ||
export IGEN_ANL="anal_gfs" | ||
export IGEN_FCST="gfs_avn" | ||
export IGEN_GDAS_ANL="anal_gdas" | ||
export FHOUT_PGB=${FHOUT:-1} #Output frequency of gfs pgb file at 1.0 and 0.5 deg. | ||
fi | ||
|
||
if [ $GRIBVERSION = grib2 ]; then | ||
export IGEN_ANL="anal_gfs" | ||
export IGEN_FCST="gfs_avn" | ||
export IGEN_GFS="gfs_avn" | ||
fi | ||
|
||
####################################### | ||
# Specify Restart File Name to Key Off | ||
####################################### | ||
export restart_file=$COMIN/${RUN}.t${cyc}z.logf | ||
|
||
#################################### | ||
# Specify Timeout Behavior of Post | ||
# | ||
# SLEEP_TIME - Amount of time to wait for | ||
# a restart file before exiting | ||
# SLEEP_INT - Amount of time to wait between | ||
# checking for restart files | ||
#################################### | ||
export SLEEP_TIME=900 | ||
export SLEEP_INT=5 | ||
|
||
|
||
############################################################### | ||
# Run relevant exglobal script | ||
env | ||
msg="HAS BEGUN on $(hostname)" | ||
postmsg "$msg" | ||
$LOGSCRIPT | ||
|
||
|
||
$SCRgfs/ex${RUN}_atmos_nceppost.sh | ||
status=$? | ||
[[ $status -ne 0 ]] && exit $status | ||
|
||
############################################## | ||
# End JOB SPECIFIC work | ||
############################################## | ||
|
||
############################################## | ||
# Final processing | ||
############################################## | ||
if [ -e "$pgmout" ]; then | ||
cat $pgmout | ||
fi | ||
|
||
msg="ENDED NORMALLY." | ||
postmsg "$msg" | ||
|
||
|
||
########################################## | ||
# Remove the Temporary working directory | ||
########################################## | ||
cd $DATAROOT | ||
[[ $KEEPDATA = "NO" ]] && rm -rf $DATA | ||
|
||
date | ||
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 |
---|---|---|
@@ -0,0 +1,104 @@ | ||
#!/bin/sh | ||
|
||
######################################## | ||
# GFS post manager | ||
######################################## | ||
|
||
export RUN_ENVIR=${RUN_ENVIR:-"nco"} | ||
export PS4='$SECONDS + ' | ||
date | ||
|
||
############################# | ||
# Source relevant config files | ||
############################# | ||
set -x | ||
configs="base post" | ||
export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} | ||
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 post | ||
status=$? | ||
[[ $status -ne 0 ]] && exit $status | ||
|
||
set -xue | ||
# #### 07/30/1999 ################### | ||
# SET SHELL PROCESSING VARIABLES | ||
# ################################### | ||
export PS4='$SECONDS + ' | ||
date | ||
|
||
#################################### | ||
# Specify NET and RUN Name and model | ||
#################################### | ||
export NET=${NET:-gfs} | ||
export RUN=${RUN:-gfs} | ||
export COMPONENT=${COMPONENT:-atmos} | ||
|
||
#################################### | ||
# obtain unique process id (pid) and make temp directories | ||
#################################### | ||
export pid=${pid:-$$} | ||
export DATA=${DATA:-${DATAROOT}/${jobid:?}} | ||
mkdir $DATA | ||
cd $DATA | ||
|
||
#################################### | ||
# Determine Job Output Name on System | ||
#################################### | ||
export outid="LL$job" | ||
export jobid="${outid}.o${pid}" | ||
export pgmout="OUTPUT.${pid}" | ||
|
||
#################################### | ||
# Specify version numbers | ||
#################################### | ||
export gfs_ver=${gfs_ver:-v15.0.0} | ||
|
||
#################################### | ||
# Specify Execution Areas | ||
#################################### | ||
export HOMEgfs=${HOMEgfs:-${NWROOT}/gfs.${gfs_ver}} | ||
export EXECgfs=${HOMEgfs:-$HOMEgfs/exec} | ||
export FIXgfs=${HOMEgfs:-$HOMEgfs/fix} | ||
export PARMgfs=${HOMEgfs:-$HOMEgfs/parm} | ||
export USHgfs=${HOMEgfs:-$HOMEgfs/ush} | ||
|
||
########################### | ||
# Set up EXT variable | ||
########################### | ||
export EXT_FCST=NO | ||
|
||
################################### | ||
# Set up the UTILITIES | ||
################################### | ||
# export HOMEutil=${HOMEutil:-/nw${envir}/util.${util_ver}} | ||
# export utilscript=${utilscript:-$HOMEutil/ush} | ||
# export utilexec=${utilexec:-$HOMEutil/exec} | ||
|
||
########################################### | ||
# Run setpdy and initialize PDY variables | ||
########################################### | ||
export cycle=t${cyc}z | ||
setpdy.sh | ||
. ./PDY | ||
|
||
export ROTDIR=${ROTDIR:-${COMROOT:?}/$NET/$envir} | ||
export COMIN=${COMIN:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT} | ||
export COMOUT=${COMOUT:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT} | ||
|
||
|
||
######################################################## | ||
# Execute the script. | ||
$HOMEgfs/scripts/exglobal_atmos_pmgr.sh | ||
######################################################## | ||
|
||
date |
Oops, something went wrong.