#!/bin/sh set -xa export PS4='$SECONDS + ' date ############################################ # GFS GEMPAK META PRODUCT GENERATION ############################################ export LAUNCH_MODE=MPI ############################################### # Set MP variables ############################################### export OMP_NUM_THREADS=1 export MP_LABELIO=yes export MP_PULSE=0 export MP_DEBUG_NOTIMEOUT=yes ########################################################## # obtain unique process id (pid) and make temp directory ########################################################## export DATA=${DATA:-${DATAROOT}/${jobid:?}} mkdir -p $DATA cd $DATA ###################################### # Set up the cycle variable ###################################### export cycle=${cycle:-t${cyc}z} ########################################### # Run setpdy and initialize PDY variables ########################################### setpdy.sh . PDY ################################ # Set up the HOME directory ################################ export HOMEgfs=${HOMEgfs:-${NWROOT}/gfs.${gfs_ver}} export EXECgfs=${EXECgfs:-$HOMEgfs/exec} export PARMgfs=${PARMgfs:-$HOMEgfs/parm} export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} export FIXgfs=${FIXgfs:-$HOMEgfs/gempak/fix} export USHgfs=${USHgfs:-$HOMEgfs/gempak/ush} export SRCgfs=${SRCgfs:-$HOMEgfs/scripts} ###################################### # Set up the GEMPAK directory ####################################### export HOMEgempak=${HOMEgempak:-${NWROOTp1}/gempak} export FIXgempak=${FIXgempak:-$HOMEgempak/fix} export USHgempak=${USHgempak:-$HOMEgempak/ush} cp $FIXgfs/datatype.tbl datatype.tbl ############################################# #set the fcst hrs for all the cycles ############################################# export fhbeg=00 export fhend=384 export fhinc=12 ################################### # Specify NET and RUN Name and model #################################### export NET=${NET:-gfs} export RUN=${RUN:-gfs} export model=${model:-gfs} ############################################## # Set up model and cycle specific variables ############################################## export DBN_ALERT_TYPE=GFS_METAFILE ############################################## # Define COM directories ############################################## export COMIN=${COMIN:-$(compath.py ${NET}/${envir}/${RUN}.${PDY})/${cyc}/gempak} export COMOUT=${COMOUT:-${COMROOT}/${NET}/${envir}/${RUN}.${PDY}/${cyc}/gempak/meta} export COMINgempak=${COMINgempak:-${COMROOT}/${NET}/${envir}} export COMINukmet=${COMINukmet:-$(compath.py nawips/prod/ukmet)} export COMINecmwf=${COMINecmwf:-$(compath.py nawips/prod/ecmwf)} export COMINnam=${COMINnam:-$(compath.py nam/prod/nam)} msg="Begin job for $job" postmsg "$jlogfile" "$msg" if [ $SENDCOM = YES ] ; then mkdir -m 775 -p $COMOUT fi export pgmout=OUTPUT.$$ env ######################################################## # Execute the script. $SRCgfs/exgfs_gempak_meta.sh.ecf export err=$?; err_chk ######################################################## msg="JOB $job HAS COMPLETED NORMALLY!" postmsg $jlogfile "$msg" ############################################ # print exec I/O output ############################################ if [ -e "$pgmout" ] ; then cat $pgmout fi ################################### # Remove temp directories ################################### if [ "$KEEPDATA" != "YES" ] ; then rm -rf $DATA fi date