Skip to content

Commit

Permalink
updated instructions to use full paths instead of changing directorie…
Browse files Browse the repository at this point in the history
…s, added steps to clone i-wrf repo to get METplus config files
  • Loading branch information
georgemccabe committed May 21, 2024
1 parent 767a33b commit 295ac58
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions docs/Users_Guide/running.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,17 @@ Load the apptainer module::
Change directory to scratch and pull the containers from DockerHub.
This will create a `.sif` file in the current directory::

cd ${SCRATCH}
apptainer pull docker://dtcenter/metplus-dev:feature_1514_madis2nc-pull_request
apptainer pull data-matthew-input-obs.sif oras://registry-1.docker.io/ncar/iwrf:data-matthew-input-obs
apptainer pull ${SCRATCH}/metplus-dev_develop.sif docker://dtcenter/metplus-dev:develop
apptainer pull ${SCRATCH}/data-matthew-input-obs.sif oras://registry-1.docker.io/ncar/iwrf:data-matthew-input-obs

Create a directory to store the output::

mkdir ${SCRATCH}/metplus_out

Clone the I-WRF GitHub repository to get the configuration files::

git clone https://github.com/NCAR/i-wrf ${SCRATCH}/i-wrf

Set environment variable to bind directories to container
(note: this can also be accomplished by passing the value on the command line
using the --bind argument)
Expand All @@ -43,23 +46,23 @@ using the --bind argument)
* Local: From data-matthew-input-obs.sif
* Container: /data/input/obs/metar
* Config directory containing METplus use case configuration file
* Local: /glade/u/home/mccabe/i-wrf/use_cases/Hurricane_Matthew/METplus
* Local: ${SCRATCH}/i-wrf/use_cases/Hurricane_Matthew/METplus
* Container: /config
* Output directory to write output
* Local: ${SCRATCH}/metplus_out
* Container: /data/output

::

LOCAL_METPLUS_CONFIG_DIR=/glade/u/home/mccabe/i-wrf/use_cases/Hurricane_Matthew/METplus
LOCAL_METPLUS_CONFIG_DIR=${SCRATCH}/i-wrf/use_cases/Hurricane_Matthew/METplus
LOCAL_FCST_INPUT_DIR=/glade/derecho/scratch/jaredlee/nsf_i-wrf/matthew
LOCAL_OUTPUT_DIR=${SCRATCH}/metplus_out

export APPTAINER_BIND="data-matthew-input-obs.sif:/data/input/obs:image-src=/,${LOCAL_METPLUS_CONFIG_DIR}:/config,${LOCAL_FCST_INPUT_DIR}:/data/input/wrf,${LOCAL_OUTPUT_DIR}:/data/output"
export APPTAINER_BIND="${SCRATCH}/data-matthew-input-obs.sif:/data/input/obs:image-src=/,${LOCAL_METPLUS_CONFIG_DIR}:/config,${LOCAL_FCST_INPUT_DIR}:/data/input/wrf,${LOCAL_OUTPUT_DIR}:/data/output"

Execute the run_metplus.py command inside the container to run the use case::

apptainer exec metplus-dev_feature_1514_madis2nc-pull_request.sif /metplus/METplus/ush/run_metplus.py /config/PointStat_matthew.conf
apptainer exec ${SCRATCH}/metplus-dev_develop.sif /metplus/METplus/ush/run_metplus.py /config/PointStat_matthew.conf

Check that the output data was created locally::

Expand Down

0 comments on commit 295ac58

Please sign in to comment.