Learn R Programming

CopernicusMarine (version 0.4.0)

cms_zarr_proxy: Get a proxy stars object from a Zarr service

Description

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)

Value

A stars_proxy object

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".

Author

Pepijn de Vries

Examples

Run this code
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)
}

Run the code above in your browser using DataLab