forked from ufs-community/land-DA_workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ex-scripts and com-type nco environment (ufs-community#77)
* add exscript * remove unnecessary files * add prod-util * add task module files * fix module issues * update scripts * update config yaml files * update document * fix without-rocoto scritp * update doc * fix doc * update doc
- Loading branch information
Showing
37 changed files
with
1,428 additions
and
1,028 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
#!/bin/bash | ||
|
||
date | ||
export PS4='+ $SECONDS + ' | ||
set -xue | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
# Set the NCO standard environment variables (Table 1, pp.4) | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
export USHlandda="${HOMElandda}/ush" | ||
export EXEClandda="${HOMElandda}/exec" | ||
export PARMlandda="${HOMElandda}/parm" | ||
export SCRIPTSlandda="${HOMElandda}/scripts" | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
# Define job and jobid by default for rocoto | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
WORKFLOW_MANAGER="${WORKFLOW_MANAGER:-rocoto}" | ||
if [ "${WORKFLOW_MANAGER}" = "rocoto" ]; then | ||
if [ "${SCHED}" = "slurm" ]; then | ||
job=${SLURM_JOB_NAME} | ||
pid=${SLURM_JOB_ID} | ||
elif [ "${SCHED}" = "pbspro" ]; then | ||
job=${PBS_JOBNAME} | ||
pid=${PBS_JOBID} | ||
else | ||
job="task" | ||
pid=$$ | ||
fi | ||
jobid="${job}.${PDY}${cyc}.${pid}" | ||
fi | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
# Create a temp working directory (DATA) and cd into it. | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
export DATA="${DATA:-${DATAROOT}/${jobid}}" | ||
mkdir -p $DATA | ||
cd $DATA | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
# Define NCO environment variables and set COM type definitions. | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
export NET="${NET:-landda}" | ||
export RUN="${RUN:-landda}" | ||
|
||
[[ "$WORKFLOW_MANAGER" = "rocoto" ]] && export COMROOT=$COMROOT | ||
if [ "${MACHINE}" = "WCOSS2" ]; then | ||
export COMIN="${COMIN:-$(compath.py -o ${NET}/${model_ver}/${RUN}.${PDY}/${cyc}${SLASH_ENSMEM_SUBDIR})}" | ||
export COMOUT="${COMOUT:-$(compath.py -o ${NET}/${model_ver}/${RUN}.${PDY}/${cyc}${SLASH_ENSMEM_SUBDIR})}" | ||
else | ||
export COMIN="${COMIN:-${COMROOT}/${NET}/${model_ver}/${RUN}.${PDY}/${cyc}${SLASH_ENSMEM_SUBDIR}}" | ||
export COMOUT="${COMOUT:-${COMROOT}/${NET}/${model_ver}/${RUN}.${PDY}/${cyc}${SLASH_ENSMEM_SUBDIR}}" | ||
fi | ||
|
||
mkdir -p ${COMOUT} | ||
|
||
# Create a teomporary share directory | ||
export DATA_SHARE="${DATA_SHARE:-${DATAROOT}/DATA_SHARE/${PDY}${cyc}}" | ||
mkdir -p ${DATA_SHARE} | ||
|
||
# Run setpdy to initialize PDYm and PDYp variables | ||
export cycle="${cycle:-t${cyc}z}" | ||
setpdy.sh | ||
. ./PDY | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
# Call the ex-script for this J-job. | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
export pgmout="${DATA}/OUTPUT.$$" | ||
env | ||
|
||
${SCRIPTSlandda}/exlandda_analysis.sh | ||
export err=$?; err_chk | ||
|
||
if [ -e "$pgmout" ]; then | ||
cat $pgmout | ||
fi | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
# Whether or not working directory DATA should be kept. | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
if [ "${KEEPDATA}" = "NO" ]; then | ||
rm -rf ${DATA} | ||
fi | ||
date |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
#!/bin/bash | ||
|
||
date | ||
export PS4='+ $SECONDS + ' | ||
set -xue | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
# Set the NCO standard environment variables (Table 1, pp.4) | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
export USHlandda="${HOMElandda}/ush" | ||
export EXEClandda="${HOMElandda}/exec" | ||
export PARMlandda="${HOMElandda}/parm" | ||
export SCRIPTSlandda="${HOMElandda}/scripts" | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
# Define job and jobid by default for rocoto | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
WORKFLOW_MANAGER="${WORKFLOW_MANAGER:-rocoto}" | ||
if [ "${WORKFLOW_MANAGER}" = "rocoto" ]; then | ||
if [ "${SCHED}" = "slurm" ]; then | ||
job=${SLURM_JOB_NAME} | ||
pid=${SLURM_JOB_ID} | ||
elif [ "${SCHED}" = "pbspro" ]; then | ||
job=${PBS_JOBNAME} | ||
pid=${PBS_JOBID} | ||
else | ||
job="task" | ||
pid=$$ | ||
fi | ||
jobid="${job}.${PDY}${cyc}.${pid}" | ||
fi | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
# Create a temp working directory (DATA) and cd into it. | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
export DATA="${DATA:-${DATAROOT}/${jobid}}" | ||
mkdir -p $DATA | ||
cd $DATA | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
# Define NCO environment variables and set COM type definitions. | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
export NET="${NET:-landda}" | ||
export RUN="${RUN:-landda}" | ||
|
||
[[ "$WORKFLOW_MANAGER" = "rocoto" ]] && export COMROOT=$COMROOT | ||
if [ "${MACHINE}" = "WCOSS2" ]; then | ||
export COMIN="${COMIN:-$(compath.py -o ${NET}/${model_ver}/${RUN}.${PDY}/${cyc}${SLASH_ENSMEM_SUBDIR})}" | ||
export COMOUT="${COMOUT:-$(compath.py -o ${NET}/${model_ver}/${RUN}.${PDY}/${cyc}${SLASH_ENSMEM_SUBDIR})}" | ||
else | ||
export COMIN="${COMIN:-${COMROOT}/${NET}/${model_ver}/${RUN}.${PDY}/${cyc}${SLASH_ENSMEM_SUBDIR}}" | ||
export COMOUT="${COMOUT:-${COMROOT}/${NET}/${model_ver}/${RUN}.${PDY}/${cyc}${SLASH_ENSMEM_SUBDIR}}" | ||
fi | ||
|
||
mkdir -p ${COMOUT} | ||
|
||
# Create a teomporary share directory | ||
export DATA_SHARE="${DATA_SHARE:-${DATAROOT}/DATA_SHARE/${PDY}${cyc}}" | ||
mkdir -p ${DATA_SHARE} | ||
|
||
# Run setpdy to initialize PDYm and PDYp variables | ||
export cycle="${cycle:-t${cyc}z}" | ||
setpdy.sh | ||
. ./PDY | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
# Call the ex-script for this J-job. | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
export pgmout="${DATA}/OUTPUT.$$" | ||
env | ||
|
||
${SCRIPTSlandda}/exlandda_forecast.sh | ||
export err=$?; err_chk | ||
|
||
if [ -e "$pgmout" ]; then | ||
cat $pgmout | ||
fi | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
# Whether or not working directory DATA should be kept. | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
if [ "${KEEPDATA}" = "NO" ]; then | ||
rm -rf ${DATA} | ||
fi | ||
date |
Oops, something went wrong.