#! /bin/ksh #JHWRF_PRE_ATMOS.sh -- creates a directory with symbolic links to # GFS input conditions and loop current files. Also, the # GFS hour 0 GRIB1 file is subsetted. # Last modified: Samuel Trahan, April 5, 2012. # *** Operational Workflow *** # Submitted by: JHWRF_PRE_MASTER # Submits: # JHWRF_PREP_HYBRID for hours 0-12 (FIRST_PREP=0, LAST_PREP=2) # JHWRF_OCEAN_INIT, but only if MODEL=COUPLED if $stormlabel.holdvars.txt # JHWRF_WPS # Primary scripts and parameter files: # scripts/exhwrf_pre_atmos.sms -- passes control to hwrf_pre_atmos.sh # ush/hwrf_pre_atmos.sh -- calls hwrf_link_input.sh to make symbolic # links to the GFS or GDAS data, as needed. Also gets ALL of the # tcvitals entries for the current storm from the tcvitals file. # ush/hwrf_get_oper_loop.sh -- copies look current data to local areas # ush/hwrf_subset_gribs.sh -- subsets the GFS hour 0 grib file # Primary executables: # wgrib # *** EMC Suggested Job Card *** #@ job_type = serial #@ wall_clock_limit = 00:19:59 #@ resources = ConsumableCpus(1) ConsumableMemory(900MB) export PARAFLAG=${PARAFLAG:-NO} if [ ${PARAFLAG} == NO ]; then $SMSBIN/smsinit $LOADL_STEP_ID fi #----------------------------------- # JHWRF_PRE_ATMOS.sms #----------------------------------- set -xa export MP_IOAGENT_CNT=all export MP_IO_BUFFER_SIZE=8M export PS4='$SECONDS + ' date export PARAFLAG=${PARAFLAG:-NO} if [ ${PARAFLAG} = 'YES' ]; then export yymmdd=` echo $PDY | cut -c3-8` export yymmddhh=${yymmdd}${cyc} export jlogfile=${DATA}/jlogfile export SENDSMS=YES export SENDCOM=YES export SENDDBN=NO if [ ! -d $outdir ]; then mkdir -p $outdir; fi if [ ! -d $COMOUT ]; then mkdir -p $COMOUT; fi else export NWPROD=${NWPROD:-/nwprod} fi ############################################################### # This block can be modified for different Production test # environment. This is used for operational testings ############################################################### if [ ${PARAFLAG} == NO -a $envir != prod ]; then export SENDDBN=${SENDDBN:-NO} export jlogfile=${jlogfile:-/com/logs/${envir}/jlogfile} export DBN_ALERT_TYPE=TBD_PARA export DBNROOT=/nwprod/spa_util/fakedbn export COMTPC=${COMTPC:-/tpc/save/guidance/storm-data/ncep} export COMINGFS=${COMINGFS:-/com/gfs/prod} export COMINGDAS=${COMINGDAS:-/com/gfs/prod} fi # ############################################# # SETUP HWRF FCST PROCESSING VARIABLES # ############################################# #################################### # obtain unique process id (pid) and make temp directory #################################### export pid=$$ export DATA=${DATA:-/tmpnwprd/hwrf${storm_num}_${cyc}_${envir}} cd $DATA export cycle=t${cyc}z #################################### # Specify NET and RUN Name and model #################################### export NET=hur export RUN=hwrf #################################### # File To Log Msgs #################################### export jlogfile=${jlogfile:-/com/logs/jlogfile} #################################### # Determine Job Output Name on System #################################### export outid="LL$job" export jobid="${outid}.o${pid}" export pgmout="OUTPUT.${pid}" export pgmerr=errfile #################################### # SENDSMS - Flag Events on SMS # SENDCOM - Copy Files From TMPDIR to $COMOUT # SENDDBN - Issue DBNet Client Calls # RERUN - Rerun fcst from beginning (default no) #################################### export SENDSMS=${SENDSMS:-YES} export SENDCOM=${SENDCOM:-YES} export SENDDBN=${SENDDBN:-YES} #################################### # Specify HWRF version number #################################### export HWRF_VERSION=${HWRF_VERSION:-${model_ver}} #################################### # Specify Execution Areas #################################### export HOMEhwrf=${HOMEhwrf:-/nw${envir}/hwrf.$HWRF_VERSION} export EXEChwrf=${EXEChwrf:-$HOMEhwrf/exec} export FIXhwrf=${FIXhwrf:-$HOMEhwrf/fix} export PARMhwrf=${PARMhwrf:-$HOMEhwrf/parm} export STOREhwrf=${STOREhwrf:-/com/hwrf/${envir}/store} export EXhwrf=${EXhwrf:-$HOMEhwrf/scripts} export USHhwrf=${USHhwrf:-$HOMEhwrf/ush} ############################## # Set up the UTILITIES ############################## export utilscript=$NWPROD/util/ush export utilities=$NWPROD/util/ush ############################## # Run setup to initialize working directory and utility scripts ############################## sh $utilscript/setup.sh #export PDY=20120101 ############################## # Run setpdy and initialize PDY variables ############################## sh $utilscript/setpdy.sh . PDY ############################################## # Define COM directories ############################################## export COMIN=${COMIN:-/com/${NET}/${envir}/${RUN}.${PDY}${cyc}} export COMOUT=${COMOUT:-/com/${NET}/${envir}/${RUN}.${PDY}${cyc}} export COMINGFS=${COMINGFS:-/com/gfs/${envir}} export COMINGDAS=${COMINGDAS:-/com/gfs/${envir}} mkdir -m 775 -p $COMOUT export COMTPC=${COMTPC:-/tpc/save/guidance/storm-data/ncep} msg="HAS BEGUN on `hostname`" postmsg "$jlogfile" "$msg" ############################################################# # Execute the script ${EXhwrf}/exhwrf_pre_atmos.sh.sms #if [ ${PARAFLAG} = 'YES' ] #then # ${EXhwrf}/exhwrf_pre_atmos.sh.sms #else # /nw${envir}/scripts/exhwrf_pre_atmos.sh.sms #fi cd $DATA msg="ENDED NORMALLY." postmsg "$jlogfile" "$msg" ############################## date if [ ${PARAFLAG} == NO ]; then $SMSBIN/endt fi