Skip to content

Latest commit

 

History

History
101 lines (68 loc) · 2.62 KB

README.md

File metadata and controls

101 lines (68 loc) · 2.62 KB

MusicBox

MusicBox: A MUSICA model for boxes and columns.

License CI Status codecov PyPI version DOI

Copyright (C) 2020 National Science Foundation - National Center for Atmospheric Research

Installation

pip install acom_music_box

Command line tool

MusicBox provides a command line tool that can run configurations as well as some pre-configured examples. Basic plotting can be done if gnuplot is installed.

Checkout the command line options

music_box -h                                        

Run an example. Notice that the output, in csv format, is printed to the terminal.

music_box -e Chapman

Output can be saved to a csv file and printed to the terminal.

music_box -e Chapman -o output.csv

Output can be saved to a csv file and the terminal output can be suppressed by specifying the --output-format

music_box --output-format csv -e Chapman -o output.csv

Output can be saved to a file as netcdf file when --output-format netcdf is passed

music_box --output-format netcdf -e Chapman -o output.nc

Output can be saved to a file in csv format when a filename is not specified. In this case a timestamped csv file is made

music_box --output-format csv -e Chapman

Output can be saved to a file in netcdf format when a filename is not specified. In this case a timestamped netcdf file is made

music_box --output-format netcdf -e Chapman

You can also run your own configuration

music_box -c my_config.json

Plotting

Some basic plots can be made to show concentrations throughout the simulation

matplotlib

music_box -e Chapman -o output.csv --plot O1D

gnuplot

If you want ascii plots (maybe you're running over ssh and can't view a graphical window), you can set the plot tool to gnuplo (--plot-tool gnuplot) to view some output

music_box -e Chapman -o output.csv --plot O1D --plot-tool gnuplot

Development and Contributing

For local development, install music-box as an editable installation:

pip install -e '.[dev]'

Tests

pytest