-
Notifications
You must be signed in to change notification settings - Fork 1
copernicusmarine subset
Ben Tupper edited this page Nov 14, 2024
·
1 revision
copernicusmarine subset --help
Usage: copernicusmarine subset [OPTIONS]
Download subsets of datasets as NetCDF files or Zarr stores.
Either one of --dataset-id or --dataset-url is required (can be found via
the "describe" command). The argument values passed individually through the
CLI take precedence over the values from the --motu-api-request option,
which takes precedence over the ones from the --request-file option.
Options:
-u, --dataset-url TEXT The full dataset URL.
-i, --dataset-id TEXT The datasetID.
--dataset-version, --force-dataset-version TEXT
Force the selection of a specific dataset
version.
--dataset-part, --force-dataset-part TEXT
Force the selection of a specific dataset
part.
--username TEXT If not set, search for environment variable
COPERNICUSMARINE_SERVICE_USERNAME, or else
look for configuration files, or else ask
for user input.
--password TEXT If not set, search for environment variable
COPERNICUSMARINE_SERVICE_PASSWORD, or else
look for configuration files, or else ask
for user input.
-v, --variable TEXT Specify dataset variable. Can be used
multiple times.
-x, --minimum-longitude, --minimal-longitude FLOAT
Minimum longitude for the subset. The value
will be reduced to the interval [-180; 360[.
-X, --maximum-longitude, --maximal-longitude FLOAT
Maximum longitude for the subset. The value
will be reduced to the interval [-180; 360[.
-y, --minimum-latitude, --minimal-latitude FLOAT RANGE
Minimum latitude for the subset. Requires a
float within this range: [-90<=x<=90]
-Y, --maximum-latitude, --maximal-latitude FLOAT RANGE
Maximum latitude for the subset. Requires a
float within this range: [-90<=x<=90]
-z, --minimum-depth, --minimal-depth FLOAT RANGE
Minimum depth for the subset. Requires a
float within this range: [x>=0]
-Z, --maximum-depth, --maximal-depth FLOAT RANGE
Maximum depth for the subset. Requires a
float within this range: [x>=0]
--vertical-dimension-as-originally-produced BOOLEAN
Consolidate the vertical dimension (the
z-axis) as it is in the dataset originally
produced, named `depth` with descending
positive values. [default: True]
-t, --start-datetime [%Y|%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d %H:%M:%S|%Y-%m-%dT%H:%M:%S.%fZ]
The start datetime of the temporal subset.
Caution: encapsulate date with " " to ensure
valid expression for format "%Y-%m-%d
%H:%M:%S".
-T, --end-datetime [%Y|%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d %H:%M:%S|%Y-%m-%dT%H:%M:%S.%fZ]
The end datetime of the temporal subset.
Caution: encapsulate date with " " to ensure
valid expression for format "%Y-%m-%d
%H:%M:%S".
--subset-method [nearest|strict]
The subset method when requesting the
dataset. If strict, you can only request
dimension strictly inside the dataset.
-o, --output-directory PATH The destination folder for the downloaded
files. Default is the current directory.
--credentials-file PATH Path to a credentials file if not in its
default directory. Accepts
.copernicusmarine-credentials / .netrc or
_netrc / motuclient-python.ini files.
-f, --output-filename TEXT Concatenate the downloaded data in the given
file name (under the output directory).
--file-format [netcdf|zarr] Format of the downloaded dataset. Default to
NetCDF (.nc).
--force-download Flag to skip confirmation before download.
--overwrite-output-data, --overwrite
If specified and if the file already exists
on destination, then it will be overwritten
instead of creating new one with unique
index.
-s, --service, --force-service TEXT
Force download through one of the available
services using the service name among
['arco-geo-series', 'arco-time-series',
'omi-arco', 'static-arco'] or its short name
among ['geoseries', 'timeseries', 'omi-
arco', 'static-arco'].
--create-template Option to create a file subset_template.json
in your current directory containing CLI
arguments. If specified, no other action
will be performed.
--request-file PATH Option to pass a file containing CLI
arguments. The file MUST follow the
structure of dataclass 'SubsetRequest'. For
more information please refer to the README.
--motu-api-request TEXT Option to pass a complete MOTU API request
as a string. Caution, user has to replace
double quotes " with single quotes ' in the
request.
--overwrite-metadata-cache Force to refresh the catalogue by
overwriting the local cache.
NOTE: This argument is mutually exclusive
with arguments: [no_metadata_cache].
--no-metadata-cache Bypass the use of cache.
NOTE: This argument is mutually exclusive
with arguments: [overwrite_metadata_cache].
--disable-progress-bar Flag to hide progress bar.
--log-level [DEBUG|INFO|WARN|ERROR|CRITICAL|QUIET]
Set the details printed to console by the
command (based on standard logging library).
--netcdf-compression-enabled Enable compression level 1 to the NetCDF
output file. Use --netcdf-compression-level
option to customize the compression level
--netcdf-compression-level INTEGER RANGE
Specify a compression level to apply on the
NetCDF output file. A value of 0 means no
compression, and 9 is the highest level of
compression available [0<=x<=9]
--netcdf3-compatible Enable downloading the dataset in a netCDF 3
compatible format.
-h, --help Show this message and exit.
Examples:
copernicusmarine subset
--dataset-id cmems_mod_glo_phy-thetao_anfc_0.083deg_PT6H-i
--variable thetao
--start-datetime 2022-01-01T00:00:00 --end-datetime 2022-12-31T23:59:59
--minimum-longitude -6.17 --maximum-longitude -5.08
--minimum-latitude 35.75 --maximum-latitude 36.30
--minimum-depth 0.0 --maximum-depth 5.0
copernicusmarine subset -i cmems_mod_glo_phy-thetao_anfc_0.083deg_PT6H-i -v thetao -t 2022-01-01T00:00:00 -T 2022-12-31T23:59:59 -x -6.17 -X -5.08 -y 35.75 -Y 36.30 -z 0.0 -Z 5.0