Skip to contents

Download a subset from a Copernicus Marine dataset

Usage

download_nc(
  dataset_id,
  vars,
  lon = NULL,
  lat = NULL,
  time = NULL,
  depth = NULL,
  outdir = ".",
  fmt = c("netcdf", "zarr", "csv", "parquet"),
  overwrite = FALSE,
  skip_existing = TRUE,
  dry_run = FALSE,
  filename = NULL,
  verbose = TRUE
)

Arguments

dataset_id

Copernicus Marine dataset ID.

vars

Character vector of variable short names.

lon

Optional numeric range c(min, max).

lat

Optional numeric range c(min, max).

time

Optional date range c(start, end).

depth

Optional numeric depth range c(min, max).

outdir

Output directory.

fmt

Output format: netcdf, zarr, csv, or parquet.

overwrite

Logical. Overwrite existing files?

skip_existing

Logical. Skip if the file already exists?

dry_run

Logical. Ask Copernicus to show the request without downloading.

filename

Optional output filename.

verbose

Logical. Print progress messages?

Value

Output file path.

Lifecycle

Deprecated as of oceancube 0.3.0. Use the provider client directly outside oceancube, save a local NetCDF file, and open it with cube_open().