Skip to content

Commit

Permalink
Issue #94 - Sync merge branch 'feature/gfsv16b' into feature/gfsv16b-…
Browse files Browse the repository at this point in the history
…restructure
  • Loading branch information
KateFriedman-NOAA committed Jul 8, 2020
2 parents 506e3bf + ae7dbdb commit 233f9f6
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 40 deletions.
1 change: 1 addition & 0 deletions jobs/JGLOBAL_FORECAST
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ fi
if [ ${DO_WAVE:-"NO"} = "YES" ]; then
# WAVE component directory
export COMPONENTwave=${COMPONENTwave:-"wave"}
export CDUMPwave=${CDUMPwave:-${CDUMP}wave}
export COMINwave=${COMINwave:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENTwave}}
export COMOUTwave=${COMOUTwave:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENTwave}}
fi
Expand Down
2 changes: 1 addition & 1 deletion parm/config/config.metp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if [ "$CDUMP" = "gfs" ] ; then
export g2o1_obtype_upper_air="ADPUPA"
export g2o1_grid_upper_air="G003"
export g2o1_fhr_out_upper_air="6"
export g2o1_obtype_conus_sfc="ONLYSF"
export g2o1_obtype_conus_sfc="ONLYSF ADPUPA"
export g2o1_grid_conus_sfc="G104"
export g2o1_fhr_out_conus_sfc="3"
export g2o1_prepbufr_data_runhpss="YES"
Expand Down
12 changes: 4 additions & 8 deletions parm/config/config.wave
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,10 @@ export wavepostGRD='gnh_10m aoc_9km gsh_15m' # Native grids that will be post-pr
export CDATE=${PDY}${cyc}

# The start time reflects the number of hindcast hours prior to the cycle initial time
if [ "$CDUMP" = "gdas" ]
then
if [ "$CDUMP" = "gdas" ]; then
export FHMAX_WAV=${FHMAX:-9}
else
FHMAX_GFS="FHMAX_GFS_${cyc}"
export FHMAX_WAV=${!FHMAX_GFS}
export FHMAX_WAV=$FHMAX_GFS
fi
export WAVHINDH=${WAVHINDH:-0}
export FHMIN_WAV=${FHMIN_WAV:-0}
Expand All @@ -74,13 +72,11 @@ export FHINCP_WAV=`expr $DTPNT_WAV / 3600`
export OUTPARS_WAV="WND CUR ICE HS T01 T02 DIR FP DP PHS PTP PDIR CHA"

# Restart file config
if [ "$CDUMP" = "gdas" ]
then
if [ "$CDUMP" = "gdas" ]; then
WAVNCYC=4
WAVHCYC=6
FHMAX_WAV_CUR=${FHMAX_WAV_CUR:-48} # RTOFS forecasts only out to 8 days
elif [ ${gfs_cyc} -ne 0 ]
then
elif [ ${gfs_cyc} -ne 0 ]; then
FHMAX_WAV_CUR=${FHMAX_WAV_CUR:-192} # RTOFS forecasts only out to 8 days
WAVHCYC=`expr 24 / ${gfs_cyc}`
else
Expand Down
59 changes: 29 additions & 30 deletions scripts/exglobal_fcst_nemsfv3gfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,27 +151,38 @@ if [ ! -d $DATA ]; then
fi
cd $DATA || exit 8
mkdir -p $DATA/INPUT

if [ $cplwav = ".true." ]; then
if [ $CDUMP = "gdas" ]; then
RSTDIR_WAVE=$ROTDIR/${CDUMP}wave.${PDY}/${cyc}/restart
else
RSTDIR_WAVE=${RSTDIR_WAVE:-$ROTDIR/${CDUMP}wave.${PDY}/${cyc}/restart}
fi
if [ ! -d $RSTDIR_WAVE ]; then mkdir -p $RSTDIR_WAVE ; fi
$NLN $RSTDIR_WAVE restart_wave
fi

if [ $CDUMP = "gfs" -a $rst_invt1 -gt 0 ]; then
RSTDIR_TMP=${RSTDIR:-$ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENTatmos}/RERUN_RESTART
if [ ! -d $RSTDIR_TMP ]; then mkdir -p $RSTDIR_TMP ; fi
$NLN $RSTDIR_TMP RESTART
RSTDIR_ATM=${RSTDIR:-$ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENTatmos}/RERUN_RESTART
if [ ! -d $RSTDIR_ATM ]; then mkdir -p $RSTDIR_ATM ; fi
$NLN $RSTDIR_ATM RESTART
else
mkdir -p $DATA/RESTART
fi

