#! /bin/ksh # JHWRF_RELOCATE: uses WRF output from the JHWRF_NMM_3DVAR_ANALYSIS # and JHWRF_NMM_3DVAR_DUMMY jobs to relocate the storm and change its # intensity to match the information found in the message file. The # GFS storm is relocated from the position found by the # JHWRF_GFS_TRACK0 job, unless that job failed. If that job failed, # then the relocate scripts assume that the GFS vortex was already at # the location in the message file, and it is removed from there. To # determine if that job failed, the JHWRF_RELOCATE will wait up to # five minutes for that job's output file. # Last modified: Samuel Trahan, April 5, 2012. # *** Operational Workflow *** # Submitted by: JHWRF_NMM_3DVAR_DUMMY # Submits: JHWRF_NMM_GSI_D1, JHWRF_NMM_GSI_D2, 18-126hr JHWRF_PREP_HYBRID # Primary scripts: # scripts/exhwrf_relocate.sh.sms -- passes control to hwrf_relocate.sh # ush/hwrf_relocate.sh -- performs the relocate process # Primary executables: # hwrf_swcorner_dynamic -- determines the domain 2 start location # hwrf_bin_io -- generates flat fortran binary files from wrfout, # wrfanl or ghost files from hwrf_wrf or wrfinput files from hwrf_nmm_real # hwrf_diffwrf_3dvar -- same as hwrf_bin_io, but for the NetCDF # version of the wrfout files, used in PARA mode on other platforms. # Various storm cut-and-paste and modification programs: # hwrf_merge_nest_4x_step12_3n # hwrf_pert_ct1 # hwrf_split1 # hwrf_create_nest_1x_10m # hwrf_anl_bogus_10m # hwrf_anl_cs_10m # hwrf_anl_4x_step2 # hwrf_inter_4to2 # hwrf_inter_4to6 # hwrf_create_trak_guess # hwrf_create_trak_fnl # *** EMC Suggested Job Card *** #@ job_type = parallel #@ wall_clock_limit = 00:39:00 #@ total_tasks = 1 #@ task_affinity = core(1) #@ node_resources = ConsumableMemory(15 GB) #@ network.MPI = csss,shared,us export PARAFLAG=${PARAFLAG:-NO} if [ ${PARAFLAG} = 'NO' ] ;then $SMSBIN/smsinit $LOADL_STEP_ID fi #---------------------------------------------- # JHWRF_RELOCATE.sms #---------------------------------------------- set -xa 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 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=20110731 ############################## # 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 COMATCF=${COMATCF:-/com/hur/${envir}/global} mkdir -m 775 -p $COMOUT if [ $cyc -eq 00 ]; then histcyc=18 HISTDATA=${HISTDATA:-/com/${NET}/${envir}/${RUN}.${PDYm1}${histcyc}} else if [ $cyc -eq 06 ]; then histcyc=00 elif [ $cyc -eq 12 ]; then histcyc=06 else histcyc=12 fi HISTDATA=${HISTDATA:-/com/${NET}/${envir}/${RUN}.${PDY}${histcyc}} fi msg="HAS BEGUN on `hostname`" postmsg "$jlogfile" "$msg" ############################################################# # Execute the script ${EXhwrf}/exhwrf_relocate.sh.sms #if [ ${PARAFLAG} = 'YES' ] #then # ${EXhwrf}/exhwrf_relocate.sh.sms #else # /nw${envir}/scripts/exhwrf_relocate.sh.sms #fi ############################################################# msg="ENDED NORMALLY." postmsg "$jlogfile" "$msg" date if [ ${PARAFLAG} == NO ]; then $SMSBIN/endt fi