mattldawson / music-box

A box/column model using MICM chemistry

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MusicBox

MusicBox: A MUSICA model for boxes and columns.

License CI Status

Copyright (C) 2020 National Center for Atmospheric Research

Install and run (interactive version)

The only requirement for running MusicBox is that you have Docker Desktop 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.)

docker image pull ncar/music-box

Then, run Music Box.

docker run -p 8000:8000 -it --rm ncar/music-box

Leaving the terminal window open, open a web browser and navigate to the following address: localhost:8000. From there, you can configure and run a simulation, plot results, and download the raw model output for further analysis.

When you are ready to stop the MusicBox server, return to the terminal window and stop the server with Control-C. If you would like to remove MusicBox from your machine, open a terminal window and run the following command:

docker image rm ncar/music-box

Install and run (command-line version)

View options for MusicBox configuration

You can follow these instructions if you are only interested in using the command-line version of MusicBox and will not be using the browser-based model driver.

You will need to have Docker Desktop installed and running. Then, from a terminal window run:

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 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 section of the configuration file. To run the model using the CAMP solver under one of the model configurations in the examples/ folder:

cd /build
cp -r examples/camp_examples/dark_chamber/use_case_1/camp_data .
cp examples/camp_examples/dark_chamber/use_case_1/use_case_1_config.json .
./music_box use_case_1_config.json

The results will be in a file named output.csv.

Documentation

MusicBox documentation can be built using Doxygen. After installing Doxygen, from the root MusicBox folder run:

cd doc
doxygen

Then, open music-box/doc/html/index.html in a browser.

The documentation includes more detailed instructions for configuring the model, along with developer resources.

About

A box/column model using MICM chemistry

License:Apache License 2.0


Languages

Language:Fortran 52.7%Language:Shell 34.2%Language:CMake 6.6%Language:C 4.2%Language:Dockerfile 2.3%