#-------------------------------------------------------
# determine if restart IC exists to continue from a previous forecast
RERUN="NO"
filecount=$(find $RSTDIR_TMP -type f | wc -l)
filecount=$(find $RSTDIR_ATM -type f | wc -l)
if [ $CDUMP = "gfs" -a $rst_invt1 -gt 0 -a $FHMAX -gt $rst_invt1 -a $filecount -gt 10 ]; then
reverse=$(echo "${restart_interval[@]} " | tac -s ' ')
for xfh in $reverse ; do
yfh=$((xfh-(IAU_OFFSET/2)))
SDATE=$($NDATE +$yfh $CDATE)
PDYS=$(echo $SDATE | cut -c1-8)
cycs=$(echo $SDATE | cut -c9-10)
flag1=$RSTDIR_TMP/${PDYS}.${cycs}0000.coupler.res
flag2=$RSTDIR_TMP/coupler.res
flag1=$RSTDIR_ATM/${PDYS}.${cycs}0000.coupler.res
flag2=$RSTDIR_ATM/coupler.res
if [ -s $flag1 ]; then
CDATE_RST=$SDATE
[[ $RERUN = "YES" ]] && break
Expand Down Expand Up @@ -314,12 +325,14 @@ EOF
export warm_start=".true."
PDYT=$(echo $CDATE_RST | cut -c1-8)
cyct=$(echo $CDATE_RST | cut -c9-10)
for file in $(ls $RSTDIR_TMP/${PDYT}.${cyct}0000.*); do
for file in $(ls $RSTDIR_ATM/${PDYT}.${cyct}0000.*); do
file2=$(echo $(basename $file))
file2=$(echo $file2 | cut -d. -f3-)
$NLN $file $DATA/INPUT/$file2
done

hour_rst=`$NHOUR $CDATE_RST $CDATE`
IAU_FHROT=$((IAU_OFFSET+hour_rst))
if [ $DOIAU = "YES" ]; then
IAUFHRS=-1
IAU_DELTHRS=0
Expand Down Expand Up @@ -398,7 +411,7 @@ if [ $IAER -gt 0 ] ; then
done
fi

#### Copy over WW3 inputs
#-------------wavewave----------------------
if [ $cplwav = ".true." ]; then

# Link WW3 files
Expand All @@ -425,10 +438,14 @@ if [ $cplwav = ".true." ]; then
export WRcyc=`echo $WRDATE | cut -c9-10`
export WRDIR=${ROTDIR}/${CDUMPRSTwave}.${WRPDY}/${WRcyc}/${COMPONENTwave}/restart
export datwave=$COMOUTwave/rundata
export wavprfx=${CDUMP}${WAV_MEMBER}
export wavprfx=${CDUMPwave}${WAV_MEMBER}

for wavGRD in $waveGRD ; do
# Link wave IC for current cycle
$NLN ${WRDIR}/${sPDY}.${scyc}0000.restart.${wavGRD} $DATA/restart.${wavGRD}
if [ $RERUN = "NO" ]; then
$NLN ${WRDIR}/${sPDY}.${scyc}0000.restart.${wavGRD} $DATA/restart.${wavGRD}
else
$NLN ${RSTDIR_WAVE}/${PDYT}.${cyct}0000.restart.${wavGRD} $DATA/restart.${wavGRD}
fi
eval $NLN $datwave/${wavprfx}.log.${wavGRD}.${PDY}${cyc} log.${wavGRD}
done

Expand Down Expand Up @@ -484,6 +501,7 @@ if [ $cplwav = ".true." ]; then
done

fi #cplwav=true
#-------------wavewave----------------------

# inline post fix files
if [ $WRITE_DOPOST = ".true." ]; then
Expand Down Expand Up @@ -1307,7 +1325,6 @@ if [ $SEND = "YES" ]; then
if [ $CDUMP = "gdas" -a $rst_invt1 -gt 0 ]; then
cd $DATA/RESTART
mkdir -p $memdir/RESTART

for rst_int in $restart_interval ; do
if [ $rst_int -ge 0 ]; then
RDATE=$($NDATE +$rst_int $CDATE)
Expand All @@ -1316,14 +1333,6 @@ if [ $SEND = "YES" ]; then
for file in $(ls ${rPDY}.${rcyc}0000.*) ; do
$NCP $file $memdir/RESTART/$file
done
if [ $cplwav = ".true." ]; then
WRDIR=$COMOUTwave/restart
mkdir -p ${WRDIR}
for wavGRD in $waveGRD ; do
# Copy wave IC for the next cycle
$NCP $DATA/${rPDY}.${rcyc}0000.restart.${wavGRD} ${WRDIR}
done
fi
fi
done
if [ $DOIAU = "YES" ] || [ $DOIAU_coldstart = "YES" ]; then
Expand All @@ -1338,18 +1347,8 @@ if [ $SEND = "YES" ]; then
for file in $(ls ${rPDY}.${rcyc}0000.*) ; do
$NCP $file $memdir/RESTART/$file
done
if [ $cplwav = ".true." ]; then
WRDIR=$COMOUTwave/restart
mkdir -p ${WRDIR}
for wavGRD in $waveGRD ; do
# Copy wave IC for the next cycle
$NCP $DATA/${rPDY}.${rcyc}0000.restart.${wavGRD} ${WRDIR}
done
fi
fi

fi

fi

#------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion sorc/checkout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ if [[ ! -d verif-global.fd ]] ; then
rm -f ${topdir}/checkout-verif-global.log
git clone --recursive https://github.com/NOAA-EMC/EMC_verif-global.git verif-global.fd >> ${topdir}/checkout-verif-global.log 2>&1
cd verif-global.fd
git checkout verif_global_v1.8.0
git checkout verif_global_v1.9.0
cd ${topdir}
else
echo 'Skip. Directory verif-global.fd already exist.'
Expand Down

0 comments on commit 233f9f6

Please sign in to comment.