View source: R/copernicus_download_motu.r
copernicus_download_motu | R Documentation |
The MOTU servers will be discontinued by Copernicus Marine Services. Use cms_download_subset()
instead to download subsets.
copernicus_download_motu(
username = getOption("CopernicusMarine_uid", ""),
password = getOption("CopernicusMarine_pwd", ""),
destination,
product,
layer,
variable,
output,
region,
timerange,
verticalrange,
sub_variables,
overwrite = FALSE
)
Returns a logical
value invisibly indicating whether the requested file was
successfully stored at the destination
.
Pepijn de Vries
## Not run:
destination <- tempfile("copernicus", fileext = ".nc")
## Assuming that Copernicus account details are provided as `options`
copernicus_download_motu(
destination = destination,
product = "GLOBAL_ANALYSISFORECAST_PHY_001_024",
layer = "cmems_mod_glo_phy-cur_anfc_0.083deg_P1D-m",
variable = "sea_water_velocity",
output = "netcdf",
region = c(-1, 50, 10, 55),
timerange = c("2021-01-01", "2021-01-02"),
verticalrange = c(0, 2),
sub_variables = c("uo", "vo")
)
mydata <- stars::read_stars(destination)
plot(mydata["vo"])
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.