CLI Reference¶
Documentation for the asli script.
asli --help
usage: asli [-h] {download,calc,plot} ...
Command line interface to download source data, calculate and plot pressure minima using asli.
positional arguments:
{download,calc,plot} Available subcommands
download Download ERA5 or land-sea mask data from the Climate Data Store.
calc Calculates the pressure minima index from mean sea level pressure fields.
plot Plot pressure minima with mean sea level pressure fields. Output to png supported.
options:
-h, --help show this help message and exit
download¶
asli download --help
usage: asli download [-h] [-d DATADIR] [-e] [-a AREA AREA AREA AREA] [-b [BORDER]] [--lsm] [-f FILENAME] [-v [VARS]] [-s START] [-n END]
Downloads the ERA5 monthly averaged data or land-sea mask from the Climate Data Store (CDS). Uses the CDS API and therefore requires CDS account and API key. Please see the CDS API documentation: https://cds.climate.copernicus.eu/how-to-api If
running for the first time, may require agreement to CDS T&Cs per dataset. See output for details. Downloads may queue for a considerable time depending on the CDS. Request progress can be tracked through your CDS account at:
https://cds.climate.copernicus.eu/requests
options:
-h, --help show this help message and exit
-d, --datadir DATADIR
Path to directory in which to put downloaded data. (Default: ./data)
-e Download entire earth. i.e. don't restrict to bounds specified using '-a'.
-a, --area AREA AREA AREA AREA
Bounding coordinates for data download: N W S E. Optional. Overridden by '-e' option. (Default: bounds of Amundsen Sea: [-60.0, 170.0, -80.0, 298.0])
-b, --border [BORDER]
Additional border around <area> to download in degrees. Default: 0.0
--lsm Download the land-sea mask, instead of the era5 variables. If this flag is present, vars, start, end will be ignored.
-f, --filename FILENAME
Filename for land sea mask file once downloaded. Not applicable unless --lsm option present. (Default: era5_lsm.nc)
-v, --vars [VARS] comma-separated list of strings specifying variables to download. Can be one or more of 'msl' (default), 'tas', 'uas', 'vas' corresponding to 'mean_sea_level_pressure', '2m_temperature', '10m_u_component_of_wind', and
'10m_v_component_of_wind', respectively. Default: msl,
-s, --start START Earliest year to download. (Default: 1959)
-n, --end END Latest year to download. (Default: 2026)
calc¶
asli calc --help
usage: asli calc [-h] [-m [MASK]] [-o OUTPUT] [-e] [-n [NUMJOBS]] [-M [MINIMA]] [-x] [-t [TEMPLATE]] [msl_files ...]
positional arguments:
msl_files Path or glob pattern for file(s) containing mean sea level pressure.
options:
-h, --help show this help message and exit
-m, --mask [MASK] Land-sea mask file path. Default: ./data/era5_lsm.nc
-o, --output OUTPUT Output file path for file.
-e, --era5t When present, this flag enables the inclusion of ERA5T initial release data as well as finalised ERA5 data.
-n, --numjobs [NUMJOBS]
Number of processes used by joblib in parallel calculation. Default: 1
-M, --minima [MINIMA]
Max number of minima to locate in pressure field per time step. Default: 1
-x, --no-header When present, this flag disables the header in the CSV output.
-t, --template [TEMPLATE]
Path to a custom jinja2 CSV header template file, containing the variables: calculation_version, software_version, date_created, time_coverage_start, time_coverage_end.
plot¶
asli plot --help
usage: asli plot [-h] [-m [MASK]] [-o OUTPUT] [-i [INPUT]] [-y [YEAR]] [--month [MONTH]] [msl_files ...]
Takes an input CSV file containing pressure minima (output from calc subcommand) and mean sea level pressure field data and plots the output to png.
positional arguments:
msl_files Path or glob pattern for file(s) containing mean sea level pressure.
options:
-h, --help show this help message and exit
-m, --mask [MASK] Land-sea mask file path. Default: ./data/era5_lsm.nc
-o, --output OUTPUT Output file path for file.
-i, --input [INPUT] Path to input CSV file.
-y, --year [YEAR] When present, plot only the year specified
--month [MONTH] When present, plot only the month specified. Requires --year to be present.