Skip to content

Commit

Permalink
Merge pull request #138 from NCAR/instructions
Browse files Browse the repository at this point in the history
adding more instructions
  • Loading branch information
K20shores authored Aug 15, 2023
2 parents 4e6f30c + 295b6e9 commit 99d4e08
Show file tree
Hide file tree
Showing 67 changed files with 28 additions and 1,735 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "libs/micm"]
path = libs/micm
url = https://github.com/NCAR/micm.git
[submodule "libs/camp"]
path = libs/camp
url = https://github.com/open-atmos/camp.git
37 changes: 27 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,33 @@ MusicBox: A MUSICA model for boxes and columns.

Copyright (C) 2020 National Center for Atmospheric Research

# Install and run from local git clone

```
git clone https://github.com/NCAR/music-box
cd music-box
git submodule init
git submodule update
docker build -t music-box .
docker run --rm -it music-box
```

Running those commands will put you in a docker container, at which point you can run

```
cd /music-box/build
make test
```

and you will see tests run, and hopefully pass.

There are a number of examples you can run and modify.

```
cd /music-box/examples/camp_examples/bright_chamber/use_case_7/
/music-box/build/music_box use_case_7_config.json
```

# Install and run (interactive version)

The only requirement for running MusicBox is that you have [Docker Desktop](https://www.docker.com/get-started) installed and running. With Docker Desktop running, open a terminal window and run the following command: (The first time you run this command, the MusicBox code will be downloaded from Docker Hub, which may take a few minutes.)
Expand Down Expand Up @@ -37,16 +64,6 @@ You will need to have [Docker Desktop](https://www.docker.com/get-started) insta
docker run -it --rm ncar/music-box bash
```

## Running MusicBox with the MICM Solver
MICM can be specified as the chemical solver by configuring the [model components](config_options.md#model-components) section of the configuration file. By default, MusicBox loads the Chapman chemistry mechanism for simulations using MICM. To run the model with this mechanism under one of the model configurations in the `examples/` folder:

```
cd /build
cp examples/micm_examples/bright_chamber/use_case_4.json .
cp examples/micm_examples/bright_chamber/use_case_4_initial.csv data/
./music_box use_case_4.json
```

## Running MusicBox with the CAMP Solver

CAMP can be specified as the chemical solver by configuring the [model components](config_options.md#model-components) section of the configuration file. To run the model using the CAMP solver under one of the model configurations in the `examples/` folder:
Expand Down
23 changes: 0 additions & 23 deletions config_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,29 +369,6 @@ NetCDF files should have a dimension of <code>time</code>, and variables whose o
</code></pre>
<hr>
<h3 class="code-line" data-line-start=321 data-line-end=322 ><a id="Model_Components_321"></a>Model Components</h3>
<p class="has-line-data" data-line-start="322" data-line-end="323">The model components section of the MusicBox configuration specifies settings for the chemical solver. For most use cases of MusicBox, modifying the model components is not neccesary.</p>
<h5 class="code-line" data-line-start=324 data-line-end=325 ><a id="Model_components_configuration_with_the_MICM_solver_324"></a>Model components configuration with the MICM solver:</h5>
<h1 class="code-line" data-line-start=325 data-line-end=326 ><a id="_325"></a></h1>
<pre><code class="has-line-data" data-line-start="327" data-line-end="347" class="language-json">{
"<span class="hljs-attribute">model components</span>" : <span class="hljs-value">[
{
"<span class="hljs-attribute">type</span>" : <span class="hljs-value"><span class="hljs-string">"MICM"</span></span>,
"<span class="hljs-attribute">solver</span>" : <span class="hljs-value">{
"<span class="hljs-attribute">type</span>" : <span class="hljs-value"><span class="hljs-string">"Rosenbrock"</span></span>,
"<span class="hljs-attribute">chemistry time step [min]</span>" : <span class="hljs-value"><span class="hljs-number">5.0</span></span>,
"<span class="hljs-attribute">absolute tolerance</span>" : <span class="hljs-value"><span class="hljs-number">1.0e-12</span></span>,
"<span class="hljs-attribute">relative tolerance</span>" : <span class="hljs-value"><span class="hljs-number">1.0e-4</span>
</span>}
</span>},
{
"<span class="hljs-attribute">type</span>" : <span class="hljs-value"><span class="hljs-string">"musica-emissions"</span>
</span>},
{
"<span class="hljs-attribute">type</span>" : <span class="hljs-value"><span class="hljs-string">"musica-loss"</span>
</span>}
]
</span>}
</code></pre>
<h5 class="code-line" data-line-start=348 data-line-end=349 ><a id="Configuring_the_CAMP_solver_348"></a>Configuring the CAMP solver:</h5>
<p class="has-line-data" data-line-start="349" data-line-end="350"><strong>When using the CAMP solver, additional configuration files are required.</strong> By default, these are stored in a directory <code>camp_data</code>. Inside this folder:</p>
<p class="has-line-data" data-line-start="351" data-line-end="354">|—<code>config.json</code> — Points to <code>specise.json</code> and <code>mechanism.json</code>.<br>
Expand Down
1 change: 0 additions & 1 deletion doc/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,6 @@ WARN_LOGFILE =

INPUT = doxygen_files \
../src \
../libs/micm/src \
../libs/musica-core/src \
../test

Expand Down
1 change: 0 additions & 1 deletion etc/casper/build_music_box_casper_gnu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ mkdir -p build
cd build
cmake -D CMAKE_C_COMPILER=gcc \
-D CMAKE_Fortran_COMPILER=gfortran \
-D ENABLE_MICM_TESTS=OFF \
-D CMAKE_BUILD_TYPE=release \
-D CMAKE_C_FLAGS="-std=c99 ${NCAR_LIBS_GSL}" \
-D SUITE_SPARSE_AMD_LIB=$SUITE_SPARSE_HOME/lib/libamd.so \
Expand Down
1 change: 0 additions & 1 deletion etc/casper/build_music_box_casper_intel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ mkdir -p build
cd build
cmake -D CMAKE_C_COMPILER=icc \
-D CMAKE_Fortran_COMPILER=ifort \
-D ENABLE_MICM_TESTS=OFF \
-D CMAKE_BUILD_TYPE=release \
-D CMAKE_C_FLAGS="-std=c99 ${NCAR_LIBS_GSL}" \
-D SUITE_SPARSE_AMD_LIB=$SUITE_SPARSE_HOME/lib/libamd.so \
Expand Down
25 changes: 0 additions & 25 deletions etc/change_mechanism.sh

This file was deleted.

1 change: 0 additions & 1 deletion etc/cheyenne/build_music_box_cheyenne_gnu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ mkdir -p build
cd build
cmake -D CMAKE_C_COMPILER=gcc \
-D CMAKE_Fortran_COMPILER=gfortran \
-D ENABLE_MICM_TESTS=OFF \
-D CMAKE_BUILD_TYPE=release \
-D CMAKE_C_FLAGS="-std=c99 ${NCAR_LIBS_GSL}" \
-D SUITE_SPARSE_AMD_LIB=$SUITE_SPARSE_HOME/lib/libamd.so \
Expand Down
1 change: 0 additions & 1 deletion etc/cheyenne/build_music_box_cheyenne_intel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ mkdir -p build
cd build
cmake -D CMAKE_C_COMPILER=icc \
-D CMAKE_Fortran_COMPILER=ifort \
-D ENABLE_MICM_TESTS=OFF \
-D CMAKE_BUILD_TYPE=release \
-D CMAKE_C_FLAGS="-std=c99 ${NCAR_LIBS_GSL}" \
-D SUITE_SPARSE_AMD_LIB=$SUITE_SPARSE_HOME/lib/libamd.so \
Expand Down
1 change: 0 additions & 1 deletion etc/modeling2/build_music_box_modeling2_gnu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ mkdir -p build
cd build
cmake3 -D CMAKE_C_COMPILER=gcc \
-D CMAKE_Fortran_COMPILER=gfortran \
-D ENABLE_MICM_TESTS=OFF \
-D CMAKE_BUILD_TYPE=release \
-D CMAKE_C_FLAGS="-std=c99" \
-D GSL_CBLAS_LIB=$GSL_HOME/lib/libgslcblas.so \
Expand Down
Loading

0 comments on commit 99d4e08

Please sign in to comment.