Skip to content

Commit

Permalink
GitHub Issue #2. DA changes for GFSv16.
Browse files Browse the repository at this point in the history
  • Loading branch information
RussTreadon-NOAA committed Oct 30, 2020
1 parent 6ae149f commit c7edb84
Show file tree
Hide file tree
Showing 32 changed files with 938 additions and 6,095 deletions.
24 changes: 12 additions & 12 deletions jobs/JGLOBAL_ANALDIAG → jobs/JGDAS_ATMOS_ANALYSIS_DIAG
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,11 @@ export pgmerr=errfile


##############################################
# Set variables used in the exglobal script
# Set variables used in the script
##############################################
export CDATE=${CDATE:-${PDY}${cyc}}
export CDUMP=${CDUMP:-${RUN:-"gfs"}}
export COMPONENT=${COMPONENT:-atmos}
if [ $RUN_ENVIR = "nco" ]; then
export ROTDIR=${COMROOT:?}/$NET/$envir
fi
Expand All @@ -81,20 +82,19 @@ export ASUFFIX=${ASUFFIX:-$SUFFIX}


if [ $RUN_ENVIR = "nco" -o ${ROTDIR_DUMP:-NO} = "YES" ]; then
export COMIN=${COMIN:-$ROTDIR/$RUN.$PDY/$cyc}
export COMOUT=${COMOUT:-$ROTDIR/$RUN.$PDY/$cyc}
export COMIN_OBS=${COMIN_OBS:-$ROTDIR/$RUN.$PDY/$cyc}
export COMIN_GES_OBS=${COMIN_GES_OBS:-$ROTDIR/$GDUMP.$gPDY/$gcyc}
export COMIN=${COMIN:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT}
export COMOUT=${COMOUT:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT}
export COMIN_OBS=${COMIN_OBS:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT}
export COMIN_GES_OBS=${COMIN_GES_OBS:-$ROTDIR/$GDUMP.$gPDY/$gcyc/$COMPONENT}
else
export COMOUT="$ROTDIR/$CDUMP.$PDY/$cyc"
export COMOUT="$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT"
export COMIN_OBS="$DMPDIR/$CDATE/$CDUMP"
export COMIN_GES_OBS="$DMPDIR/$GDATE/$GDUMP"
fi
mkdir -m 775 -p $COMOUT
# COMIN_GES and COMIN_GES_ENS are used in exglobal script
# TO DO: Map NCO's directory into these variables
export COMIN_GES="$ROTDIR/$GDUMP.$gPDY/$gcyc"
export COMIN_GES_ENS="$ROTDIR/enkfgdas.$gPDY/$gcyc"
# COMIN_GES and COMIN_GES_ENS are used in script
export COMIN_GES="$ROTDIR/$GDUMP.$gPDY/$gcyc/$COMPONENT"
export COMIN_GES_ENS="$ROTDIR/enkfgdas.$gPDY/$gcyc/$COMPONENT"


export ATMGES="$COMIN_GES/${GPREFIX}atmf006${GSUFFIX}"
Expand Down Expand Up @@ -134,14 +134,14 @@ export DOGAUSFCANL=${DOGAUSFCANL:-"YES"}


###############################################################
# Run relevant exglobal script
# Run relevant script
env
msg="HAS BEGUN on `hostname`"
postmsg "$jlogfile" "$msg"
$LOGSCRIPT


${ANALDIAGSH:-$HOMEgsi/scripts/exglobal_analdiag_fv3gfs.sh.ecf}
${ANALDIAGSH:-$SCRgfs/exglobal_diag.sh}
status=$?
[[ $status -ne 0 ]] && exit $status

Expand Down
137 changes: 137 additions & 0 deletions jobs/JGDAS_ATMOS_CHGRES_FORENKF
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
#!/bin/ksh
set -x

export RUN_ENVIR=${RUN_ENVIR:-"nco"}
export PS4='$SECONDS + '
date


