Skip to content

Commit 61992a9

Browse files
committed
Adding documentation for running METplus
1 parent 89ed604 commit 61992a9

2 files changed

Lines changed: 130 additions & 0 deletions

File tree

docs/Users_Guide/lulc_usecase.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,8 @@ Running on SYSTEM NAME
3030
Update section with links to the documentation describing how to run on specific systems.
3131

3232
See :ref:`usecasetemplate` for how to set up run documentation.
33+
34+
Running on NCAR HPCs
35+
--------------------
36+
37+
Navigate to :ref:`lulcncarhpc` for more information.

docs/Users_Guide/lulcncarhpc.rst

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
:orphan:
2+
3+
.. _lulcncarhpc:
4+
5+
***************************************************************
6+
Running I-WRF on NCAR HPCs with Land Use/Land Cover Change Data
7+
***************************************************************
8+
9+
Overview
10+
========
11+
12+
Update section with an overview of the following instructions.
13+
14+
Prepare to Use NCAR HPCs
15+
========================
16+
17+
Update section with instructions on how to set up the system to run i-wrf.
18+
19+
Examples include:
20+
21+
* Gaining access to the system
22+
* Creating instances
23+
* Managing instances.
24+
25+
Preparing the Environment
26+
=========================
27+
28+
Load the apptainer module::
29+
30+
module load apptainer
31+
32+
Create a working directory in the scratch area::
33+
34+
IWRF_WORK_DIR=${SCRATCH}/iwrf_work
35+
36+
Create a directory to store the METplus output::
37+
38+
LOCAL_OUTPUT_DIR=${IWRF_WORK_DIR}/metplus_out
39+
mkdir -p ${LOCAL_OUTPUT_DIR}
40+
41+
Create a directory to store temporary Apptainer files
42+
($TMPDIR is set automatically for all users on NCAR HPC machines)::
43+
44+
export APPTAINER_TMPDIR=${TMPDIR}
45+
mkdir -p ${APPTAINER_TMPDIR}
46+
47+
Clone the I-WRF GitHub repository to get the configuration files::
48+
49+
git clone https://github.com/NCAR/i-wrf ${IWRF_WORK_DIR}/i-wrf
50+
51+
Install Docker and Pull Docker Objects
52+
======================================
53+
54+
Update section with instructions on how to install Docker and pull docker images needed.
55+
56+
Download Data for WRF
57+
=====================
58+
59+
Update section with instructions on how to download the data needed to run WRF.
60+
61+
Run WRF
62+
=======
63+
64+
Update section with instructions on how to run WRF.
65+
66+
Run METplus
67+
===========
68+
69+
Pull the METplus and input data containers from DockerHub. ::
70+
71+
apptainer pull ${IWRF_WORK_DIR}/iwrf-metplus.sif docker://ncar/iwrf-metplus:latest
72+
apptainer pull ${IWRF_WORK_DIR}/data-lulc-input-obs.sif docker://ncar/iwrf-data:lulc-input-obs-d03.apptainer
73+
apptainer pull ${IWRF_WORK_DIR}/data-lulc-input-wrf.sif docker://ncar/iwrf-data:lulc-input-wrf-d03.apptainer
74+
75+
Set environment variables to bind directories to the container
76+
77+
* Input data directories for WRF and radar observation input data
78+
* WRF:
79+
* Local: From data-lulc-input-wrf.sif
80+
* Container: /data/input/wrf
81+
* OBS:
82+
* Local: From data-lulc-input-obs.sif
83+
* Container: /data/input/obs
84+
* Config directory containing METplus use case configuration file
85+
* Local: ${IWRF_WORK_DIR}/i-wrf/use_cases/Land_Use_Land_Cover/METplus
86+
* Container: /config
87+
* Plot script directory containing METplotpy configuration files
88+
* Local: ${IWRF_WORK_DIR}/i-wrf/use_cases/Land_Use_Land_Cover/Visualization
89+
* Container: /plot_scripts
90+
* Output directory to write output
91+
* Local: ${IWRF_WORK_DIR}/metplus_out
92+
* Container: /data/output
93+
* Apptainer temp directory
94+
* Local: ${APPTAINER_TMPDIR}
95+
* Container: ${APPTAINER_TMPDIR}
96+
97+
::
98+
99+
LOCAL_METPLUS_CONFIG_DIR=${IWRF_WORK_DIR}/i-wrf/use_cases/Land_Use_Land_Cover/METplus
100+
LOCAL_PLOT_SCRIPT_DIR=${IWRF_WORK_DIR}/i-wrf/use_cases/Land_Use_Land_Cover/Visualization
101+
102+
export APPTAINER_BIND="${IWRF_WORK_DIR}/data-lulc-input-obs.sif:/data/input/obs:image-src=/,${LOCAL_METPLUS_CONFIG_DIR}:/config,${IWRF_WORK_DIR}/data-lulc-input-wrf.sif:/data/input/wrf:image-src=/,${LOCAL_OUTPUT_DIR}:/data/output,${LOCAL_PLOT_SCRIPT_DIR}:/plot_scripts,${APPTAINER_TMPDIR}:${APPTAINER_TMPDIR}"
103+
104+
Execute the run_metplus.py command inside the container to run the use case
105+
106+
* Accumulated Precipitation::
107+
108+
apptainer exec ${IWRF_WORK_DIR}/iwrf-metplus.sif /metplus/METplus/ush/run_metplus.py /config/GridStat_apcp_lulc.conf
109+
110+
* Reflectivity::
111+
112+
apptainer exec ${IWRF_WORK_DIR}/iwrf-metplus.sif /metplus/METplus/ush/run_metplus.py /config/GridStat_refc_lulc.conf
113+
114+
Check that the output data was created locally::
115+
116+
ls ${LOCAL_OUTPUT_DIR}/grid_stat/* -1
117+
118+
Check that the METplotpy plots were created locally::
119+
120+
ls ${LOCAL_OUTPUT_DIR}/met_plot/*/*.png -1
121+
122+
Visualize the Results
123+
=====================
124+
125+
In the near future, this exercise will be extended to include instructions to visualize the results.

0 commit comments

Comments
 (0)