From 06bce0edcb32844f9a07b7bee291be49c6971d99 Mon Sep 17 00:00:00 2001 From: WenMeng-NOAA <48260754+WenMeng-NOAA@users.noreply.github.com> Date: Mon, 14 Sep 2020 20:08:42 -0400 Subject: [PATCH] Update workflow scripts for gfs v16 EE2 review (#183) * Add changes in workflow scripts based on Eric's EE2 review. * Update gfs_transfer.sh for GFS V16. --- scripts/exgdas_nceppost.sh | 25 +++++++++++-------------- scripts/exgfs_nceppost.sh | 25 ++++++++++++------------- scripts/exglobal_pmgr.sh | 2 +- ush/gfs_nceppost.sh | 1 + ush/gfs_transfer.sh | 7 ++++--- 5 files changed, 29 insertions(+), 31 deletions(-) diff --git a/scripts/exgdas_nceppost.sh b/scripts/exgdas_nceppost.sh index a4da491f9..862c18b4a 100755 --- a/scripts/exgdas_nceppost.sh +++ b/scripts/exgdas_nceppost.sh @@ -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 "-----------------------------------------------------" ##################################################################### @@ -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," ########################################################## @@ -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 @@ -173,7 +175,7 @@ then fi fi - rm pgbfile pgifile pgbfile.grib2 tfile prmsl h5wav + rm pgbfile.grib2 fi #---------------------------------- @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/scripts/exgfs_nceppost.sh b/scripts/exgfs_nceppost.sh index 750d55cb5..53a065527 100755 --- a/scripts/exgfs_nceppost.sh +++ b/scripts/exgfs_nceppost.sh @@ -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 "-----------------------------------------------------" ##################################################################### @@ -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," ########################################################## @@ -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 @@ -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 @@ -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 ########################## @@ -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 @@ -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 @@ -326,7 +326,6 @@ do export CTLFILE=${CTLFILEGFS:-$PARMpost/postcntrl_gfs.xml} fi fi -# export CTL=`basename $CTLFILE1` fi export FLXIOUT=flxifile @@ -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} @@ -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. @@ -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 @@ -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 diff --git a/scripts/exglobal_pmgr.sh b/scripts/exglobal_pmgr.sh index a9bcb4251..58784241c 100755 --- a/scripts/exglobal_pmgr.sh +++ b/scripts/exglobal_pmgr.sh @@ -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 diff --git a/ush/gfs_nceppost.sh b/ush/gfs_nceppost.sh index 7e8bc361b..409163739 100755 --- a/ush/gfs_nceppost.sh +++ b/ush/gfs_nceppost.sh @@ -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 diff --git a/ush/gfs_transfer.sh b/ush/gfs_transfer.sh index f6ff4c721..028004d90 100755 --- a/ush/gfs_transfer.sh +++ b/ush/gfs_transfer.sh @@ -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 @@ -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