View source: R/cms_download_subset.r
| cms_download_subset | R Documentation |
Subset and download a specific marine product
from Copernicus.
cms_download_subset(
product,
layer,
variable,
region,
timerange,
verticalrange,
progress = TRUE,
crop,
asset,
...,
username = cms_get_username(),
password = cms_get_password()
)
Returns a stars::st_as_stars() object.
Pepijn de Vries
if (interactive()) {
mydata <- cms_download_subset(
product = "GLOBAL_ANALYSISFORECAST_PHY_001_024",
layer = "cmems_mod_glo_phy-cur_anfc_0.083deg_P1D-m",
variable = c("uo", "vo"),
region = c(-1, 50, 10, 55),
timerange = c("2025-01-01 UTC", "2025-01-02 UTC"),
verticalrange = c(0, -2)
)
plot(mydata["vo"])
} else {
message("Make sure to run this in an interactive environment")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.