Learn R Programming

copernicusR (version 0.1.0)

copernicus_download: Download data from Copernicus Marine

Description

Downloads .nc files from the Copernicus Marine catalog. Allows specifying all options of the Python function. Uses stored credentials from options/environment variables if available.

Usage

copernicus_download(
  dataset_id,
  variables,
  start_date,
  end_date,
  bbox = c(-180, 179.92, -80, 90),
  depth = c(0.494, 0.494),
  dataset_version = "202406",
  output_file = NULL,
  username = NULL,
  password = NULL,
  verbose_download = TRUE,
  ...
)

Value

Absolute path to the downloaded file, or NULL if it fails.

Arguments

dataset_id

ID of the dataset (exact).

variables

Vector or list of variables to download.

start_date

Download start date (YYYY-MM-DD).

end_date

Download end date (YYYY-MM-DD).

bbox

Vector of 4 values (xmin, xmax, ymin, ymax) for the region.

depth

Vector of 2 values: minimum and maximum depth.

dataset_version

Dataset version.

output_file

Output file path. By default, generates one in tempdir().

username

Copernicus Marine username (optional, will try to get from stored credentials).

password

Copernicus Marine password (optional, will try to get from stored credentials).

verbose_download

Show detailed messages.

...

Other extra arguments passed to the Python function.