Skip to content

Commit

Permalink
Merge pull request #66 from NCAR/update_run_case
Browse files Browse the repository at this point in the history
Update data directory path and version to v3.5
  • Loading branch information
fossell authored Sep 29, 2021
2 parents 4d43740 + 642414e commit 9c680be
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions components/scripts/common/docker_run_case.ksh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
# This script should be run OUTSIDE of the containers.
#

# Software container version number to be run
VERSION=3.5

# Determine if on AWS based on the user name
if [ $USER == "ec2-user" ]; then
IS_AWS="true"
Expand All @@ -17,7 +20,7 @@ fi
# Make sure that ${PROJ_DIR} has been set
if [[ ! -e $PROJ_DIR ]]; then
echo
echo "ERROR: The ${PROJ_DIR} environment variable must be set."
echo "ERROR: The \${PROJ_DIR} environment variable must be set."
echo
exit 1
fi
Expand Down Expand Up @@ -68,34 +71,34 @@ RUN_CMD mkdir -p wpsprd wrfprd gsiprd postprd pythonprd metprd metviewer/mysql
# Run WPS
RUN_CMD \
docker run --rm -it -e LOCAL_USER_ID=`id -u $USER` \
-v ${PROJ_DIR}/container-dtc-nwp/data/WPS_GEOG:/data/WPS_GEOG \
-v ${PROJ_DIR}/container-dtc-nwp/data:/data \
-v ${PROJ_DIR}/data/WPS_GEOG:/data/WPS_GEOG \
-v ${PROJ_DIR}/data:/data \
-v ${PROJ_DIR}/container-dtc-nwp/components/scripts/common:/home/scripts/common \
-v ${PROJ_DIR}/container-dtc-nwp/components/scripts/${CASE_SCRIPT}:/home/scripts/case \
-v ${CASE_DIR}/wpsprd:/home/wpsprd \
--name run-${CASE_NAME}-wps dtcenter/wps_wrf:3.4 \
--name run-${CASE_NAME}-wps dtcenter/wps_wrf:${VERSION} \
/home/scripts/common/run_wps.ksh

# Run Real
RUN_CMD \
docker run --rm -it -e LOCAL_USER_ID=`id -u $USER` \
-v ${PROJ_DIR}/container-dtc-nwp/data:/data \
-v ${PROJ_DIR}/data:/data \
-v ${PROJ_DIR}/container-dtc-nwp/components/scripts/common:/home/scripts/common \
-v ${PROJ_DIR}/container-dtc-nwp/components/scripts/${CASE_SCRIPT}:/home/scripts/case \
-v ${CASE_DIR}/wpsprd:/home/wpsprd \
-v ${CASE_DIR}/wrfprd:/home/wrfprd \
--name run-${CASE_NAME}-real dtcenter/wps_wrf:3.4 \
--name run-${CASE_NAME}-real dtcenter/wps_wrf:${VERSION} \
/home/scripts/common/run_real.ksh

# Run GSI
RUN_CMD \
docker run --rm -it -e LOCAL_USER_ID=`id -u $USER` \
-v ${PROJ_DIR}/container-dtc-nwp/data:/data \
-v ${PROJ_DIR}/data:/data \
-v ${PROJ_DIR}/container-dtc-nwp/components/scripts/common:/home/scripts/common \
-v ${PROJ_DIR}/container-dtc-nwp/components/scripts/${CASE_SCRIPT}:/home/scripts/case \
-v ${CASE_DIR}/gsiprd:/home/gsiprd \
-v ${CASE_DIR}/wrfprd:/home/wrfprd \
--name run-${CASE_NAME}-gsi dtcenter/gsi:3.4 \
--name run-${CASE_NAME}-gsi dtcenter/gsi:${VERSION} \
/home/scripts/common/run_gsi.ksh

# Run WRF
Expand All @@ -106,7 +109,7 @@ docker run --rm -it -e LOCAL_USER_ID=`id -u $USER` \
-v ${CASE_DIR}/wpsprd:/home/wpsprd \
-v ${CASE_DIR}/gsiprd:/home/gsiprd \
-v ${CASE_DIR}/wrfprd:/home/wrfprd \
--name run-${CASE_NAME}-wrf dtcenter/wps_wrf:3.4 /home/scripts/common/run_wrf.ksh
--name run-${CASE_NAME}-wrf dtcenter/wps_wrf:${VERSION} /home/scripts/common/run_wrf.ksh

# Run UPP
RUN_CMD \
Expand All @@ -115,26 +118,27 @@ docker run --rm -it -e LOCAL_USER_ID=`id -u $USER` \
-v ${PROJ_DIR}/container-dtc-nwp/components/scripts/${CASE_SCRIPT}:/home/scripts/case \
-v ${CASE_DIR}/wrfprd:/home/wrfprd \
-v ${CASE_DIR}/postprd:/home/postprd \
--name run-${CASE_NAME}-upp dtcenter/upp:3.4 /home/scripts/common/run_upp.ksh
--name run-${CASE_NAME}-upp dtcenter/upp:${VERSION} /home/scripts/common/run_upp.ksh

# Run NCL
# Run Python
RUN_CMD \
docker run --rm -it -e LOCAL_USER_ID=`id -u $USER` \
-v ${PROJ_DIR}/container-dtc-nwp/components/scripts/common:/home/scripts/common \
-v ${PROJ_DIR}/container-dtc-nwp/components/scripts/${CASE_SCRIPT}:/home/scripts/case \
-v ${PROJ_DIR}/data/shapefiles:/home/data/shapefiles \
-v ${CASE_DIR}/postprd:/home/postprd \
-v ${CASE_DIR}/pythonprd:/home/pythonprd \
--name run-${CASE_NAME}-python dtcenter/python:3.4 /home/scripts/common/run_python.ksh
--name run-${CASE_NAME}-python dtcenter/python:${VERSION} /home/scripts/common/run_python.ksh

# Run MET
RUN_CMD \
docker run --rm -it -e LOCAL_USER_ID=`id -u $USER` \
-v ${PROJ_DIR}/container-dtc-nwp/data:/data \
-v ${PROJ_DIR}/data:/data \
-v ${PROJ_DIR}/container-dtc-nwp/components/scripts/common:/home/scripts/common \
-v ${PROJ_DIR}/container-dtc-nwp/components/scripts/${CASE_SCRIPT}:/home/scripts/case \
-v ${CASE_DIR}/postprd:/home/postprd \
-v ${CASE_DIR}/metprd:/home/metprd \
--name run-${CASE_NAME}-met dtcenter/nwp-container-met:3.4 /home/scripts/common/run_met.ksh
--name run-${CASE_NAME}-met dtcenter/nwp-container-met:${VERSION} /home/scripts/common/run_met.ksh

# Load MET output into METviewer
RUN_CMD cd ${PROJ_DIR}/container-dtc-nwp/components/metviewer
Expand Down

0 comments on commit 9c680be

Please sign in to comment.