Skip to content

Commit

Permalink
GitHub Issue NOAA-EMC#118. Implement EFSOI process in FV3 GFS workflo…
Browse files Browse the repository at this point in the history
…w (2nd try).
  • Loading branch information
AndrewEichmann-NOAA committed Feb 25, 2021
1 parent de13937 commit 43e0ff8
Show file tree
Hide file tree
Showing 37 changed files with 5,737 additions and 37 deletions.
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[submodule "fix"]
path = fix
url = gerrit:GSI-fix

[submodule "libsrc"]
path = libsrc
url = gerrit:GSI-libsrc
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ project(GSI)
option(BUILD_WRF "Build the Enkf with WRF module " OFF)
endif()
option(BUILD_UTIL "Build the Enkf utilities " OFF)

option(BUILD_EFSOI "Build the EFSOI utility " OFF)
option(BUILD_UTIL_COM "Build community utilities " OFF)
option(BUILD_ENKF_PREPROCESS_ARW "Build enkf preprocess for ARW " OFF)
option(BUILD_COV_CALC "Build the Desroziers utility" OFF)
Expand Down Expand Up @@ -273,7 +273,10 @@ project(GSI)
add_subdirectory(util/Radiance_Monitor/nwprod/radmon_shared.v3.0.0/sorc/verf_radbcoef.fd)
add_subdirectory(util/Radiance_Monitor/nwprod/radmon_shared.v3.0.0/sorc/verf_radbcor.fd)
add_subdirectory(util/Radiance_Monitor/nwprod/radmon_shared.v3.0.0/sorc/verf_radtime.fd)
endif(BUILD_UTIL)
endif(BUILD_UTIL)
if(BUILD_EFSOI)
add_subdirectory(util/EFSOI_Utilities/src)
endif(BUILD_EFSOI)
find_package( NDATE )
if( NOT NDATE )
add_subdirectory(util/ndate)
Expand Down
142 changes: 142 additions & 0 deletions jobs/JGDAS_EFSOI
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
#!/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 efsoi"
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 efsoi


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 exglobal 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


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

GDATE=$($NDATE -$assim_freq $CDATE)
gPDY=$(echo $GDATE | cut -c1-8)
export gcyc=$(echo $GDATE | cut -c9-10) # needed in namelist

VDATE=$($NDATE 24 $CDATE)
vPDY=$(echo $VDATE | cut -c1-8)
vcyc=$(echo $VDATE | cut -c9-10)

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



# COMIN_GES_ENS and COMOUT_ANL_ENS are used in script
export COMIN_GES_ENS="$ROTDIR/efsoigdas.$gPDY/$gcyc/$COMPONENT"
export COMOUT_ANL_ENS="$ROTDIR/enkf$CDUMP.$PDY/$cyc/$COMPONENT"
export COMIN_ANL="$ROTDIR/$CDUMP.$vPDY/$vcyc/$COMPONENT"
export COMOUT_ANL_ENSFSOI="$ROTDIR/efsoi$CDUMP.$PDY/$cyc/$COMPONENT"
export OSENSE_SAVE_DIR="$ROTDIR/osense"
mkdir -p $OSENSE_SAVE_DIR
# ========================================================

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

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



##############################################
# Send Alerts
##############################################
if [ $SENDDBN = YES ] ; then
$DBNROOT/bin/dbn_alert MODEL ENKF1_MSC_enkfstat $job $COMOUT_ANL_ENSFSOI/${APREFIX}enkfstat
fi


##############################################
# 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
143 changes: 143 additions & 0 deletions jobs/JGDAS_EFSOI_ECEN
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
#!/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 ecenfsoi"
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 ecenfsoi
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:-"gdas"}}
export COMPONENT=${COMPONENT:-atmos}
if [ $RUN_ENVIR = "nco" ]; then
export ROTDIR=${COMROOT:?}/$NET/$envir
fi


##############################################
# 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 CASE=$CASE_ENKF


EUPD_CYC=$(echo ${EUPD_CYC:-"gdas"} | tr a-z A-Z)
if [ $EUPD_CYC = "GFS" ]; then
CDUMP_ENKF="gfs"
else
CDUMP_ENKF=$CDUMP
fi

export OPREFIX="${CDUMP}.t${cyc}z."
export APREFIX="${CDUMP}.t${cyc}z."
export APREFIX_ENKF="${CDUMP_ENKF}.t${cyc}z."
export GPREFIX="${CDUMP}.t${gcyc}z."
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/$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 script
export COMIN="$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT"
export COMIN_ENS="$ROTDIR/efsoi$CDUMP_ENKF.$PDY/$cyc/$COMPONENT"
export COMOUT_ENS="$ROTDIR/efsoi$CDUMP.$PDY/$cyc/$COMPONENT"
export COMIN_GES_ENS="$ROTDIR/enkf$CDUMP.$gPDY/$gcyc/$COMPONENT"


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


${ENKFRECENSH:-$SCRgfs/exgdas_enkf_ecen.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
Loading

0 comments on commit 43e0ff8

Please sign in to comment.