Skip to content

Commit

Permalink
Updates for GSL
Browse files Browse the repository at this point in the history
 - changed if-statement for netcdf files in GSL archive script to look for a single file (atmf000 netcdf file) instead of multiple files since it now produces errors when running as bash script
 - added GSL archive script for archiving netcdf files only
 - changed getic script to look for atm file instead of sfc file in if-statements since atm file is much larger than sfc file
 - comment out if-statement to check if 0p25 grib2 file already exists in post.sh so post job will run if resubmitted when walltime is exceeded
 - change config.base.emc.dyn link to point to JET version
 # Please enter the commit message for your changes. Lines starting
  • Loading branch information
jkhender committed Jul 23, 2022
1 parent 29bc7b7 commit 434a1f0
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 10 deletions.
2 changes: 1 addition & 1 deletion jobs/rocoto/arch_gsl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if [ $HPSSARCH = "YES" ]; then
fi

## netcdf files ##
if [ -f *nc ]; then
if [ -f g*atmf000.nc ]; then
# archive netcdf files (gfs.t00z.atmfHHH.nc, gfs.t00z.sfcfHHH.nc, gfs.t00z.logfHHH.txt )
htar -P -cvf $ATARDIR/$YYYY/$CDATE/gfs_nc.tar gfs*.nc gfs.*log*.txt
status=$?
Expand Down
83 changes: 83 additions & 0 deletions jobs/rocoto/arch_gsl_nc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
#!/bin/ksh -x

###############################################################
## Abstract:
## Archive driver script
## RUN_ENVIR : runtime environment (emc | nco)
## HOMEgfs : /full/path/to/workflow
## EXPDIR : /full/path/to/config/files
## CDATE : current analysis date (YYYYMMDDHH)
## CDUMP : cycle name (gdas / gfs)
## PDY : current date (YYYYMMDD)
## cyc : current cycle (HH)
## ATCFNAME : atcf track identifier
## COMPONENT : component (atmos/wave)
###############################################################

###############################################################
# Source FV3GFS workflow modules
. $HOMEgfs/ush/load_fv3gfs_modules.sh
status=$?
[[ $status -ne 0 ]] && exit $status

###############################################################
# Source relevant configs
configs="base arch"
for config in $configs; do
. $EXPDIR/config.${config}
status=$?
[[ $status -ne 0 ]] && exit $status
done

COMIN="$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT"
cd $COMIN

YYYY=`echo $PDY|cut -c1-4`
###############################################################
# Archive data to HPSS
if [ $HPSSARCH = "YES" ]; then
###############################################################

if [ $CDUMP = "gfs" ]; then

## nemsio files ##
if [ -f *nemsio ]; then
# archive nemsio files (gfs.t00z.atmfHHH.nemsio, gfs.t00z.sfcfHHH.nemsio, gfs.t00z.logfHHH.nemsio )
htar -P -cvf $ATARDIR/$YYYY/$CDATE/gfs_nemsio.tar gfs.*nemsio
status=$?
if [ $status -ne 0 ]; then
echo "HTAR $CDATE gfs_nemsio.tar failed"
exit $status
fi
fi

## netcdf files ##
#JKH if [ -f *f???.nc ]; then
if [ -f g*atmf000.nc ]; then
# archive netcdf files (gfs.t00z.atmfHHH.nc, gfs.t00z.sfcfHHH.nc, gfs.t00z.logfHHH.txt )
htar -P -cvf $ATARDIR/$YYYY/$CDATE/gfs_nc.tar gfs*.nc gfs.*log*.txt
status=$?
if [ $status -ne 0 ]; then
echo "HTAR $CDATE gfs_nc.tar failed"
exit $status
fi
fi

# archive GRIB2 files (gfs.t00z.pgrb2.0p25.fHHH, gfs.t00z.pgrb2.0p50.fHHH)
# and tracker files (tctrk.atcf.YYYYMMDDHH.gcp1.txt)
#JKH if [ -f tctrk.atcf.${CDATE}.${ATCFNAME}.txt ]; then
#JKH htar -P -cvf $ATARDIR/$YYYY/$CDATE/gfs_pgrb2.tar gfs.*pgrb2.0p25* gfs.*pgrb2.0p5* tctrk.atcf.${CDATE}.${ATCFNAME}.txt
#JKH else
#JKH htar -P -cvf $ATARDIR/$YYYY/$CDATE/gfs_pgrb2.tar gfs.*pgrb2.0p25* gfs.*pgrb2.0p5*
#JKH fi
#JKH status=$?
#JKH if [ $status -ne 0 ]; then
#JKH echo "HTAR $CDATE gfs_pgrb2.tar failed"
#JKH exit $status
#JKH fi

fi

###############################################################
fi ##end of HPSS archive
###############################################################
12 changes: 6 additions & 6 deletions jobs/rocoto/getic_gsl_fv3gfsv16.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ atm_file=`echo $pubatm_file | cut -d. -f2-`
echo "pubsfc_file: $pubsfc_file"
echo "pubatm_file: $pubatm_file"

if [[ -f $PUBDIR/${pubsfc_file} ]]; then
echo "linking $PUBDIR...."
ln -fs $PUBDIR/${pubsfc_file} $sfc_file
ln -fs $PUBDIR/${pubatm_file} $atm_file
elif [[ -f $RETRODIR/${pubsfc_file} ]]; then
if [[ -f $RETRODIR/${pubatm_file} ]]; then
echo "linking $RETRODIR...."
echo "pubsfc_file: $pubsfc_file"
echo "pubatm_file: $pubatm_file"
ln -fs $RETRODIR/${pubsfc_file} $sfc_file
ln -fs $RETRODIR/${pubatm_file} $atm_file
elif [[ -f $RETRODIR/${CDUMP}.${yyyymmdd}/${hh}/${COMPONENT}/${sfc_file} ]]; then
elif [[ -f $PUBDIR/${pubatm_file} ]]; then
echo "linking $PUBDIR...."
ln -fs $PUBDIR/${pubsfc_file} $sfc_file
ln -fs $PUBDIR/${pubatm_file} $atm_file
elif [[ -f $RETRODIR/${CDUMP}.${yyyymmdd}/${hh}/${COMPONENT}/${atm_file} ]]; then
echo "linking $RETRODIR/${CDUMP}.${yyyymmdd}/${hh}/${COMPONENT}..."
echo "sfc_file: $sfc_file"
echo "atm_file: $atm_file"
Expand Down
4 changes: 2 additions & 2 deletions jobs/rocoto/post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ for fhr in $fhrlst; do

#master=$ROTDIR/${CDUMP}.${PDY}/${cyc}/$COMPONENT/${CDUMP}.t${cyc}z.master.grb2f${fhr}
pgb0p25=$ROTDIR/${CDUMP}.${PDY}/${cyc}/$COMPONENT/${CDUMP}.t${cyc}z.pgrb2.0p25.f${fhr}
if [ ! -s $pgb0p25 ]; then
#JKH if [ ! -s $pgb0p25 ]; then
export post_times=$fhr
$HOMEgfs/jobs/JGLOBAL_ATMOS_NCEPPOST
status=$?
[[ $status -ne 0 ]] && exit $status
fi
#JKH fi

done

Expand Down
2 changes: 1 addition & 1 deletion parm/config/config.base.emc.dyn

0 comments on commit 434a1f0

Please sign in to comment.