Skip to content

Commit

Permalink
Update workflow scripts for gfs v16 EE2 review (#183)
Browse files Browse the repository at this point in the history
* Add changes in workflow scripts based on Eric's EE2 review.

* Update gfs_transfer.sh for GFS V16.
  • Loading branch information
WenMeng-NOAA committed Sep 15, 2020
1 parent 2643655 commit 06bce0e
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 31 deletions.
25 changes: 11 additions & 14 deletions scripts/exgdas_nceppost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ echo " from j-job script."
echo " Feb 18 - Meng - Removed legacy setting for generating grib1 data"
echo " and reading sigio model outputs."
echo " Aug 20 - Meng - Remove .ecf extentsion per EE2 review."
echo " Sep 20 - Meng - Update clean up files per EE2 review."
echo "-----------------------------------------------------"
#####################################################################

Expand Down Expand Up @@ -63,7 +64,6 @@ export machine=${machine:-WCOSS_C}
###########################
# Specify Output layers
###########################
#export POSTGPVARS="KPO=50,PO=1000.,975.,950.,925.,900.,875.,850.,825.,800.,775.,750.,725.,700.,675.,650.,625.,600.,575.,550.,525.,500.,475.,450.,425.,400.,375.,350.,325.,300.,275.,250.,225.,200.,175.,150.,125.,100.,70.,50.,40.,30.,20.,15.,10.,7.,5.,3.,2.,1.,0.4,"
export POSTGPVARS="KPO=57,PO=1000.,975.,950.,925.,900.,875.,850.,825.,800.,775.,750.,725.,700.,675.,650.,625.,600.,575.,550.,525.,500.,475.,450.,425.,400.,375.,350.,325.,300.,275.,250.,225.,200.,175.,150.,125.,100.,70.,50.,40.,30.,20.,15.,10.,7.,5.,3.,2.,1.,0.7,0.4,0.2,0.1,0.07,0.04,0.02,0.01,"

##########################################################
Expand Down Expand Up @@ -114,17 +114,19 @@ then
export CTLFILE=$PARMpost/postcntrl_gfs_anl.xml
fi

rm sigfile sfcfile nemsfile
[[ -f flxfile ]] && rm flxfile ; [[ -f nemsfile ]] && rm nemsfile
if [ $OUTTYP -eq 4 ] ; then
export NEMSINP=$COMIN/${PREFIX}atmanl${SUFFIX}
export FLXINP=$COMIN/${PREFIX}sfcanl${SUFFIX}
ln -fs $COMIN/${PREFIX}atmanl${SUFFIX} nemsfile
export NEMSINP=nemsfile
ln -fs $COMIN/${PREFIX}sfcanl${SUFFIX} flxfile
export FLXINP=flxfile
fi
export PGBOUT=pgbfile
export PGIOUT=pgifile
export PGBOUT2=pgbfile.grib2
export PGIOUT2=pgifile.grib2.idx
export IGEN=$IGEN_ANL
export FILTER=1
export FILTER=0

#specify fhr even for analysis because postgp uses it
# export fhr=00
Expand Down Expand Up @@ -173,7 +175,7 @@ then
fi

fi
rm pgbfile pgifile pgbfile.grib2 tfile prmsl h5wav
rm pgbfile.grib2
fi

#----------------------------------
Expand Down Expand Up @@ -211,7 +213,7 @@ do
###############################
if [ $ic -eq $SLEEP_LOOP_MAX ]
then
echo " *** FATA ERROR: No model output in nemsio for f${fhr} "
echo " *** FATAL ERROR: No model output in nemsio for f${fhr} "
export err=9
err_chk
fi
Expand All @@ -225,7 +227,7 @@ do
# Put restart files into /nwges
# for backup to start Model Fcst
###############################
rm -f sigfile sfcfile flxfile nemsfile
[[ -f flxfile ]] && rm flxfile ; [[ -f nemsfile ]] && rm nemsfile
if [ $OUTTYP -eq 4 ] ; then
ln -sf $COMIN/${PREFIX}atmf$fhr${SUFFIX} nemsfile
export NEMSINP=nemsfile
Expand Down Expand Up @@ -318,13 +320,8 @@ do
$DBNROOT/bin/dbn_alert MODEL ${run}_PGB2_0P25_WIDX $job $COMOUT/${PREFIX}pgrb2.0p25.f${fhr}.idx
$DBNROOT/bin/dbn_alert MODEL ${run}_PGB_GB2 $job $COMOUT/${PREFIX}pgrb2.1p00.f${fhr}
$DBNROOT/bin/dbn_alert MODEL ${run}_PGB_GB2_WIDX $job $COMOUT/${PREFIX}pgrb2.1p00.f${fhr}.idx
# $DBNROOT/bin/dbn_alert MODEL ${run}_PGB_GB2 $job $COMOUT/${RUN}.${cycle}.pgrb2.0p50.f${fhr3}
# $DBNROOT/bin/dbn_alert MODEL ${run}_PGB_GB2_WIDX $job $COMOUT/${RUN}.${cycle}.pgrb2.0p50.f${fhr3}.idx
# $DBNROOT/bin/dbn_alert MODEL ${run}_PGB $job $COMOUT/${PREFIX}pgrbf${fhr}
# $DBNROOT/bin/dbn_alert MODEL ${run}_PGBI $job $COMOUT/${PREFIX}pgrbif${fhr}
fi

# echo "$PDY$cyc$fhr" > $COMOUT/${RUN}.t${cyc}z.${RUN_FLAG}control

if test $SENDCOM = 'YES'
then
Expand Down Expand Up @@ -371,7 +368,7 @@ do
fi
fi

rm pgbfile pgifile pgbfile.grib2 flxfile flxifile flxfile.grib2 flxfile.grib2.idx tfile prmsl h5wav
[[ -f pgbfile.grib2 ]] && rm pgbfile.grib2 ; [[ -f flxfile ]] && rm flxfile

done

Expand Down
25 changes: 12 additions & 13 deletions scripts/exgfs_nceppost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ echo " from j-job script."
echo " Feb 18 - Meng - Removed legacy setting for generating grib1 data"
echo " and reading sigio model outputs."
echo " Aug 20 - Meng - Remove .ecf extentsion per EE2 review."
echo " Sep 20 - Meng - Update clean up files per EE2 review."
echo "-----------------------------------------------------"
#####################################################################

Expand Down Expand Up @@ -74,7 +75,6 @@ export machine=${machine:-WCOSS_C}
###########################
# Specify Output layers
###########################
#export POSTGPVARS="KPO=50,PO=1000.,975.,950.,925.,900.,875.,850.,825.,800.,775.,750.,725.,700.,675.,650.,625.,600.,575.,550.,525.,500.,475.,450.,425.,400.,375.,350.,325.,300.,275.,250.,225.,200.,175.,150.,125.,100.,70.,50.,40.,30.,20.,15.,10.,7.,5.,3.,2.,1.,0.4,"
export POSTGPVARS="KPO=57,PO=1000.,975.,950.,925.,900.,875.,850.,825.,800.,775.,750.,725.,700.,675.,650.,625.,600.,575.,550.,525.,500.,475.,450.,425.,400.,375.,350.,325.,300.,275.,250.,225.,200.,175.,150.,125.,100.,70.,50.,40.,30.,20.,15.,10.,7.,5.,3.,2.,1.,0.7,0.4,0.2,0.1,0.07,0.04,0.02,0.01,"

##########################################################
Expand Down Expand Up @@ -117,7 +117,7 @@ then
export CTLFILE=$PARMpost/postcntrl_gfs_anl.xml
fi

rm sigfile sfcfile nemsfile
[[ -f flxfile ]] && rm flxfile ; [[ -f nemsfile ]] && rm nemsfile
if [ $OUTTYP -eq 4 ] ; then
ln -fs $COMIN/${PREFIX}atmanl${SUFFIX} nemsfile
export NEMSINP=nemsfile
Expand All @@ -130,14 +130,14 @@ then
export PGBOUT2=pgbfile.grib2
export PGIOUT2=pgifile.grib2.idx
export IGEN=$IGEN_ANL
export FILTER=1
export FILTER=0

$POSTGPSH
export err=$?; err_chk

if test $GRIBVERSION = 'grib2'
then
cp $PGBOUT $PGBOUT2
mv $PGBOUT $PGBOUT2
fi

# Process pgb files
Expand Down Expand Up @@ -185,7 +185,7 @@ then
fi

fi
rm pgbfile pgifile pgbfile.grib2 tfile prmsl h5wav
[[ -f pgbfile.grib2 ]] && rm pgbfile.grib2
# ecflow_client --event release_pgrb2_anl

########################## WAFS U/V/T analysis start ##########################
Expand Down Expand Up @@ -265,7 +265,7 @@ do
###############################
if [ $ic -eq $SLEEP_LOOP_MAX ]
then
echo " *** FATA ERROR: No model output in nemsio for f${fhr} "
echo " *** FATAL ERROR: No model output in nemsio for f${fhr} "
export err=9
err_chk
fi
Expand All @@ -279,7 +279,7 @@ do
# Put restart files into /nwges
# for backup to start Model Fcst
###############################
rm sigfile sfcfile flxfile nemsfile
[[ -f flxfile ]] && rm flxfile ; [[ -f nemsfile ]] && rm nemsfile
if [ $OUTTYP -eq 4 ] ; then
ln -fs $COMIN/${PREFIX}atmf${fhr}${SUFFIX} nemsfile
export NEMSINP=nemsfile
Expand Down Expand Up @@ -326,7 +326,6 @@ do
export CTLFILE=${CTLFILEGFS:-$PARMpost/postcntrl_gfs.xml}
fi
fi
# export CTL=`basename $CTLFILE1`
fi

export FLXIOUT=flxifile
Expand Down Expand Up @@ -363,7 +362,6 @@ do

if test $SENDCOM = "YES"
then
# echo "$PDY$cyc$pad$fhr" > $COMOUT/${RUN}.t${cyc}z.master.control
if [ $GRIBVERSION = 'grib2' ] ; then
if [ $INLINE_POST = ".false." ]; then
cp $PGBOUT2 $COMOUT/${MASTERFL}
Expand Down Expand Up @@ -408,7 +406,7 @@ do
$USHgfs/gfs_transfer.sh
# fi
fi
rm pgbfile* pgifile* tfile prmsl h5wav
[[ -f pgbfile.grib2 ]] && rm pgbfile.grib2

# use post to generate GFS Grib2 Flux file as model generated Flux file
# will be in nemsio format after FY17 upgrade.
Expand Down Expand Up @@ -490,8 +488,6 @@ do
mv goesifile $COMOUT/${SPECIALFLIDX}f$fhr

fi
# rm flxfile flxifile goesfile goesifile
rm flxifile goesfile goesifile
fi
# end of satellite processing

Expand Down Expand Up @@ -529,16 +525,19 @@ do

export err=$?; err_chk

if [ -e $PGBOUT ]
then
if test $SENDCOM = "YES"
then
cp $PGBOUT $COMOUT/${PREFIX}wafs.grb2f$fhr
cp $PGIOUT $COMOUT/${PREFIX}wafs.grb2if$fhr
fi
fi
fi
[[ -f wafsfile ]] && rm wafsfile ; [[ -f wafsifile ]] && rm wafsifile
fi
########################### WAFS end ###########################

rm flxfile flxifile wafsfile wafsifile

done

Expand Down
2 changes: 1 addition & 1 deletion scripts/exglobal_pmgr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ do

sleep 10
icnt=$((icnt + 1))
if [ $icnt -ge 1080 ]
if [ $icnt -ge 1001 ]
then
msg="ABORTING after 3 hours of waiting for ${RUN} FCST hours $postjobs."
err_exit $msg
Expand Down
1 change: 1 addition & 0 deletions ush/gfs_nceppost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ if [ $GRIBVERSION = grib2 ]; then
#cat $PGBOUT prmsl h5wav >> $PGBOUT
#wm
# cat prmsl h5wav >> $PGBOUT
[[ -f prmsl ]] && rm prmsl ; [[ -f h5wav ]] && rm h5wav ; [[ -f tfile ]] && rm tfile

fi

Expand Down
7 changes: 4 additions & 3 deletions ush/gfs_transfer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ echo " History - "
echo " Cooke - 04/21/05 - Inital version, based off of"
echo " global_transfer.sh"
echo " Meng - 01/04/18 - Remove writing data file to /nwges."
echo " Meng - 09/14/20 - Update model output format to netcdf for GFS V16"
echo "-----------------------------------------------------"
#####################################################################
set -xa
Expand Down Expand Up @@ -67,16 +68,16 @@ then
#fi

fhr=`printf "%03d" $fhr`
$DBNROOT/bin/dbn_alert MODEL GFS_SF $job $COMOUT/${RUN}.t${cyc}z.atmf$fhr.nemsio
$DBNROOT/bin/dbn_alert MODEL GFS_SF $job $COMOUT/${RUN}.t${cyc}z.atmf$fhr.nc


if [[ $fhr -gt 0 && $fhr -le 84 ]]
then
$DBNROOT/bin/dbn_alert MODEL GFS_BF $job $COMOUT/${RUN}.t${cyc}z.sfcf$fhr.nemsio
$DBNROOT/bin/dbn_alert MODEL GFS_BF $job $COMOUT/${RUN}.t${cyc}z.sfcf$fhr.nc
fi
if [[ $fhr -eq 120 ]]
then
$DBNROOT/bin/dbn_alert MODEL GFS_BF $job $COMOUT/${RUN}.t${cyc}z.sfcf$fhr.nemsio
$DBNROOT/bin/dbn_alert MODEL GFS_BF $job $COMOUT/${RUN}.t${cyc}z.sfcf$fhr.nc
fi
fi

Expand Down

0 comments on commit 06bce0e

Please sign in to comment.