%comment - ecf user variables CYC = 18 DUMMYVAR:4_ecflow_edit_only = 4_ecflow_edit_only E = p ECF_VERSION = 3.1.2 ENVIR = para PROJ = RAP-T2O %end - ecf user variables #BSUB -J prap_gempak_18 #BSUB -o /com/output/para/today/rap_gempak_18.o%J #BSUB -e /com/output/para/today/rap_gempak_18.o%J #BSUB -L /bin/sh #BSUB -q prod_shared ##prod_serv #BSUB -W 01:00 #BSUB -cwd /tmpnwprd #BSUB -n 4 #BSUB -R span[ptile=4] #BSUB -a poe #BSUB -P RAP-T2O #BSUB -R rusage[mem=2500] #BSUB -R affinity[core] #!/bin/ksh set -e # stop the shell on first error #set -u # fail when using an undefined variable set -x # echo script lines as they are executed # Defines the variables that are needed for any communication with ECF export ECF_PORT=31415 # The server port number export ECF_NODE=g10z1 # The name of ecf host that issued this task export ECF_NAME=/para18/rap/rap_18/gempak/jrap_gempak # The name of this current task export ECF_PASS=LJD8sS/a # A unique password export ECF_TRYNO=1 # Current try number of the task export ECF_RID=$$ export ECF_VERSION=3.1.2 export DUMMYVAR=4_ecflow_edit_only # Tell ecFlow we have started ecflow_client --init=${ECF_RID} # Define a error handler ERROR() { set +e # Clear -e flag, so we don't fail ecflow_client --abort="killed by signal" trap 0 # Remove the trap exit 0 # End the script } # Trap any calls to exit and errors caught by the -e flag trap ERROR 0 # Trap any signal that may cause the script to fail trap '{ echo "Killed by a signal"; ERROR ; }' 1 2 3 4 5 6 7 8 10 12 13 15 set -x export envir=para export job=rap_gempak_18 export cyc=18 # CALL executable job script here # versions file for Rapid Refresh model $model_ver VERSION_FILE=/nw${envir}/versions/rap.ver if [ -f $VERSION_FILE ]; then . $VERSION_FILE else ecflow_client --abort exit fi /nw$envir/rap.${model_ver}/jobs/JRAP_GEMPAK if [ $? -ne 0 ]; then ecflow_client --abort exit fi ecflow_client --complete # Notify ecFlow of a normal end trap 0 # Remove all traps exit 0 # End the shell %manual ###################################################################### # Purpose: To execute the job that runs RAP postprocessing programs # eta_post0 and eta_sndp. ###################################################################### ###################################################################### # Job specific troubleshooting instructions: # see generic troubleshoot manual page # ###################################################################### # include manual page below %end