#############################
# Source relevant config files
#############################
export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config}
configs="base anal echgres"
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 anal
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


##############################################
# Set variables used in the script
##############################################
export CDATE=${CDATE:-${PDY}${cyc}}
export CDUMP=${CDUMP:-${RUN:-"gfs"}}
export COMPONENT=${COMPONENT:-atmos}
if [ $RUN_ENVIR = "nco" ]; then
export ROTDIR=${COMROOT:?}/$NET/$envir
fi
export DO_CALC_ANALYSIS=${DO_CALC_ANALYSIS:-"YES"}


##############################################
# Begin JOB SPECIFIC work
##############################################

GDATE=$($NDATE -$assim_freq $CDATE)
gPDY=$(echo $GDATE | cut -c1-8)
gcyc=$(echo $GDATE | cut -c9-10)
GDUMP=${GDUMP:-"gdas"}

export OPREFIX="${CDUMP}.t${cyc}z."
export GPREFIX="${GDUMP}.t${gcyc}z."
export APREFIX="${CDUMP}.t${cyc}z."
export GSUFFIX=${GSUFFIX:-$SUFFIX}
export ASUFFIX=${ASUFFIX:-$SUFFIX}


if [ $RUN_ENVIR = "nco" -o ${ROTDIR_DUMP:-NO} = "YES" ]; then
export COMIN=${COMIN:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT}
export COMOUT=${COMOUT:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT}
export COMOUT_ENS=${COMOUT_ENS:-$ROTDIR/enkfgdas.$PDY/$cyc/$COMPONENT}
export COMIN_OBS=${COMIN_OBS:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT}
export COMIN_GES_OBS=${COMIN_GES_OBS:-$ROTDIR/$GDUMP.$gPDY/$gcyc/$COMPONENT}
else
export COMOUT="$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT"
export COMOUT_ENS="$ROTDIR/enkfgdas.$PDY/$cyc/$COMPONENT"
export COMIN_OBS="$DMPDIR/$CDATE/$CDUMP"
export COMIN_GES_OBS="$DMPDIR/$GDATE/$GDUMP"
fi
mkdir -m 775 -p $COMOUT
# COMIN_GES and COMIN_GES_ENS are used in script
export COMIN_GES="$ROTDIR/$GDUMP.$gPDY/$gcyc/$COMPONENT"
export COMIN_GES_ENS="$ROTDIR/enkfgdas.$gPDY/$gcyc/$COMPONENT"

###############################################################
# Run relevant script
env
msg="HAS BEGUN on `hostname`"
postmsg "$jlogfile" "$msg"
$LOGSCRIPT


${CHGRESFCSTSH:-$SCRgfs/exgdas_atmos_chgres_forenkf.sh}
status=$?
[[ $status -ne 0 ]] && exit $status


##############################################
# End JOB SPECIFIC work
##############################################

##############################################
# Final processing
##############################################
if [ -e "$pgmout" ] ; then
cat $pgmout
fi


msg="ENDED NORMALLY."
postmsg "$jlogfile" "$msg"


##########################################
# Remove the Temporary working directory
##########################################
cd $DATAROOT
[[ $KEEPDATA = "NO" ]] && rm -rf $DATA

date
exit 0
32 changes: 12 additions & 20 deletions jobs/JGLOBAL_ENKF_ANALDIAG → jobs/JGDAS_ENKF_DIAG
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ date
# Source relevant config files
#############################
export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config}
configs="base anal eobs ediag"
configs="base anal eobs analdiag ediag"
config_path=${EXPDIR:-$NWROOT/gfs.${gfs_ver}/parm/config}
for config in $configs; do
. $config_path/config.$config
Expand Down Expand Up @@ -53,10 +53,11 @@ export pgmerr=errfile


