Command Line Interface

Installing melodies_monet provides a command line interface (CLI): melodies-monet.

For example, you can use the CLI to run control files without writing any Python code:

melodies-monet run control.yml

Subcommands

melodies-monet

MELODIES MONET

melodies-monet [OPTIONS] COMMAND [ARGS]...

Options

--version

Print version.

Default

False

--install-completion

Install completion for the current shell.

--show-completion

Show completion for the current shell, to copy it or customize the installation.

get-aeronet

Download AERONET data using monetio and reformat for MM usage.

melodies-monet get-aeronet [OPTIONS]

Options

-s, --start-date <start_date>

Required Start date. Date can be in any format accepted by pandas.date_range(), e.g., ‘YYYY-MM-DD’, or ‘M/D/YYYY’. Time other than 0 UTC can be specified by adding trailing ‘ HH[:MM[:SS]]’, but this might not have an effect on the output.

-e, --end-date <end_date>

Required End date. Date can be in any format accepted by pandas.date_range(), e.g., ‘YYYY-MM-DD’, or ‘M/D/YYYY’. Time other than 0 UTC can be specified by adding trailing ‘ HH[:MM[:SS]]’, but this might not have an effect on the output. As not specifying time implies 0 UTC, to get the full last day for hourly data, you should specify hour, e.g., append ‘ 23’ or increase end date by one day. For daily data, this is not necessary.

--daily, --no-daily

Whether to retrieve the daily averaged data product.

Default

False

-f, --freq <freq>

Frequency to resample to. Mean is used to reduce the time groups (as opposed to nearest, e.g.).

Default

H

--interp-to <interp_to>

Wavelength(s) to interpolate the AOD values to (unit: micron). Separate with commas to specify multiple. Examples: ‘0.55’ (550 nm), ‘0.55,0.7,1.0’. Note that this functionality requires pytspack (https://github.com/noaa-oar-arl/pytspack).

-o <out_name>

Output file name (or full/relative path). By default the name is generated like ‘AERONET_<product>_<start-date>_<end-date>.nc’.

-d, --dst <dst>

Destination directory (to control output location if using default output file name).

Default

.

--compress, --no-compress

If true, pack float to int and apply compression using zlib with complevel 7. This can take time if the dataset is large, but can lead to significant space savings.

Default

True

-n, --num-workers <num_workers>

Number of download workers.

Default

1

--verbose, --no-verbose
Default

False

--debug

Print more messages (including full tracebacks).

Default

False

get-airnow

Download AirNow data using monetio and reformat for MM usage.

melodies-monet get-airnow [OPTIONS]

Options

-s, --start-date <start_date>

Required Start date. Date can be in any format accepted by pandas.date_range(), e.g., ‘YYYY-MM-DD’, or ‘M/D/YYYY’. Time other than 0 UTC can be specified by adding trailing ‘ HH[:MM[:SS]]’, but this might not have an effect on the output.

-e, --end-date <end_date>

Required End date. Date can be in any format accepted by pandas.date_range(), e.g., ‘YYYY-MM-DD’, or ‘M/D/YYYY’. Time other than 0 UTC can be specified by adding trailing ‘ HH[:MM[:SS]]’, but this might not have an effect on the output. As not specifying time implies 0 UTC, to get the full last day for hourly data, you should specify hour, e.g., append ‘ 23’ or increase end date by one day. For daily data, this is not necessary.

--daily, --no-daily

Whether to retrieve the daily averaged data product. By default, the hourly data is fetched.

Default

False

-o <out_name>

Output file name (or full/relative path). By default the name is generated like ‘AirNow_<start-date>_<end-date>.nc’.

-d, --dst <dst>

Destination directory (to control output location if using default output file name).

Default

.

--compress, --no-compress

If true, pack float to int and apply compression using zlib with complevel 7. This can take time if the dataset is large, but can lead to significant space savings.

Default

True

-n, --num-workers <num_workers>

Number of download workers.

Default

1

--verbose, --no-verbose
Default

False

--debug

Print more messages (including full tracebacks).

Default

False

run

Run MELODIES MONET as described in the control file CONTROL.

melodies-monet run [OPTIONS] CONTROL

Options

--debug

Print more messages (including full tracebacks).

Default

False

Arguments

CONTROL

Required argument