Skip to contents

[Experimental] The advantage of stars_proxy objects, is that they do not contain any data. They are therefore fast to handle and consume only limited memory. You can still manipulate the object lazily (like selecting slices). These operation are only executed when calling stars::st_as_stars() or plot() on the object.

Usage

cms_zarr_proxy(
  product,
  layer,
  variable,
  asset,
  ...,
  username = cms_get_username(),
  password = cms_get_password()
)

Arguments

product

An identifier (type character) of the desired Copernicus marine product. Can be obtained with cms_products_list.

layer

The name of a desired layer within a product (type character). Can be obtained with cms_product_services (listed as id column).

variable

The name of a desired variable in a specific layer of a product (type character). Can be obtained with cms_product_details.

asset

An asset that is available for the product. Should be one of "native", "wmts", "timeChunked", "downsampled4", or "geoChunked".

...

Ignored (reserved for future features).

username

Your Copernicus marine user name. Can be provided with cms_get_username() (default), or as argument here.

password

Your Copernicus marine password. Can be provided as cms_get_password() (default), or as argument here.

Details

For more details see vignette("proxy").

Author

Pepijn de Vries

Examples

if (interactive()) {
  myproxy <- cms_zarr_proxy(
    product       = "GLOBAL_ANALYSISFORECAST_PHY_001_024",
    layer         = "cmems_mod_glo_phy-cur_anfc_0.083deg_P1D-m",
    variable      = c("uo", "vo"),
    asset         = "timeChunked")
  plot(myproxy["uo",1:200,1:100,50,1], axes = TRUE)
}