##############################################
# Set variables used in the exglobal script
# Set variables used in the script
##############################################
export CDATE=${CDATE:-${PDY}${cyc}}
export CDUMP=${CDUMP:-${RUN:-"gdas"}}
export COMPONENT=${COMPONENT:-atmos}
if [ $RUN_ENVIR = "nco" ]; then
export ROTDIR=${COMROOT:?}/$NET/$envir
fi
Expand All @@ -81,20 +82,19 @@ export GSUFFIX="${GSUFFIX:-".ensmean${SUFFIX}"}"
export ASUFFIX="${ASUFFIX:-"${SUFFIX}"}"

if [ $RUN_ENVIR = "nco" -o ${ROTDIR_DUMP:-NO} = "YES" ]; then
export COMIN_OBS=${COMIN_OBS:-$ROTDIR/$RUN.$PDY/$cyc}
export COMIN_GES_OBS=${COMIN_GES_OBS:-$ROTDIR/$GDUMP.$gPDY/$gcyc}
export COMIN_OBS=${COMIN_OBS:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT}
export COMIN_GES_OBS=${COMIN_GES_OBS:-$ROTDIR/$GDUMP.$gPDY/$gcyc/$COMPONENT}
else
export COMIN_OBS="$DMPDIR/$CDATE/$CDUMP"
export COMIN_GES_OBS="$DMPDIR/$GDATE/$GDUMP"
fi

# COMIN_GES, COMIN_ANL COMIN_GES_ENS, and COMOUT are used in exglobal script
# TO DO: Map NCO's directory into these variables
COMIN_GES_CTL="$ROTDIR/gdas.$gPDY/$gcyc"
export COMIN_ANL="$ROTDIR/$CDUMP.$PDY/$cyc"
export COMIN_GES_ENS="$ROTDIR/enkfgdas.$gPDY/$gcyc"
# COMIN_GES, COMIN_ANL COMIN_GES_ENS, and COMOUT are used in script
COMIN_GES_CTL="$ROTDIR/gdas.$gPDY/$gcyc/$COMPONENT"
export COMIN_ANL="$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT"
export COMIN_GES_ENS="$ROTDIR/enkfgdas.$gPDY/$gcyc/$COMPONENT"
export COMIN_GES=$COMIN_GES_ENS
export COMOUT="$ROTDIR/enkf$CDUMP.$PDY/$cyc"
export COMOUT="$ROTDIR/enkf$CDUMP.$PDY/$cyc/$COMPONENT"


export ATMGES_ENSMEAN="$COMIN_GES_ENS/${GPREFIX}atmf006$GSUFFIX"
Expand Down Expand Up @@ -154,26 +154,18 @@ done


###############################################################
# Run relevant exglobal script
# Run relevant script
env
msg="HAS BEGUN on `hostname`"
postmsg "$jlogfile" "$msg"
$LOGSCRIPT


${ANALDIAGSH:-$SCRgsi/exglobal_analdiag_fv3gfs.sh.ecf}
${ANALDIAGSH:-$SCRgfs/exglobal_diag.sh}
status=$?
[[ $status -ne 0 ]] && exit $status


##############################################
# Send Alerts
##############################################
if [ $SENDDBN = YES ] ; then
$DBNROOT/bin/dbn_alert MODEL ENKF1_MSC_gsistat $job $GSISTAT
fi


##############################################
# End JOB SPECIFIC work
##############################################
Expand Down
22 changes: 11 additions & 11 deletions jobs/JGDAS_ENKF_RECENTER → jobs/JGDAS_ENKF_ECEN
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,11 @@ export pgmerr=errfile


##############################################
# Set variables used in the exglobal script
# Set variables used in the script
##############################################
export CDATE=${CDATE:-${PDY}${cyc}}
export CDUMP=${CDUMP:-${RUN:-"gdas"}}
export COMPONENT=${COMPONENT:-atmos}
if [ $RUN_ENVIR = "nco" ]; then
export ROTDIR=${COMROOT:?}/$NET/$envir
fi
Expand Down Expand Up @@ -89,30 +90,29 @@ export GSUFFIX=${GSUFFIX:-$SUFFIX}
export ASUFFIX=${ASUFFIX:-$SUFFIX}

