Skip to content

Commit

Permalink
Merge pull request NCAR#56 from jmills-ncar/master
Browse files Browse the repository at this point in the history
updates to readme
  • Loading branch information
T. Joe Mills committed Jun 19, 2018
2 parents cce3a7a + 2fc75d0 commit 9607a28
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
5 changes: 4 additions & 1 deletion training/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ If you have questions regarding the lessons please contact us here https://ral.u
The best place ask questions or post issues with these lessons is via the Issues page of the GitHub repository at https://github.com/NCAR/wrf_hydro_training/issues.

## How to run
Make sure you have Docker installed and that it can access your localhost ports. Most out-of-the-box Docker installations accepting all defaults will have this configuration.
Make sure you have Docker installed and that it can access your localhost ports. Most out-of-the-box
Docker installations accepting all defaults will have this configuration.

**NOTE: THE DEFAULT DOCKER CONFIGURATION IS FOR 2 CPUS, YOU MUST HAVE AT LEAST 2 CPUS AVAILABLE TO THE DOCKER DAEMON FOR THIS TRAINING**

**Step 1: Open a terminal or PowerShell session**

Expand Down
3 changes: 2 additions & 1 deletion wps/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,10 @@ COPY wrf_hydro_namelist.wps /home/docker/WRF_WPS/utilities/
COPY gdrive_download.py gdrive_download.py
RUN chmod 777 gdrive_download.py

RUN echo 'force layer build'
RUN python gdrive_download.py --file_id 1EICBJ8-pRpkox27Bnq3mrBAqyZQsV662 --dest_file geog_conus.tar.gz \
&& tar -xf geog_conus.tar.gz \
&& mv geog_training /home/docker/WRF_WPS/utilities/geog_conus \
&& mv geog_conus /home/docker/WRF_WPS/utilities/geog_conus \
&& rm geog_conus.tar.gz

RUN chmod -R 777 /home/docker/WRF_WPS/utilities/geog_conus
Expand Down
26 changes: 14 additions & 12 deletions wps/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,39 +67,41 @@ The WPS `geogrid.exe` utility is controlled by options set in the `namelist.wps`
truelat1 = 30.0,
truelat2 = 60.0,
stand_lon = -97.00,
/
```
----------

### Usage
**Step 1: Pull the image**
```
docker pull wrfhydro/dev:conda
```

** Step 1:** Create a directory to bind-mount to Docker for passing files between your system and docker

**Step 2: Create a directory to bind-mount to Docker for passing files between your system and docker**
```
mkdir /home/dockerMount
```

**Step 2: Create a namelist.wps file for your domain using the above example as a starting point and save it in your mount directory from step 1.**
**Step 3: Create a namelist.wps file for your domain using the above example as a starting point and save it in your mount directory from step 1.**

**Step 3: Run Docker invoking the python make_geogrid.py utility with the required arguments.**
**Step 4: Run Docker invoking the python make_geogrid.py utility with the required arguments.**

**NOTE THE PATHS LISTED BELOW IN THE ARUGMENT LIST ARE FOR THE DOCKER FILESYSTEM**
You most likely will only need to change the name of your namelist.wps file in the --namelist_path
argument.
**NOTE THE PATHS LISTED BELOW IN THE ARUGMENT LIST ARE FOR THE DOCKER FILESYSTEM. ALSO NOTE THAT ALL PATHS MUST BE ABSOLUTE**

```
docker run -v <path-to-your-local-mount-folder>:/home/docker/mount \
wrfhydro/wps \
--namelist_path /home/docker/mount/namelist.wps \
--output_dir /home/docker/mount/ \
--plot_only False
wrfhydro/wps \
--namelist_path /home/docker/mount/namelist.wps \
--output_dir /home/docker/mount/ \
--plot_only False
```

#### We will now dissect the pieces of this Docker command.

-----------------

`docker run -v <path-to-your-local-mount-folder>:/home/docker/mount...` - Run the container with the `-v` argument to bind mount a volume on your local system to a folder in the docker container. It is best to leave the folder in the docker container unchanged.
`docker run -v <path-to-your-local-mount-folder>:/home/docker/mount...` - Run the container with the `-v` argument to bind mount a volume on your local system to a folder in the docker container. It is best to leave the folder in the docker container unchanged.

`--namelist_path /home/docker/mount/namelist.wps \` - Path to your `namelist` file **ON THE DOCKER FILE SYSTEM**

Expand Down

0 comments on commit 9607a28

Please sign in to comment.