#!/bin/sh # #### 05/05/99 ######################################################### # Generates the 24-hourly PQPF or 6-hourly, 12-hourly PQIF PQRF PQFF PQSF # ####################################################################### set -xa export MP_IOAGENT_CNT=all export MP_IO_BUFFER_SIZE=8M # # Specify whether the run is production or development # export RUN_ENVIR=${RUN_ENVIR:-prod} #################################### # Specify NET and RUN Name and model #################################### export NET=${NET:-gens} export RUN=${RUN:-gefs} ##################################################################################### # Run config file to get input parameters # This config file should define the following variables # DATA_IN: Location of working directory, default to /tmpnwprd # DEV_SMS: If the job is to be running using SMS, default to YES # SENDDBN: Set to NO for developers, default to YES # COM_IN: Directory for input files, default to /com/$NET/${envir} # COM_OUT: Directory for output file, default to /com/$NET/${envir} # gespath: Directory for the guess or restart files, default to /nwges/${envir} ##################################################################################### if [ "$RUN_ENVIR" != prod ] ### For Developers then . /ensemble/save/${LOGNAME}/naefs_nwdev/parm/gefs_pgrb_enspqpf_config # GEFS_CONFIG_FILE=${GEFS_CONFIG_FILE:-/global/save/${LOGNAME}/gefs/nwprod/parm/gefs_config} # . $GEFS_CONFIG_FILE # export userid=$LOGNAME # export DATA_IN=${DATA_IN:-/ptmp/$userid} fi echo `date` $0 `date -u` begin export PS4='$SECONDS + ' #################################### # obtain unique process id (pid) and make temp directory #################################### export pid=$$ export DATA_IN=${DATA_IN:-/tmpnwprd2} export DATA=$DATA_IN/${job}.${pid} mkdir -p $DATA cd $DATA export cycle=t${cyc}z #################################### # File To Log Msgs #################################### if [ "$envir" = 'prod' ] || [ "$envir" = 'para' ] || [ "$envir" = 'test' ] then # NCO if [ $envir = "prod" ] then export jlogfile=/com/logs/jlogfiles/jlogfile.${job}.${pid} else export jlogfile=/com/logs/${envir}/jlogfile #export DBNROOT=/nwprod/spa_util/para_dbn export DBNROOT=/nwprod/spa_util/fakedbn fi else # DEV export jlogfile=/dev/null fi #################################### # 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 # SENDDBN - Issue DBNet Client Calls #################################### export SENDCOM=${SENDCOM:-YES} export SENDDBN=${SENDDBN:-YES} ######################### # Specify Execution Areas ######################### export HOMEPQPF=${HOMEnaefs:-/nw${envir}/naefs.${model_ver}} export EXECPQPF=$HOMEPQPF/exec export ERRSCRIPT=err_chk export LOGSCRIPT=startmsg export REDOUT='1>>' export REDERR='2>' ################################### # HRINTER - Forecast Hour Interval ################################### export HRINTER=24 ############################## # Set up the UTILITIES ############################## export HOMEUTIL=/nwprod/util export utilscript=$HOMEUTIL/ush export EXECUTIL=$HOMEUTIL/exec export GRBINDEX=/nwprod/util/exec/grbindex ############################## # Run setup to initialize working directory and utility scripts ############################## sh $utilscript/setup.sh ############################## # Run setpdy and initialize PDY variables ############################## sh $utilscript/setpdy.sh . PDY ############################################## # Define COM directories ############################################## #export COM_IN=${COM_IN:-/com/${NET}/${envir}} export COM_IN=${COM_IN:-/com/${NET}/prod} export COM_OUT=${COM_OUT:-/com/${NET}/${envir}} export COMIN=$COM_IN/${RUN}.${PDY}/${cyc}/pgrba export COMOUT=$COM_OUT/${RUN}.${PDY}/${cyc}/prcp export COMOUT_GB2=$COM_OUT/${RUN}.${PDY}/${cyc}/prcp_gb2 mkdir -m 775 -p $COMOUT mkdir -m 775 -p $COMOUT_GB2 msg="HAS BEGUN on `hostname`" postmsg "$jlogfile" "$msg" env ############################################################# # Execute the script $HOMEPQPF/scripts/exgefs_pgrb_enspqpf.sh.ecf ############################################################# cat $pgmout.* msg="JOB COMPLETED NORMALLY" postmsg "$jlogfile" "$msg" ############################## # Remove the Temporary working directory ############################## cd $DATA_IN if [ ${RM_TMDIR:-YES} = YES ]; then rm -rf $DATA; fi date