Command Line Interface#

MUSICA provides a command-line interface (musica-cli) for working with examples and configuration conversion. The CLI is installed automatically when you install MUSICA via pip.

Installation#

To use all features of the examples, install MUSICA with the tutorial dependencies:

$ pip install 'musica[tutorial]'

Basic Usage#

Check the installed version:

$ musica-cli --version

View available options:

$ musica-cli -h

Available Options#

Option

Description

-h, --help

Show help message and exit

-e, --example

Name of the example to copy out

-o, --output

Path to save the output to

-v, --verbose

Increase logging verbosity. Use -v for info, -vv for debug

--version

Show the installed MUSICA version

--convert

Path to a MUSICA v0 configuration to convert to v1 format

Available Examples#

The following examples are available through the CLI:

Example Name

Description

CARMA_Aluminum

A CARMA example for simulating aluminum aerosol particles

CARMA_Sulfate

A CARMA example for simulating sulfate aerosol particles

Sulfate_Box_Model

A box model example for simulating sulfate aerosol particles

TS1LatinHyperCube

A Latin hypercube sampling example for the TS1 mechanism

Example Workflow#

Copy an Example#

Copy an example to your current directory:

$ musica-cli -e TS1LatinHyperCube

Copy an example to a specific directory:

$ musica-cli -e TS1LatinHyperCube -o /path/to/output/

Convert Configuration#

Convert a MUSICA v0 configuration to v1 format:

$ musica-cli --convert /path/to/v0/config.json -o /path/to/output/

Verbose Output#

For more detailed logging information:

$ musica-cli -e TS1LatinHyperCube -v

For debug-level logging:

$ musica-cli -e TS1LatinHyperCube -vv