Skip to content

Commit

Permalink
Update in wave prep script and add ability to pull warm starts
Browse files Browse the repository at this point in the history
- Update getic job to detect warm start config info and pull warm start RESTART
files off HPSS and place in ROTDIR; just for retro ICs, will add ops after implementation
- Add check to JGLOBAL_WAVE_PREP for prior cycle rtofs ROTDIR symlink;
normally cycled mode would have already created this during prior cycle
so added check for use in free-forecast mode

Refs: NOAA-EMC#178
  • Loading branch information
KateFriedman-NOAA committed Mar 5, 2021
1 parent be0ed38 commit efdf917
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 7 deletions.
4 changes: 4 additions & 0 deletions jobs/JGLOBAL_WAVE_PREP
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ else
if [ ! -L $ROTDIR/${WAVECUR_DID}.${RPDY} ]; then # Check if symlink already exists in ROTDIR
$NLN $DMPDIR/${WAVECUR_DID}.${RPDY} $ROTDIR/${WAVECUR_DID}.${RPDY}
fi
BRPDY=`$NDATE -24 ${RPDY}00 | cut -c1-8`
if [ ! -L $ROTDIR/${WAVECUR_DID}.${BRPDY} ]; then # Check if symlink already exists in ROTDIR
$NLN $DMPDIR/${WAVECUR_DID}.${BRPDY} $ROTDIR/${WAVECUR_DID}.${BRPDY}
fi
if [ ! -L $ROTDIR/${CDUMP}.${PDY}/${cyc}/atmos/${WAVICEFILE} ]; then # Check if symlink already exists in ROTDIR
$NLN $DMPDIR/$CDUMP.${PDY}/$cyc/${WAVICEFILE} $ROTDIR/$CDUMP.${PDY}/$cyc/atmos/${WAVICEFILE}
fi
Expand Down
36 changes: 33 additions & 3 deletions jobs/rocoto/getic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,39 @@ export GETICSH=${GETICSH:-${GDASINIT_DIR}/get_v16.data.sh}

# Run get data script
if [ ! -d $EXTRACT_DIR ]; then mkdir -p $EXTRACT_DIR ; fi
sh ${GETICSH} ${CDUMP}
status=$?
[[ $status -ne 0 ]] && exit $status

# Check if init is needed and run if so
if [[ $gfs_ver = "v16" && $EXP_WARM_START = ".true." && $CASE = "C768" ]]; then
# Pull RESTART files off HPSS

if [ ! -d $ROTDIR ]; then mkdir $ROTDIR ; fi
cd $ROTDIR

if [ ${RETRO:-"NO"} = "YES" ]; then # Retrospective parallel input

# Pull prior cycle restart files
BDATE=`$NDATE -06 ${yy}${mm}${dd}${hh}`
htar -xvf ${HPSSDIR}/${BDATE}/gdas_restartb.tar
status=$?
[[ $status -ne 0 ]] && exit $status

# Pull current cycle restart files
htar -xvf ${HPSSDIR}/${CDATE}/gfs_restarta.tar
status=$?
[[ $status -ne 0 ]] && exit $status

# else # Opertional input
# # ADD AFTER IMPLEMENTATION
fi

else

# Run UFS_UTILS GETICSH
sh ${GETICSH} ${CDUMP}
status=$?
[[ $status -ne 0 ]] && exit $status

fi

# Pull pgbanl file for verification/archival - v14+
if [ $gfs_ver = v14 -o $gfs_ver = v15 ]; then
Expand Down
17 changes: 13 additions & 4 deletions parm/config/config.getic
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,20 @@ export GDASINIT_DIR=${UFS_DIR}/util/gdas_init
export PRODHPSSDIR=/NCEPPROD/hpssprod/runhistory
export GETICSH=${GDASINIT_DIR}/get_v16.data.sh

if [ ${RETRO:-"NO"} = "YES" ]; then
if [ ${RETRO:-"NO"} = "YES" ]; then # Retrospective parallel input
export GETICSH=${GDASINIT_DIR}/get_v16retro.data.sh
fi

if [ ${RETRO:-"NO"} = "NO" ]; then # Operational input
if [[ "$CDATE" -lt "2019060106" ]]; then
HPSSDIR=/NCEPDEV/emc-global/5year/emc.glopara/WCOSS_D/gfsv16/v16retro0e
elif [[ "$CDATE" -lt "2019090100" ]]; then
HPSSDIR=/NCEPDEV/emc-global/5year/emc.glopara/WCOSS_D/gfsv16/v16retro1e
elif [[ "$CDATE" -lt "2019101706" ]]; then
HPSSDIR=/NCEPDEV/emc-global/5year/emc.glopara/WCOSS_D/gfsv16/v16retro2e
elif [[ "$CDATE" -lt "2020122206" ]]; then
HPSSDIR=/NCEPDEV/emc-global/5year/emc.glopara/WCOSS_D/gfsv16/v16rt2
else
HPSSDIR=/NCEPDEV/emc-global/5year/emc.gloparadev/WCOSS_D/gfsv16/v16rt2n
fi
elif [ ${RETRO:-"NO"} = "NO" ]; then # Operational input
# No ENKF data prior to 2012/05/21/00z
if [[ "$CDATE" -lt "2012052100" ]]; then
set +x
Expand Down

0 comments on commit efdf917

Please sign in to comment.