#!/bin/bash ###### 08/15/2007 ######################################### # Downscale Ensemble Average, Spread and Prability Forecast ########################################################### #################################################### # The following two variable could be defined in the # loadleveler submission script (the sms script), if # not they will take the default values which is set # for the NCO running enviroment #################################################### set -xa ulimit -s unlimited ulimit -c 0 #################################### # Specify NET and RUN Name and model #################################### export NET=naefs export RUN=naefs export PS4='$SECONDS + ' date ######################################################## # obtain unique process id (pid) and make temp directory ######################################################## export pid=$$ export DATAROOT=${DATAROOT:-/lfs/f1/ops/${envir}/tmp} export DATA=${DATA:-${DATAROOT:?}/${jobid}} mkdir -p $DATA cd $DATA export cycle=t${cyc}z ################## # File To Log Msgs ################## export jlogfile=${jlogfile:-${DATA}/jlogfile.${job}.${pid}} ##################################### # Determine Job Output Name on System ##################################### export outid="LL$job" export jobid="${outid}.o${pid}" export pgmout="OUTPUT.${pid}" export pgmerr=errfile ############################################## # SENDCOM - Copy Files From TMPDIR to $COMOUT # SENDECF - Flag Events on ECF ############################################## export SENDCOM=${SENDCOM:-YES} export SENDECF=${SENDECF:-YES} export SENDDBN=${SENDDBN:-YES} ############################################################### # IFNAEFS - Generate Products from NCEP/CMC Combined Ensemble # IFGEFS - Generate Products from NCEP Ensemble # IFCMCE - Generate Products from CMC Ensemble ############################################################### export IFNAEFS=YES export IFGEFS=NO export IFCMCE=NO ######################### # Specify Execution Areas ######################### export HOMErtma=${HOMErtma:-${PACKAGEROOT}/naefs.${naefs_ver}} export EXECrtma=${EXECrtma:-$HOMErtma/exec} export FIXrtma=${FIXrtma:-$HOMErtma/fix} export USHrtma=${USHrtma:-$HOMErtma/ush} ######################################### # Run setpdy and initialize PDY variables ######################################### setpdy.sh . ./PDY ######################## # Define COM directories ######################## export COM_DV=${COM_DV:-$(compath.py $envir/$NET/${naefs_ver})} export COM_NCEP=${COM_NCEP:-$(compath.py $envir/$NET/${naefs_ver})} export COMIN=$COM_NCEP/${RUN}.${PDY}/${cyc}/pgrb2ap5_bc export DCOM=${DCOM:-${DCOMROOT}} export COMINCMC=${COMINCMC:-$DCOM/$PDY/wgrbbul/cmcensbc_gb2} export COM_CMCANL=${COM_CMCANL:-$(compath.py $envir/$NET/${naefs_ver})} export COM_OUT=${COM_OUT:-$(compath.py -o $NET/${naefs_ver})} export COMOUT_GB2=$COM_OUT/${RUN}.${PDY}/${cyc}/ndgd_gb2 mkdir -m 775 -p ${COMOUT_GB2} msg="HAS BEGUN on `hostname`" postmsg "$jlogfile" "$msg" env #################### # Execute the script #################### $HOMErtma/scripts/exnaefs_dvrtma_prob_avgspr_conus.sh ############################################################# if [ $cyc -eq 00 -o $cyc -eq 12 ]; then cat $DATA/tmpdir_01/output_adjustcmc.360 cat $DATA/tmpdir_03/output_adjustcmc.360.p02 fi cat $DATA/tmpdir_01/output_ds_tmaxmin.day1_tmax cat $DATA/tmpdir_01/output_ds_tmaxmin.day1_tmin cat $DATA/tmpdir_02/tmpdir_02_naefs_geavg/output_ds.003.naefs_geavg.part1 cat $DATA/tmpdir_02/tmpdir_02_naefs_geavg/output_ds.360.naefs_geavg.part1 cat $DATA/tmpdir_03/output_ds_wind10m.360 msg="JOB COMPLETED NORMALLY" postmsg "$jlogfile" "$msg" date ######################################## # Remove the Temporary working directory ######################################## if [ $KEEPDATA != YES ]; then cd $DATAROOT rm -rf $DATA fi date