#!/bin/ksh ####################################################################### # Create Gempak products for the FNMOC ensemble output ####################################################################### ###################################################### # 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 # #### 08/25/1999 ################### # SET SHELL PROCESSING VARIABLES # ################################### export PS4='${PMI_FORK_RANK}: $SECONDS + ' date ##################################################################################### # DATA_IN: Location of working directory, default to /lfs/f1/ops/${envir}/tmp # SENDECF: If the job is to be running using ecFLOW, 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} ##################################################################################### #################################### # obtain unique process id (pid) and make temp directory #################################### export pid=$$ export DATA=${DATA:-$DATAROOT/${job}.${pid}} mkdir -p $DATA cd $DATA #################################### # Determine Job Output Name on System #################################### export outid="LL$job" export jobid="${outid}.o${pid}" export pgmout="OUTPUT.${pid}" export cycle=t${cyc}z #################################### # File To Log Msgs #################################### export jlogfile=${jlogfile:-${DATA}/jlogfile.${job}.${pid}} ################################################################ # SENDCOM=YES--Copy output file to /com # SENDECF=YES--Allow to talk back to ecFLOW # SENDDBN=YES--Alert output file to TOC, set to NO for testing ################################################################ export SENDCOM=${SENDCOM:-YES} export SENDDBN=${SENDDBN:-YES} # need to set to NO for testing export SENDECF=${SENDECF:-YES} ############################################ # Set up model and cycle specific variables ############################################ export NET=naefs export RUN=fens export fend=384 export finc=6 export fstart=00 export model=ensemble export GRIB= export EXT="" export DBN_ALERT_TYPE=NAEFS_FNMOCENS_GEMPAK # # Now set up GEMPAK/NTRANS environment # #. /nwprod/gempak/.gempak ######################### # Specify Execution Areas ######################### export HOMEnaefs=${HOMEnaefs:-$PACKAGEROOT/naefs.${naefs_ver}} export EXECnaefs=${EXECnaefs:-$HOMEnaefs/exec} export FIXnaefs=${FIXnaefs:-$HOMEnaefs/fix} export USHnaefs=${USHnaefs:-$HOMEnaefs/ush} # Run setpdy and initialize PDY variables setpdy.sh . ./PDY export COMIN=${COMIN:-${DCOMROOT}/${PDY}/wgrbbul} export COMIN_raw=$COMIN/fnmoc_0p5_ens_gb2 export COMIN_bc=$COMIN/fnmoc_0p5_ens_bc_gb2 export COMOUT=${COMOUT:-$(compath.py -o $NET/${naefs_ver})/${RUN}.${PDY}/gempak} if [ ! -f $COMOUT ] ; then mkdir -p -m 775 $COMOUT fi env ######################################################## # Execute the script. for ftype in et do for member in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 do mkdir -p $DATA/${member}_$ftype if [ $ftype = "et" ]; then echo "${HOMEnaefs}/scripts/exnawips_fnmoc.sh $DATA/${member}_$ftype 000 384 $COMIN_raw $COMOUT fnmoc_gep${member} $ftype ${DBN_ALERT_TYPE} $member &> $DATA/${member}_$ftype/output" >> $DATA/poescript else echo "${HOMEnaefs}/scripts/exnawips_fnmoc.sh $DATA/${member}_$ftype 000 384 $COMIN_bc $COMOUT fnmoc_gep${member} $ftype ${DBN_ALERT_TYPE} $member &> $DATA/${member}/output" >> $DATA/poescript fi done done ######################################################## chmod 775 $DATA/poescript # Execute the script. $APRUN $DATA/poescript export err=$?; err_chk cat $DATA/01_et/output cat $DATA/11_et/output ############################## # Remove the Temporary working directory ############################## cd $DATAROOT if [ $KEEPDATA = NO ]; then rm -rf $DATA; fi date