#!/bin/sh $SMSBIN/smsinit $LOADL_STEP_ID set -xa # # JSAMPLE_SCRIPT.sms.prod # Sample J-job script. Everything in this script is required for # production jobs on the CCS. # ####################################### # DOCBLOCK: "This script creates ..." ####################################### # ################################### # SET SHELL PROCESSING VARIABLES # ################################### export PS4='$SECONDS + ' date # # obtain unique process id (pid) and make temp directory # export pid=$$ export DATA=/tmpnwprd/${job}.${pid} mkdir $DATA cd $DATA #################################### # Define file To Log Msgs #################################### if [ $envir = "prod" ] then export jlogfile=/com/logs/jlogfile else export jlogfile=/com/logs/para/jlogfile fi ###################################### # Determine Job Output Name on System ###################################### export outid="LL$job" export jobid="${outid}.o${pid}" export pgmout="OUTPUT.${pid}" export MP_PULSE=0 export SENDSMS=YES export SENDCOM=YES if [ $envir = "prod" ] then export SENDDBN=YES else export SENDDBN=NO fi # Set 'yourmodel' to whatever your model is (e.g. wave, gfs, nam, etc.). # Note that $NET and $RUN do not have to be the same and often aren't. # These variables define file paths. Executables are in $EXECyourmodel, # fix files in $FIXyourmodel, parameter files in $PARMyourmodel, # utility scripts in $USHyourmodel. export NET=yourmodel export RUN=yourmodel export HOMEyourmodel=/nw${envir} export EXECyourmodel=$HOMEwave/exec export FIXyourmodel=$HOMEwave/fix export PARMyourmodel=$HOMEwave/parm export USHyourmodel=$HOMEwave/ush ################################################## # Set up variable names to point to the UTILITIES ################################################## export utilscript=/nwprod/util/ush export utilexec=/nwprod/util/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 paths to your input and output data. export COMIN=/com/${NET}/${envir}/${RUN}.${PDY} export COMOUT=/com/${NET}/${envir}/${RUN}.${PDY} mkdir -p $COMOUT ######################################################## # Execute the script. Change name to match your J-job # script's name (e.g. JWAVE_MULTI_1_PREP.sms.prod calls # exwave_multi_1_prep.sh.sms). /nw${envir}/scripts/exsample_script.sh.sms ######################################################## cd /tmpnwprd rm -rf $DATA date $SMSBIN/smscomplete