if [ $RUN_ENVIR = "nco" -o ${ROTDIR_DUMP:-NO} = "YES" ]; then
export COMIN_OBS=${COMIN_OBS:-$ROTDIR/$RUN.$PDY/$cyc}
export COMIN_GES_OBS=${COMIN_GES_OBS:-$ROTDIR/$GDUMP.$gPDY/$gcyc}
export COMIN_OBS=${COMIN_OBS:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT}
export COMIN_GES_OBS=${COMIN_GES_OBS:-$ROTDIR/$GDUMP.$gPDY/$gcyc/$COMPONENT}
else
export COMIN_OBS="$DMPDIR/$CDATE/$CDUMP"
export COMIN_GES_OBS="$DMPDIR/$GDATE/$GDUMP"
fi

# COMIN, COMIN_ENS and COMIN_GES_ENS are used in exglobal script
# TO DO: Map NCO's directory into these variables
export COMIN="$ROTDIR/$CDUMP.$PDY/$cyc"
export COMIN_ENS="$ROTDIR/enkf$CDUMP_ENKF.$PDY/$cyc"
export COMOUT_ENS="$ROTDIR/enkf$CDUMP.$PDY/$cyc"
export COMIN_GES_ENS="$ROTDIR/enkf$CDUMP.$gPDY/$gcyc"
# COMIN, COMIN_ENS and COMIN_GES_ENS are used in script
export COMIN="$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT"
export COMIN_ENS="$ROTDIR/enkf$CDUMP_ENKF.$PDY/$cyc/$COMPONENT"
export COMOUT_ENS="$ROTDIR/enkf$CDUMP.$PDY/$cyc/$COMPONENT"
export COMIN_GES_ENS="$ROTDIR/enkf$CDUMP.$gPDY/$gcyc/$COMPONENT"


###############################################################
# Run relevant exglobal script
# Run relevant script
env
msg="HAS BEGUN on `hostname`"
postmsg "$jlogfile" "$msg"
$LOGSCRIPT


${ENKFRECENSH:-$SCRgsi/exglobal_enkf_recenter_fv3gfs.sh.ecf}
${ENKFRECENSH:-$SCRgfs/exgdas_enkf_ecen.sh}
status=$?
[[ $status -ne 0 ]] && exit $status

Expand Down
12 changes: 6 additions & 6 deletions jobs/JGDAS_ENKF_FCST
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,11 @@ export pgmerr=errfile


##############################################
# Set variables used in the exglobal script
# Set variables used in the script
##############################################
export CDATE=${CDATE:-${PDY}${cyc}}
export CDUMP=${CDUMP:-${RUN:-"gdas"}}
export COMPONENT=${COMPONENT:-atmos}
if [ $RUN_ENVIR = "nco" ]; then
export ROTDIR=${COMROOT:?}/$NET/$envir
fi
Expand All @@ -68,9 +69,8 @@ fi

export CASE=$CASE_ENKF

# COMOUT is used in exglobal script
# TO DO: Map NCO's directory into these variables
export COMOUT="$ROTDIR/enkf$CDUMP.$PDY/$cyc"
# COMOUT is used in script
export COMOUT="$ROTDIR/enkf$CDUMP.$PDY/$cyc/$COMPONENT"


# Forecast length for EnKF forecast
Expand All @@ -85,14 +85,14 @@ export ENSBEG=$((ENSEND - NMEM_EFCSGRP + 1))


###############################################################
# Run relevant exglobal script
# Run relevant script
env
msg="HAS BEGUN on `hostname`"
postmsg "$jlogfile" "$msg"
$LOGSCRIPT


${ENKFFCSTSH:-$SCRgsi/exglobal_enkf_fcst_fv3gfs.sh.ecf}
${ENKFFCSTSH:-$SCRgfs/exgdas_enkf_fcst.sh}
status=$?
[[ $status -ne 0 ]] && exit $status

Expand Down
Loading

0 comments on commit c7edb84

Please sign in to comment.