Skip to content

Commit

Permalink
modified: JGLOBAL_FORECAST
Browse files Browse the repository at this point in the history
A test showed that jobid is not defined in JGLOBAL_FORECAST running in the Rocoto environment.
jobid is defined in ./env files. Defining DATA without sourcing ./env/$nachine.env caused the
script to fail.  Move the definitin of DATA after sourcing env parameters
  • Loading branch information
yangfanglin committed Nov 27, 2020
1 parent e600377 commit 7283c7e
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions jobs/JGLOBAL_FORECAST
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,6 @@ export RUN_ENVIR=${RUN_ENVIR:-"nco"}
export PS4='$SECONDS + '
date

##############################################
# Obtain unique process id (pid) and make temp directory
##############################################
export pid=${pid:-$$}
export outid=${outid:-"LL$job"}
export DATA=${DATA:-${DATAROOT}/${jobid:?}}
mkdir -p $DATA
cd $DATA


##############################################
# Run setpdy and initialize PDY variables
Expand Down Expand Up @@ -72,6 +63,16 @@ status=$?
[[ $status -ne 0 ]] && exit $status


##############################################
# Obtain unique process id (pid) and make temp directory
##############################################
export pid=${pid:-$$}
export outid=${outid:-"LL$job"}
export DATA=${DATA:-${DATAROOT}/${jobid:?}}
mkdir -p $DATA
cd $DATA


# Set wave variables
if [ ${DO_WAVE:-"NO"} = "YES" ]; then
# WAVE component directory
Expand Down

0 comments on commit 7283c7e

Please sign in to comment.