#!/bin/bash # #### 05/05/99 ######################################### # Daily Update Bias Estimation from NCEP Global Ensemble # ###################################################### #################################################### # 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 #################################################### export RUN_ENVIR=${RUN_ENVIR:-prod} set -xa #################################### # Specify NET and RUN Name and model #################################### export NET=${NET:-gens} export RUN=${RUN:-gefs} ######################################### # Run config file to get input parameters ######################################### if [ "$RUN_ENVIR" != prod ] ### For Developers then export PARA_CONFIG=${PARA_CONFIG:-/ensemble/save/${LOGNAME}/${direxp}/parm/gefs_bias_config} . $PARA_CONFIG fi export PS4='$SECONDS + ' date ######################################################## # 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 pgmout="OUTPUT" ############################################## # SENDECF - Flag Events on ECF # SENDCOM - Copy Files From TMPDIR to $COMOUT # SENDDBN - Issue DBNet Client Calls ############################################## export SENDCOM=${SENDCOM:-YES} export SENDECF=${SENDECF:-YES} export SENDDBN=${SENDDBN:-YES} ################################################################### # RUNJOB - Judge the Job for Regular Run or Extended 00 Cycle Run ################################################################### export RUNJOB=${RUNJOB:-REGULAR} ##################################################################### # BIASGFS - Calculate the Bias of High Resolution GFS Forecast # BIASAVG - Calculate the Bias of Ensemble Average # BIASC00 - Calculate the Bias of Ensemble Control Test # BIASMEM - Calculate the Bias of One Ensemble Member # BIASCDAS - Calculate the Difference Between GDAS and CDAS Analysis # BIASANL - Calculate the Difference Between NCEP and CMC Analysis ##################################################################### export BIASGFS=YES export BIASAVG=YES export BIASC00=NO export BIASMEM=NO export BIASCDAS=YES export BIASANL=YES ######################### # Specify Execution Areas ######################### export HOMEgefs=${HOMEgefs:-/nw${envir}/naefs.${model_ver}} export EXECgefs=${EXECgefs:-$HOMEgefs/exec} export FIXgefs=${FIXgefs:-$HOMEgefs/fix} export USHgefs=${USHgefs:-$HOMEgefs/ush} export ERRSCRIPT=err_chk export LOGSCRIPT=startmsg export REDOUT='1>>' export REDERR='2>' ###################### # Set up the UTILITIES ###################### export HOMEUTIL=/nwprod/util export utilscript=$HOMEUTIL/ush export EXECUTIL=$HOMEUTIL/exec ############################################################### # 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_BIAS=${COM_BIAS:-/com/${NET}/${envir}} #export COM_GEFS=${COM_GEFS:-/com/${NET}/${envir}} export COM_GEFS=${COM_GEFS:-/com/${NET}/prod} export DCOM_CMCE=${DCOM_CMCE:-/dcom/us007003} export COM_CMCE=${COM_CMCE:-/com/${NET}/${envir}} export COM_CFS=${COM_CFS:-/com/cfs/prod} export COM_OUT=${COM_OUT:-/com/${NET}/${envir}} export COMOUT=$COM_OUT/${RUN}.${PDY}/${cyc}/pgrb2a export COMOUT_M1=$COM_OUT/${RUN}.${PDYm1}/${cyc}/pgrb2a export COMOUT_M2=$COM_OUT/${RUN}.${PDYm2}/${cyc}/pgrb2a export COMOUT_GB1=$COM_OUT/${RUN}.${PDY}/${cyc}/pgrba export COMOUT_M1_GB1=$COM_OUT/${RUN}.${PDYm1}/${cyc}/pgrba export COMOUT_M2_GB1=$COM_OUT/${RUN}.${PDYm2}/${cyc}/pgrba mkdir -m 775 -p $COMOUT mkdir -m 775 -p $COMOUT_M2 mkdir -m 775 -p $COMOUT_M1 mkdir -m 775 -p $COMOUT_GB1 mkdir -m 775 -p $COMOUT_M2_GB1 mkdir -m 775 -p $COMOUT_M1_GB1 msg="HAS BEGUN on `hostname`" postmsg "$jlogfile" "$msg" env #################################### # Execute the script $HOMEgefs/scripts/exgefs_bias.sh.ecf #################################### cat $pgmout.* msg="JOB COMPLETED NORMALLY" postmsg "$jlogfile" "$msg" ######################################## # Remove the Temporary working directory ######################################## cd $DATA_IN rm -rf $DATA