From 54eccbf7d71449a930fd82718399260f4dd999c3 Mon Sep 17 00:00:00 2001 From: "kate.friedman" Date: Tue, 13 Dec 2022 19:43:35 +0000 Subject: [PATCH 1/7] Update term for forecast-only MODE - Change "free" to "forecast-only" for MODE setting in setup_expt_fcstonly.py. Refs #1177 --- ush/rocoto/setup_expt_fcstonly.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ush/rocoto/setup_expt_fcstonly.py b/ush/rocoto/setup_expt_fcstonly.py index 16b93c624f..127f7a94f2 100755 --- a/ush/rocoto/setup_expt_fcstonly.py +++ b/ush/rocoto/setup_expt_fcstonly.py @@ -79,7 +79,7 @@ def edit_baseconfig(): .replace('@QUEUE_SERVICE@', queue_service) \ .replace('@PARTITION_BATCH@', partition_batch) \ .replace('@EXP_WARM_START@', exp_warm_start) \ - .replace('@MODE@', 'free') \ + .replace('@MODE@', 'forecast-only') \ .replace('@CHGRP_RSTPROD@', chgrp_rstprod) \ .replace('@CHGRP_CMD@', chgrp_cmd) \ .replace('@HPSSARCH@', hpssarch) \ From 208fb90128394684c0c6a2ec3b94bb8373284399 Mon Sep 17 00:00:00 2001 From: "kate.friedman" Date: Tue, 13 Dec 2022 19:44:20 +0000 Subject: [PATCH 2/7] Add check against forecast-only and cold-start In config.base.emc.dyn (only developer version): - add MODE setting (set from setup scripts) - update IAU if-block to also check for forecast-only and cold-start modes to turn off IAU (corrects bug with f000) Refs #1177 --- parm/config/config.base.emc.dyn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/parm/config/config.base.emc.dyn b/parm/config/config.base.emc.dyn index e369f7fca6..c3b585fd17 100755 --- a/parm/config/config.base.emc.dyn +++ b/parm/config/config.base.emc.dyn @@ -58,6 +58,8 @@ export WAFSF="NO" # WAFS products # use RUNMOS flag (currently in config.vrfy) export REALTIME="YES" +# Experiment mode (cycled or forecast-only) +export MODE="@MODE@" # cycled/forecast-only #################################################### # DO NOT ADD MACHINE DEPENDENT STUFF BELOW THIS LINE @@ -202,7 +204,7 @@ export IAU_OFFSET=6 export DOIAU_ENKF=${DOIAU:-"YES"} # Enable 4DIAU for EnKF ensemble export IAUFHRS_ENKF="3,6,9" export IAU_DELTHRS_ENKF=6 -if [[ "$SDATE" = "$CDATE" && $EXP_WARM_START = ".false." ]] || [[ "$DOIAU" = "NO" ]] ; then # Cold starting or IAU off +if [[ "$SDATE" = "$CDATE" && $EXP_WARM_START = ".false." ]] || [[ "$DOIAU" = "NO" ]] || [[ "$MODE" = "forecast-only" && $EXP_WARM_START = ".false." ]] ; then # Cold starting or IAU off export IAU_OFFSET=0 export IAU_FHROT=0 fi From b831107d70c6df2a64997ba4c634cb17af7e8980 Mon Sep 17 00:00:00 2001 From: "kate.friedman" Date: Thu, 15 Dec 2022 15:16:51 +0000 Subject: [PATCH 3/7] Add checks for cycled MODE in archive job - Some files are not generated or existing during forecast-only mode and should not be included in archival. - Update jobs/rocoto/arch.sh and ush/hpssarch_gen.sh to check for MODE when defining and running some archives. --- jobs/rocoto/arch.sh | 7 +++- ush/hpssarch_gen.sh | 83 +++++++++++++++++++++++++++++---------------- 2 files changed, 60 insertions(+), 30 deletions(-) diff --git a/jobs/rocoto/arch.sh b/jobs/rocoto/arch.sh index b33857838f..62e18400fb 100755 --- a/jobs/rocoto/arch.sh +++ b/jobs/rocoto/arch.sh @@ -182,7 +182,12 @@ if [ $CDUMP = "gfs" ]; then #for targrp in gfs_flux gfs_netcdf/nemsio gfs_pgrb2b; do if [ ${SAVEFCSTNEMSIO:-"YES"} = "YES" ]; then - for targrp in gfs_flux gfs_${format}a gfs_${format}b gfs_pgrb2b; do + targrp_list="gfs_flux gfs_${format}b gfs_pgrb2b" + if [ $MODE = "cycled" ] ; then + targrp_list="${targrp_list} gfs_${format}a" + else + fi + for targrp in $targrp_list; do htar -P -cvf $ATARDIR/$CDATE/${targrp}.tar `cat $ARCH_LIST/${targrp}.txt` status=$? if [ $status -ne 0 -a $CDATE -ge $firstday ]; then diff --git a/ush/hpssarch_gen.sh b/ush/hpssarch_gen.sh index 1f4c8ed542..19b084374f 100755 --- a/ush/hpssarch_gen.sh +++ b/ush/hpssarch_gen.sh @@ -41,14 +41,16 @@ if [ $type = "gfs" ]; then rm -f gfsb.txt rm -f gfs_pgrb2b.txt rm -f gfs_flux.txt - rm -f gfs_${format}a.txt + if [ $MODE = "cycled" ]; then + rm -f gfs_${format}a.txt + touch gfs_${format}a.txt + fi rm -f gfs_${format}b.txt rm -f gfs_restarta.txt touch gfsa.txt touch gfsb.txt touch gfs_pgrb2b.txt touch gfs_flux.txt - touch gfs_${format}a.txt touch gfs_${format}b.txt touch gfs_restarta.txt @@ -69,17 +71,21 @@ if [ $type = "gfs" ]; then echo "${dirname}${head}pgrb2b.0p50.anl.idx " >>gfs_pgrb2b.txt echo "./logs/${CDATE}/gfs*.log " >>gfsa.txt - echo "${dirname}${head}gsistat " >>gfsa.txt - echo "${dirname}${head}nsstbufr " >>gfsa.txt - echo "${dirname}${head}prepbufr " >>gfsa.txt - echo "${dirname}${head}prepbufr_pre-qc " >>gfsa.txt - echo "${dirname}${head}prepbufr.acft_profiles " >>gfsa.txt - echo "${dirname}${head}pgrb2.0p25.anl " >>gfsa.txt - echo "${dirname}${head}pgrb2.0p25.anl.idx " >>gfsa.txt - echo "${dirname}avno.t${cyc}z.cyclone.trackatcfunix " >>gfsa.txt - echo "${dirname}avnop.t${cyc}z.cyclone.trackatcfunix " >>gfsa.txt - echo "${dirname}trak.gfso.atcfunix.${PDY}${cyc} " >>gfsa.txt - echo "${dirname}trak.gfso.atcfunix.altg.${PDY}${cyc} " >>gfsa.txt + if [ $MODE = "cycled" ]; then + echo "${dirname}${head}gsistat " >>gfsa.txt + echo "${dirname}${head}nsstbufr " >>gfsa.txt + echo "${dirname}${head}prepbufr " >>gfsa.txt + echo "${dirname}${head}prepbufr_pre-qc " >>gfsa.txt + echo "${dirname}${head}prepbufr.acft_profiles " >>gfsa.txt + echo "${dirname}${head}pgrb2.0p25.anl " >>gfsa.txt + echo "${dirname}${head}pgrb2.0p25.anl.idx " >>gfsa.txt + fi + if [ $VRFYTRAK = "YES" ]; then + echo "${dirname}avno.t${cyc}z.cyclone.trackatcfunix " >>gfsa.txt + echo "${dirname}avnop.t${cyc}z.cyclone.trackatcfunix " >>gfsa.txt + echo "${dirname}trak.gfso.atcfunix.${PDY}${cyc} " >>gfsa.txt + echo "${dirname}trak.gfso.atcfunix.altg.${PDY}${cyc} " >>gfsa.txt + fi echo "${dirname}storms.gfso.atcf_gen.${PDY}${cyc} " >>gfsa.txt echo "${dirname}storms.gfso.atcf_gen.altg.${PDY}${cyc} " >>gfsa.txt @@ -103,11 +109,12 @@ if [ $type = "gfs" ]; then fi fi - echo "${dirname}${head}pgrb2.0p50.anl " >>gfsb.txt - echo "${dirname}${head}pgrb2.0p50.anl.idx " >>gfsb.txt - echo "${dirname}${head}pgrb2.1p00.anl " >>gfsb.txt - echo "${dirname}${head}pgrb2.1p00.anl.idx " >>gfsb.txt - + if [ $MODE = "cycled" ]; then + echo "${dirname}${head}pgrb2.0p50.anl " >>gfsb.txt + echo "${dirname}${head}pgrb2.0p50.anl.idx " >>gfsb.txt + echo "${dirname}${head}pgrb2.1p00.anl " >>gfsb.txt + echo "${dirname}${head}pgrb2.1p00.anl.idx " >>gfsb.txt + fi fh=0 while [ $fh -le $FHMAX_GFS ]; do @@ -145,11 +152,13 @@ if [ $type = "gfs" ]; then #.................. - echo "${dirname}${head}atmanl${SUFFIX} " >>gfs_${format}a.txt - echo "${dirname}${head}sfcanl${SUFFIX} " >>gfs_${format}a.txt - echo "${dirname}${head}atmi*.nc " >>gfs_${format}a.txt - echo "${dirname}${head}dtfanl.nc " >>gfs_${format}a.txt - echo "${dirname}${head}loginc.txt " >>gfs_${format}a.txt + if [ $MODE = "cycled" ]; then + echo "${dirname}${head}atmanl${SUFFIX} " >>gfs_${format}a.txt + echo "${dirname}${head}sfcanl${SUFFIX} " >>gfs_${format}a.txt + echo "${dirname}${head}atmi*.nc " >>gfs_${format}a.txt + echo "${dirname}${head}dtfanl.nc " >>gfs_${format}a.txt + echo "${dirname}${head}loginc.txt " >>gfs_${format}a.txt + fi #.................. if [ $OUTPUT_HISTORY = ".true." ]; then @@ -163,12 +172,28 @@ if [ $type = "gfs" ]; then fi #.................. - echo "${dirname}RESTART/*0000.sfcanl_data.tile1.nc " >>gfs_restarta.txt - echo "${dirname}RESTART/*0000.sfcanl_data.tile2.nc " >>gfs_restarta.txt - echo "${dirname}RESTART/*0000.sfcanl_data.tile3.nc " >>gfs_restarta.txt - echo "${dirname}RESTART/*0000.sfcanl_data.tile4.nc " >>gfs_restarta.txt - echo "${dirname}RESTART/*0000.sfcanl_data.tile5.nc " >>gfs_restarta.txt - echo "${dirname}RESTART/*0000.sfcanl_data.tile6.nc " >>gfs_restarta.txt + if [ $MODE = "cycled" ]; then + echo "${dirname}RESTART/*0000.sfcanl_data.tile1.nc " >>gfs_restarta.txt + echo "${dirname}RESTART/*0000.sfcanl_data.tile2.nc " >>gfs_restarta.txt + echo "${dirname}RESTART/*0000.sfcanl_data.tile3.nc " >>gfs_restarta.txt + echo "${dirname}RESTART/*0000.sfcanl_data.tile4.nc " >>gfs_restarta.txt + echo "${dirname}RESTART/*0000.sfcanl_data.tile5.nc " >>gfs_restarta.txt + echo "${dirname}RESTART/*0000.sfcanl_data.tile6.nc " >>gfs_restarta.txt + elif [ $MODE = "forecast-only" ]; then + echo "${dirname}INPUT/gfs_ctrl.nc " >>gfs_restarta.txt + echo "${dirname}INPUT/gfs_data.tile1.nc " >>gfs_restarta.txt + echo "${dirname}INPUT/gfs_data.tile2.nc " >>gfs_restarta.txt + echo "${dirname}INPUT/gfs_data.tile3.nc " >>gfs_restarta.txt + echo "${dirname}INPUT/gfs_data.tile4.nc " >>gfs_restarta.txt + echo "${dirname}INPUT/gfs_data.tile5.nc " >>gfs_restarta.txt + echo "${dirname}INPUT/gfs_data.tile6.nc " >>gfs_restarta.txt + echo "${dirname}INPUT/sfc_data.tile1.nc " >>gfs_restarta.txt + echo "${dirname}INPUT/sfc_data.tile2.nc " >>gfs_restarta.txt + echo "${dirname}INPUT/sfc_data.tile3.nc " >>gfs_restarta.txt + echo "${dirname}INPUT/sfc_data.tile4.nc " >>gfs_restarta.txt + echo "${dirname}INPUT/sfc_data.tile5.nc " >>gfs_restarta.txt + echo "${dirname}INPUT/sfc_data.tile6.nc " >>gfs_restarta.txt + fi #.................. if [ $DO_WAVE = "YES" ]; then From f21a0e59fd3fefa5634422e4a015890ef41ed0b1 Mon Sep 17 00:00:00 2001 From: "kate.friedman" Date: Thu, 15 Dec 2022 15:18:22 +0000 Subject: [PATCH 4/7] Add missing COMINsyn paths for tracker job --- parm/config/config.base.emc.dyn | 1 + ush/rocoto/setup_expt.py | 6 +++++- ush/rocoto/setup_expt_fcstonly.py | 6 +++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/parm/config/config.base.emc.dyn b/parm/config/config.base.emc.dyn index c3b585fd17..2e7cdee387 100755 --- a/parm/config/config.base.emc.dyn +++ b/parm/config/config.base.emc.dyn @@ -34,6 +34,7 @@ export SCRgfs=$HOMEgfs/scripts # GLOBAL static environment parameters export PACKAGEROOT="@PACKAGEROOT@" export COMROOT="@COMROOT@" +export COMINsyn="@COMINsyn@" export DMPDIR="@DMPDIR@" export RTMFIX=$CRTM_FIX diff --git a/ush/rocoto/setup_expt.py b/ush/rocoto/setup_expt.py index badab09041..131e534267 100755 --- a/ush/rocoto/setup_expt.py +++ b/ush/rocoto/setup_expt.py @@ -96,6 +96,7 @@ def edit_baseconfig(): .replace('@DMPDIR@', dmpdir) \ .replace('@PACKAGEROOT@', packageroot) \ .replace('@COMROOT@', comroot) \ + .replace('@COMINsyn@', cominsyn) \ .replace('@HOMEDIR@', homedir) \ .replace('@STMP@', stmp) \ .replace('@PTMP@', ptmp) \ @@ -188,6 +189,7 @@ def edit_baseconfig(): dmpdir = '/lfs/h2/emc/global/noscrub/emc.global/dump' packageroot = '${PACKAGEROOT:-"/lfs/h1/ops/prod/packages"}' comroot = '${COMROOT:-"/lfs/h1/ops/prod/com"}' + cominsyn = '${COMROOT}/gfs/${gfs_ver:-"v16.3"}/syndat' homedir = '/lfs/h2/emc/global/noscrub/$USER' stmp = '/lfs/h2/emc/stmp/$USER' ptmp = '/lfs/h2/emc/ptmp/$USER' @@ -241,7 +243,8 @@ def edit_baseconfig(): base_svn = '/scratch1/NCEPDEV/global/glopara/svn' dmpdir = '/scratch1/NCEPDEV/global/glopara/dump' packageroot = '/scratch1/NCEPDEV/global/glopara/nwpara' - comroot = '/scratch1/NCEPDEV/rstprod/com' + comroot = '/scratch1/NCEPDEV/global/glopara/com' + cominsyn = '${COMROOT}/gfs/prod/syndat' homedir = '/scratch1/NCEPDEV/global/$USER' stmp = '/scratch1/NCEPDEV/stmp2/$USER' ptmp = '/scratch1/NCEPDEV/stmp4/$USER' @@ -259,6 +262,7 @@ def edit_baseconfig(): dmpdir = '/work/noaa/rstprod/dump' packageroot = '/work/noaa/global/glopara/nwpara' comroot = '/work/noaa/global/glopara/com' + cominsyn = '${COMROOT}/gfs/prod/syndat' homedir = '/work/noaa/global/$USER' stmp = '/work/noaa/stmp/$USER' ptmp = '/work/noaa/stmp/$USER' diff --git a/ush/rocoto/setup_expt_fcstonly.py b/ush/rocoto/setup_expt_fcstonly.py index 127f7a94f2..434fcb2220 100755 --- a/ush/rocoto/setup_expt_fcstonly.py +++ b/ush/rocoto/setup_expt_fcstonly.py @@ -70,6 +70,7 @@ def edit_baseconfig(): .replace('@DMPDIR@', dmpdir) \ .replace('@PACKAGEROOT@', packageroot) \ .replace('@COMROOT@', comroot) \ + .replace('@COMINsyn@', cominsyn) \ .replace('@HOMEDIR@', homedir) \ .replace('@STMP@', stmp) \ .replace('@PTMP@', ptmp) \ @@ -159,6 +160,7 @@ def edit_baseconfig(): dmpdir = '/lfs/h2/emc/global/noscrub/emc.global/dump' packageroot = '${PACKAGEROOT:-"/lfs/h1/ops/prod/packages"}' comroot = '${COMROOT:-"/lfs/h1/ops/prod/com"}' + cominsyn = '${COMROOT}/gfs/${gfs_ver:-"v16.3"}/syndat' homedir = '/lfs/h2/emc/global/noscrub/$USER' stmp = '/lfs/h2/emc/stmp/$USER' ptmp = '/lfs/h2/emc/ptmp/$USER' @@ -212,7 +214,8 @@ def edit_baseconfig(): base_svn = '/scratch1/NCEPDEV/global/glopara/svn' dmpdir = '/scratch1/NCEPDEV/global/glopara/dump' packageroot = '/scratch1/NCEPDEV/global/glopara/nwpara' - comroot = '/scratch1/NCEPDEV/rstprod/com' + comroot = '/scratch1/NCEPDEV/global/glopara/com' + cominsyn = '${COMROOT}/gfs/prod/syndat' homedir = '/scratch1/NCEPDEV/global/$USER' stmp = '/scratch1/NCEPDEV/stmp2/$USER' ptmp = '/scratch1/NCEPDEV/stmp4/$USER' @@ -230,6 +233,7 @@ def edit_baseconfig(): dmpdir = '/work/noaa/rstprod/dump' packageroot = '/work/noaa/global/glopara/nwpara' comroot = '/work/noaa/global/glopara/com' + cominsyn = '${COMROOT}/gfs/prod/syndat' homedir = '/work/noaa/global/$USER' stmp = '/work/noaa/stmp/$USER' ptmp = '/work/noaa/stmp/$USER' From 584580ff4f173d13a12d574d73f813f9b807c1b2 Mon Sep 17 00:00:00 2001 From: "Kate.Friedman" Date: Thu, 15 Dec 2022 20:16:46 +0000 Subject: [PATCH 5/7] Remove errant else that wasn't cleaned out --- jobs/rocoto/arch.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/jobs/rocoto/arch.sh b/jobs/rocoto/arch.sh index 62e18400fb..03fa4432a7 100755 --- a/jobs/rocoto/arch.sh +++ b/jobs/rocoto/arch.sh @@ -185,7 +185,6 @@ if [ $CDUMP = "gfs" ]; then targrp_list="gfs_flux gfs_${format}b gfs_pgrb2b" if [ $MODE = "cycled" ] ; then targrp_list="${targrp_list} gfs_${format}a" - else fi for targrp in $targrp_list; do htar -P -cvf $ATARDIR/$CDATE/${targrp}.tar `cat $ARCH_LIST/${targrp}.txt` From 6b84259d5aa5d7d69f265fdaebf69f5a9c84208f Mon Sep 17 00:00:00 2001 From: "Kate.Friedman" Date: Wed, 4 Jan 2023 15:56:16 +0000 Subject: [PATCH 6/7] Wrap pgb*anl archiving in cycled check - In hpssarch_gen.sh add an if-block to check if cycled MODE for the pgb*anl files. Refs #1177 --- ush/hpssarch_gen.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ush/hpssarch_gen.sh b/ush/hpssarch_gen.sh index 19b084374f..0184683a44 100755 --- a/ush/hpssarch_gen.sh +++ b/ush/hpssarch_gen.sh @@ -65,10 +65,12 @@ if [ $type = "gfs" ]; then head="gfs.t${cyc}z." #.................. - echo "${dirname}${head}pgrb2b.0p25.anl " >>gfs_pgrb2b.txt - echo "${dirname}${head}pgrb2b.0p25.anl.idx " >>gfs_pgrb2b.txt - echo "${dirname}${head}pgrb2b.0p50.anl " >>gfs_pgrb2b.txt - echo "${dirname}${head}pgrb2b.0p50.anl.idx " >>gfs_pgrb2b.txt + if [ $MODE = "cycled" ]; then + echo "${dirname}${head}pgrb2b.0p25.anl " >>gfs_pgrb2b.txt + echo "${dirname}${head}pgrb2b.0p25.anl.idx " >>gfs_pgrb2b.txt + echo "${dirname}${head}pgrb2b.0p50.anl " >>gfs_pgrb2b.txt + echo "${dirname}${head}pgrb2b.0p50.anl.idx " >>gfs_pgrb2b.txt + fi echo "./logs/${CDATE}/gfs*.log " >>gfsa.txt if [ $MODE = "cycled" ]; then From f372b5eb1e375a39edf9965c13dc59cc7b57d9dd Mon Sep 17 00:00:00 2001 From: "Kate.Friedman" Date: Wed, 4 Jan 2023 19:09:58 +0000 Subject: [PATCH 7/7] Address tab/space mixing - Replaced tabs with spaces. Refs #1177 --- jobs/rocoto/arch.sh | 50 ++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/jobs/rocoto/arch.sh b/jobs/rocoto/arch.sh index 03fa4432a7..a0fd6a6031 100755 --- a/jobs/rocoto/arch.sh +++ b/jobs/rocoto/arch.sh @@ -105,7 +105,7 @@ if [ $CDUMP = "gfs" ]; then mkdir -p ${ARCDIR}/tracker.$CDATE/$CDUMP blist="epac natl" for basin in $blist; do - cp -rp $basin ${ARCDIR}/tracker.$CDATE/$CDUMP + cp -rp $basin ${ARCDIR}/tracker.$CDATE/$CDUMP done fi @@ -118,12 +118,12 @@ if [ $CDUMP = "gfs" -a $FITSARC = "YES" ]; then fhmax=${FHMAX_FITS:-$FHMAX_GFS} fhr=0 while [[ $fhr -le $fhmax ]]; do - fhr3=$(printf %03i $fhr) - sfcfile=${prefix}.sfcf${fhr3}${ASUFFIX} - sigfile=${prefix}.atmf${fhr3}${ASUFFIX} - $NCP $sfcfile $VFYARC/${CDUMP}.$PDY/$cyc/ - $NCP $sigfile $VFYARC/${CDUMP}.$PDY/$cyc/ - (( fhr = $fhr + 6 )) + fhr3=$(printf %03i $fhr) + sfcfile=${prefix}.sfcf${fhr3}${ASUFFIX} + sigfile=${prefix}.atmf${fhr3}${ASUFFIX} + $NCP $sfcfile $VFYARC/${CDUMP}.$PDY/$cyc/ + $NCP $sigfile $VFYARC/${CDUMP}.$PDY/$cyc/ + (( fhr = $fhr + 6 )) done fi @@ -182,9 +182,9 @@ if [ $CDUMP = "gfs" ]; then #for targrp in gfs_flux gfs_netcdf/nemsio gfs_pgrb2b; do if [ ${SAVEFCSTNEMSIO:-"YES"} = "YES" ]; then - targrp_list="gfs_flux gfs_${format}b gfs_pgrb2b" - if [ $MODE = "cycled" ] ; then - targrp_list="${targrp_list} gfs_${format}a" + targrp_list="gfs_flux gfs_${format}b gfs_pgrb2b" + if [ $MODE = "cycled" ] ; then + targrp_list="${targrp_list} gfs_${format}a" fi for targrp in $targrp_list; do htar -P -cvf $ATARDIR/$CDATE/${targrp}.tar `cat $ARCH_LIST/${targrp}.txt` @@ -329,36 +329,36 @@ while [ $GDATE -le $GDATEEND ]; do COMINrtofs="$ROTDIR/rtofs.$gPDY" if [ -d $COMIN ]; then rocotolog="$EXPDIR/logs/${GDATE}.log" - if [ -f $rocotolog ]; then + if [ -f $rocotolog ]; then testend=$(tail -n 1 $rocotolog | grep "This cycle is complete: Success") rc=$? if [ $rc -eq 0 ]; then if [ -d $COMINwave ]; then rm -rf $COMINwave ; fi if [ -d $COMINrtofs -a $GDATE -lt $RTOFS_DATE ]; then rm -rf $COMINrtofs ; fi if [ $CDUMP != "gdas" -o $DO_GLDAS = "NO" -o $GDATE -lt $GLDAS_DATE ]; then - if [ $CDUMP = "gdas" ]; then + if [ $CDUMP = "gdas" ]; then for file in `ls $COMIN |grep -v prepbufr |grep -v cnvstat |grep -v atmanl.nc`; do rm -rf $COMIN/$file done - else - rm -rf $COMIN - fi + else + rm -rf $COMIN + fi else - if [ $DO_GLDAS = "YES" ]; then - for file in `ls $COMIN |grep -v sflux |grep -v RESTART |grep -v prepbufr |grep -v cnvstat |grep -v atmanl.nc`; do + if [ $DO_GLDAS = "YES" ]; then + for file in `ls $COMIN |grep -v sflux |grep -v RESTART |grep -v prepbufr |grep -v cnvstat |grep -v atmanl.nc`; do rm -rf $COMIN/$file - done - for file in `ls $COMIN/RESTART |grep -v sfcanl `; do + done + for file in `ls $COMIN/RESTART |grep -v sfcanl `; do rm -rf $COMIN/RESTART/$file - done - else + done + else for file in `ls $COMIN |grep -v prepbufr |grep -v cnvstat |grep -v atmanl.nc`; do rm -rf $COMIN/$file done - fi + fi fi fi - fi + fi fi # Remove any empty directories @@ -372,8 +372,8 @@ while [ $GDATE -le $GDATEEND ]; do # Remove mdl gfsmos directory if [ $CDUMP = "gfs" ]; then - COMIN="$ROTDIR/gfsmos.$gPDY" - if [ -d $COMIN -a $GDATE -lt $CDATE_MOS ]; then rm -rf $COMIN ; fi + COMIN="$ROTDIR/gfsmos.$gPDY" + if [ -d $COMIN -a $GDATE -lt $CDATE_MOS ]; then rm -rf $COMIN ; fi fi GDATE=$($NDATE +$assim_freq $GDATE)