Title: | Search Download and Handle Data from Copernicus Marine Service Information |
---|---|
Description: | Subset and download data from EU Copernicus Marine Service Information: <https://data.marine.copernicus.eu>. Import data on the oceans physical and biogeochemical state from Copernicus into R without the need of external software. |
Authors: | Pepijn de Vries [aut, cre, dtc] (0000-0002-7961-6646) |
Maintainer: | Pepijn de Vries <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.2.3.002 |
Built: | 2024-11-06 04:59:33 UTC |
Source: | https://github.com/pepijn-devries/CopernicusMarine |
Create an interactive map with
leaflet::leaflet()
and add layers of Copernicus marine WMS data
to it.
addCopernicusWMSTiles( map, product, layer, variable, options = leaflet::WMSTileOptions(format = "image/png", transparent = TRUE), ... )
addCopernicusWMSTiles( map, product, layer, variable, options = leaflet::WMSTileOptions(format = "image/png", transparent = TRUE), ... )
map |
A map widget object created from |
product |
An identifier (type |
layer |
The name of a desired layer within a product (type |
variable |
The name of a desired variable in a specific layer of a product (type |
options |
Passed on to |
... |
Passed on to |
Returns an updated map
WMS functions don't work on systems that don't support GDAL utils
Pepijn de Vries
Other wms-functions:
copernicus_wms2geotiff()
,
copernicus_wms_details()
## Not run: if (interactive()) { leaflet::leaflet() |> leaflet::setView(lng = 3, lat = 54, zoom = 4) |> leaflet::addProviderTiles("Esri.WorldImagery") |> addCopernicusWMSTiles( product = "GLOBAL_ANALYSISFORECAST_PHY_001_024", layer = "cmems_mod_glo_phy-thetao_anfc_0.083deg_P1D-m", variable = "thetao") } ## End(Not run)
## Not run: if (interactive()) { leaflet::leaflet() |> leaflet::setView(lng = 3, lat = 54, zoom = 4) |> leaflet::addProviderTiles("Esri.WorldImagery") |> addCopernicusWMSTiles( product = "GLOBAL_ANALYSISFORECAST_PHY_001_024", layer = "cmems_mod_glo_phy-thetao_anfc_0.083deg_P1D-m", variable = "thetao") } ## End(Not run)
Get details for properly citing a Copernicus product.
cms_cite_product(product)
cms_cite_product(product)
product |
An identifier (type |
Returns a vector of character strings. The first element is always the product title, id and doi. Remaining elements are other associated references. Note that the remaining references are returned as listed at Copernicus. Note that the citing formatting does not appear to be standardised.
Pepijn de Vries
Other product-functions:
cms_product_details()
,
cms_product_metadata()
,
cms_product_services()
,
cms_products_list()
,
copernicus_cite_product()
,
copernicus_product_details()
,
copernicus_product_metadata()
,
copernicus_products_list()
cms_cite_product("SST_MED_PHY_SUBSKIN_L4_NRT_010_036")
cms_cite_product("SST_MED_PHY_SUBSKIN_L4_NRT_010_036")
Full marine data sets can be downloaded using the SpatioTemporal Asset Catalogs (STAC). Use these functions to list download locations and get the files.
cms_download_stac( file_tibble, destination, show_progress = TRUE, overwrite = FALSE ) cms_list_stac_files(product, layer) cms_stac_properties(product, layer)
cms_download_stac( file_tibble, destination, show_progress = TRUE, overwrite = FALSE ) cms_list_stac_files(product, layer) cms_stac_properties(product, layer)
file_tibble |
A |
destination |
A |
show_progress |
A |
overwrite |
A |
product |
An identifier (type |
layer |
The name of a desired layer within a product (type |
In case of cms_stac_properties
a dplyr::tibble()
is returned with some
product properties, It is used as precursor for cms_list_stac_files
.
In case of cms_list_stac_files
a dplyr::tibble()
is returned containing
available URLs (for the specified product
and layer
) and some meta information is returned.
In case of cms_download_stac
an invisible logical
value is returned, indicating whether
all requested files are successfully stored at the destination
path. A list
of responses
(of class httr2::response()
) for all requested download links is included as attribute
to the result.
Pepijn de Vries
## Not run: ## List some STAC properties for a specific product and layer cms_stac_properties( product = "GLOBAL_ANALYSISFORECAST_PHY_001_024", layer = "cmems_mod_glo_phy-cur_anfc_0.083deg_P1D-m" ) ## Get the available files for a specific product and layer: file_tibble <- cms_list_stac_files("GLOBAL_ANALYSISFORECAST_PHY_001_024", "cmems_mod_glo_phy-cur_anfc_0.083deg_P1D-m") dest <- tempdir() ## download the first file from the file_tibble to 'dest' cms_download_stac(file_tibble[1,, drop = FALSE], dest) ## End(Not run)
## Not run: ## List some STAC properties for a specific product and layer cms_stac_properties( product = "GLOBAL_ANALYSISFORECAST_PHY_001_024", layer = "cmems_mod_glo_phy-cur_anfc_0.083deg_P1D-m" ) ## Get the available files for a specific product and layer: file_tibble <- cms_list_stac_files("GLOBAL_ANALYSISFORECAST_PHY_001_024", "cmems_mod_glo_phy-cur_anfc_0.083deg_P1D-m") dest <- tempdir() ## download the first file from the file_tibble to 'dest' cms_download_stac(file_tibble[1,, drop = FALSE], dest) ## End(Not run)
Subset and download a specific marine product from Copernicus. You need to register an account at https://data.marine.copernicus.eu before you can use this function.
cms_download_subset( username = getOption("CopernicusMarine_uid", ""), password = getOption("CopernicusMarine_pwd", ""), destination, product, layer, variable, region, timerange, verticalrange, overwrite = FALSE )
cms_download_subset( username = getOption("CopernicusMarine_uid", ""), password = getOption("CopernicusMarine_pwd", ""), destination, product, layer, variable, region, timerange, verticalrange, overwrite = FALSE )
username |
Your Copernicus marine user name. Can be provided as
|
password |
Your Copernicus marine password. Can be provided as
|
destination |
File or path where the requested file will be downloaded to. |
product |
An identifier (type |
layer |
The name of a desired layer within a product (type |
variable |
The name of a desired variable in a specific layer of a product (type |
region |
Specification of the bounding box as a |
timerange |
A |
verticalrange |
A |
overwrite |
A |
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` cms_download_subset( destination = destination, product = "GLOBAL_ANALYSISFORECAST_PHY_001_024", layer = "cmems_mod_glo_phy-cur_anfc_0.083deg_P1D-m", variable = "sea_water_velocity", region = c(-1, 50, 10, 55), timerange = c("2021-01-01 UTC", "2021-01-02 UTC"), verticalrange = c(0, -2) ) mydata <- stars::read_stars(destination) plot(mydata["vo"]) ## End(Not run)
## Not run: destination <- tempfile("copernicus", fileext = ".nc") ## Assuming that Copernicus account details are provided as `options` cms_download_subset( destination = destination, product = "GLOBAL_ANALYSISFORECAST_PHY_001_024", layer = "cmems_mod_glo_phy-cur_anfc_0.083deg_P1D-m", variable = "sea_water_velocity", region = c(-1, 50, 10, 55), timerange = c("2021-01-01 UTC", "2021-01-02 UTC"), verticalrange = c(0, -2) ) mydata <- stars::read_stars(destination) plot(mydata["vo"]) ## End(Not run)
Contact Copernicus Marine login page and check if login is successful.
cms_login( username = getOption("CopernicusMarine_uid", ""), password = getOption("CopernicusMarine_pwd", "") )
cms_login( username = getOption("CopernicusMarine_uid", ""), password = getOption("CopernicusMarine_pwd", "") )
username |
Your Copernicus marine user name. Can be provided as
|
password |
Your Copernicus marine password. Can be provided as
|
This function will return a logical value indicating if the login is successful. It can be used to test your account details.
Returns a logical
value indicating if the login is successful.
The response from the login page is returned as an attribute named response
.
Pepijn de Vries
## Not run: ## This will return FALSE if you have not set your account details with 'options'. ## If you have specified your account details and there are no other problems, ## it will return TRUE. copernicus_login() ## End(Not run)
## Not run: ## This will return FALSE if you have not set your account details with 'options'. ## If you have specified your account details and there are no other problems, ## it will return TRUE. copernicus_login() ## End(Not run)
Obtain details for a specific Copernicus marine product. This can be narrowed down to specific layers and/or variables within the product.
cms_product_details( product, layer, variable, variant = c("", "detailed-v2", "detailed-v3") )
cms_product_details( product, layer, variable, variant = c("", "detailed-v2", "detailed-v3") )
product |
An identifier (type |
layer |
The name of a desired layer within a product (type |
variable |
The name of a desired variable in a specific layer of a product (type |
variant |
A |
Returns a named list
with properties of the requested product.
Pepijn de Vries
Other product-functions:
cms_cite_product()
,
cms_product_metadata()
,
cms_product_services()
,
cms_products_list()
,
copernicus_cite_product()
,
copernicus_product_details()
,
copernicus_product_metadata()
,
copernicus_products_list()
cms_product_details("GLOBAL_ANALYSISFORECAST_PHY_001_024") cms_product_details( product = "GLOBAL_ANALYSISFORECAST_PHY_001_024", layer = "cmems_mod_glo_phy-thetao_anfc_0.083deg_P1D-m", variable = "thetao" )
cms_product_details("GLOBAL_ANALYSISFORECAST_PHY_001_024") cms_product_details( product = "GLOBAL_ANALYSISFORECAST_PHY_001_024", layer = "cmems_mod_glo_phy-thetao_anfc_0.083deg_P1D-m", variable = "thetao" )
Collect meta information, such as vocabularies used, for specific Copernicus marine products
cms_product_metadata(product, type = c("list", "xml"))
cms_product_metadata(product, type = c("list", "xml"))
product |
An identifier (type |
type |
A |
Returns a named list
(when type = "list"
) with info about the requested product
.
Returns the same info as xml_document
(see xml2::xml_new_document()
) when type = "xml"
.
Returns NULL
when contacting Copernicus fails.
Pepijn de Vries
Other product-functions:
cms_cite_product()
,
cms_product_details()
,
cms_product_services()
,
cms_products_list()
,
copernicus_cite_product()
,
copernicus_product_details()
,
copernicus_product_metadata()
,
copernicus_products_list()
cms_product_metadata("GLOBAL_ANALYSISFORECAST_PHY_001_024")
cms_product_metadata("GLOBAL_ANALYSISFORECAST_PHY_001_024")
Obtain an overview of services provided by Copernicus for a specific marine product.
cms_product_services(product)
cms_product_services(product)
product |
An identifier (type |
Returns a tibble
with a list of available services for a
Copernicus marine product
.
Pepijn de Vries
Other product-functions:
cms_cite_product()
,
cms_product_details()
,
cms_product_metadata()
,
cms_products_list()
,
copernicus_cite_product()
,
copernicus_product_details()
,
copernicus_product_metadata()
,
copernicus_products_list()
cms_product_services("GLOBAL_ANALYSISFORECAST_PHY_001_024")
cms_product_services("GLOBAL_ANALYSISFORECAST_PHY_001_024")
Collect a list of products and some brief descriptions for marine products available from Copernicus
cms_products_list(..., info_type = c("list", "meta"))
cms_products_list(..., info_type = c("list", "meta"))
... |
Allows you to pass (search) query parameters to apply to the list. When omitted, the full list of products is returned. |
info_type |
One of |
Returns a tibble
of products available from https://data.marine.copernicus.eu or
a named list
when info_type = "meta"
. Returns NULL
in case on-line services are
unavailable.
Pepijn de Vries
Other product-functions:
cms_cite_product()
,
cms_product_details()
,
cms_product_metadata()
,
cms_product_services()
,
copernicus_cite_product()
,
copernicus_product_details()
,
copernicus_product_metadata()
,
copernicus_products_list()
cms_products_list() ## Query a specific product: cms_products_list(freeText = "GLOBAL_ANALYSISFORECAST_PHY_001_024")
cms_products_list() ## Query a specific product: cms_products_list(freeText = "GLOBAL_ANALYSISFORECAST_PHY_001_024")
Functions for retrieving Web Map Tile Services infromation for
specific products, layers and variables and add them to a leaflet
map.
cms_wmts_details(product, layer, variable) addCmsWMTSTiles( map, product, layer, variable, tilematrixset = "EPSG:3857", options = leaflet::WMSTileOptions(format = "image/png", transparent = TRUE), ... ) cms_wmts_get_capabilities(product, layer, variable, type = c("list", "xml"))
cms_wmts_details(product, layer, variable) addCmsWMTSTiles( map, product, layer, variable, tilematrixset = "EPSG:3857", options = leaflet::WMSTileOptions(format = "image/png", transparent = TRUE), ... ) cms_wmts_get_capabilities(product, layer, variable, type = c("list", "xml"))
product |
An identifier (type |
layer |
The name of a desired layer within a product (type |
variable |
The name of a desired variable in a specific layer of a product (type |
map |
A map widget object created from |
tilematrixset |
A |
options |
Passed on to |
... |
Passed on to |
type |
A |
cms_wmts_details
returns a tibble with detains on the WMTS service.
cms_wmts_getcapabilities
returns either a list
or xml_document
depending on the value
of type
. AddCmsWMTSTiles
returns a leaflet
map
updated with the requested tiles.
Pepijn de Vries
cms_wmts_details( product = "GLOBAL_ANALYSISFORECAST_PHY_001_024", layer = "cmems_mod_glo_phy-thetao_anfc_0.083deg_P1D-m", variable = "thetao" ) cms_wmts_get_capabilities("GLOBAL_ANALYSISFORECAST_PHY_001_024") if (interactive()) { leaflet::leaflet() |> leaflet::setView(lng = 3, lat = 54, zoom = 4) |> leaflet::addProviderTiles("Esri.WorldImagery") |> addCmsWMTSTiles( product = "GLOBAL_ANALYSISFORECAST_PHY_001_024", layer = "cmems_mod_glo_phy-thetao_anfc_0.083deg_P1D-m", variable = "thetao") }
cms_wmts_details( product = "GLOBAL_ANALYSISFORECAST_PHY_001_024", layer = "cmems_mod_glo_phy-thetao_anfc_0.083deg_P1D-m", variable = "thetao" ) cms_wmts_get_capabilities("GLOBAL_ANALYSISFORECAST_PHY_001_024") if (interactive()) { leaflet::leaflet() |> leaflet::setView(lng = 3, lat = 54, zoom = 4) |> leaflet::addProviderTiles("Esri.WorldImagery") |> addCmsWMTSTiles( product = "GLOBAL_ANALYSISFORECAST_PHY_001_024", layer = "cmems_mod_glo_phy-thetao_anfc_0.083deg_P1D-m", variable = "thetao") }
Get details for properly citing a Copernicus product.
copernicus_cite_product(product)
copernicus_cite_product(product)
product |
An identifier (type |
Returns a vector of character strings. The first element is always the product title, id and doi. Remaining elements are other associated references. Note that the remaining references are returned as listed at Copernicus. Note that the citing formatting does not appear to be standardised.
Pepijn de Vries
Other product-functions:
cms_cite_product()
,
cms_product_details()
,
cms_product_metadata()
,
cms_product_services()
,
cms_products_list()
,
copernicus_product_details()
,
copernicus_product_metadata()
,
copernicus_products_list()
## Not run: copernicus_cite_product("SST_MED_PHY_SUBSKIN_L4_NRT_010_036") ## End(Not run)
## Not run: copernicus_cite_product("SST_MED_PHY_SUBSKIN_L4_NRT_010_036") ## End(Not run)
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 )
copernicus_download_motu( username = getOption("CopernicusMarine_uid", ""), password = getOption("CopernicusMarine_pwd", ""), destination, product, layer, variable, output, region, timerange, verticalrange, sub_variables, overwrite = FALSE )
username |
Your Copernicus marine user name. Can be provided as
|
password |
Your Copernicus marine password. Can be provided as
|
destination |
File or path where the requested file will be downloaded to. |
product |
An identifier (type |
layer |
The name of a desired layer within a product (type |
variable |
The name of a desired variable in a specific layer of a product (type |
output |
File type for the output. |
region |
Specification of the bounding box as a |
timerange |
A |
verticalrange |
A |
sub_variables |
A |
overwrite |
A |
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)
## 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)
Full marine data sets can be downloaded using the File Transfer Protocol (FTP). Use these functions to list download locations and get the files.
copernicus_ftp_list( product, layer, username = getOption("CopernicusMarine_uid", ""), password = getOption("CopernicusMarine_pwd", ""), recursive = TRUE, subdir = NULL ) copernicus_ftp_get( url, destination, show_progress = TRUE, overwrite = FALSE, username = getOption("CopernicusMarine_uid", ""), password = getOption("CopernicusMarine_pwd", "") )
copernicus_ftp_list( product, layer, username = getOption("CopernicusMarine_uid", ""), password = getOption("CopernicusMarine_pwd", ""), recursive = TRUE, subdir = NULL ) copernicus_ftp_get( url, destination, show_progress = TRUE, overwrite = FALSE, username = getOption("CopernicusMarine_uid", ""), password = getOption("CopernicusMarine_pwd", "") )
product |
An identifier (type |
layer |
The name of a desired layer within a product (type |
username |
Your Copernicus marine user name. Can be provided as
|
password |
Your Copernicus marine password. Can be provided as
|
recursive |
A |
subdir |
A |
url |
The URL of the file to be downloaded. Obtain this URL with
|
destination |
File or path where the requested file will be downloaded to. |
show_progress |
A |
overwrite |
A |
In case of copernicus_ftp_list
a tibble
is returned containing available URLs
(for the specified product and layer) and some meta information is returned.
In case of copernicus_ftp_get
an invisible logical
value is returned, indicating whether
the requested file is successfully stored at the destination
path.
Pepijn de Vries
## Not run: ## Assuming that Copernicus account details are provided as `options` cop_ftp_files <- copernicus_ftp_list("GLOBAL_OMI_WMHE_heattrp") destination <- tempdir() copernicus_ftp_get(cop_ftp_files$url[[1]], destination) ## End(Not run)
## Not run: ## Assuming that Copernicus account details are provided as `options` cop_ftp_files <- copernicus_ftp_list("GLOBAL_OMI_WMHE_heattrp") destination <- tempdir() copernicus_ftp_get(cop_ftp_files$url[[1]], destination) ## End(Not run)
This login method is only used by the
download methods that are deprecated by Copernicus Marine Services. Use
cms_login()
instead.
copernicus_login( username = getOption("CopernicusMarine_uid", ""), password = getOption("CopernicusMarine_pwd", "") )
copernicus_login( username = getOption("CopernicusMarine_uid", ""), password = getOption("CopernicusMarine_pwd", "") )
username |
Your Copernicus marine user name. Can be provided as
|
password |
Your Copernicus marine password. Can be provided as
|
Returns a logical
value indicating if the login is successful.
The response from the login page is returned as an attribute named response
.
Pepijn de Vries
## Not run: ## This will return FALSE if you have not set your account details with 'options'. ## If you have specified your account details and there are no other problems, ## it will return TRUE. copernicus_login() ## End(Not run)
## Not run: ## This will return FALSE if you have not set your account details with 'options'. ## If you have specified your account details and there are no other problems, ## it will return TRUE. copernicus_login() ## End(Not run)
Obtain details for a specific Copernicus marine product. This can be narrowed down to specific layers and/or variables within the product.
copernicus_product_details(product, layer, variable)
copernicus_product_details(product, layer, variable)
product |
An identifier (type |
layer |
The name of a desired layer within a product (type |
variable |
The name of a desired variable in a specific layer of a product (type |
Returns a named list
with properties of the requested product.
Pepijn de Vries
Other product-functions:
cms_cite_product()
,
cms_product_details()
,
cms_product_metadata()
,
cms_product_services()
,
cms_products_list()
,
copernicus_cite_product()
,
copernicus_product_metadata()
,
copernicus_products_list()
## Not run: copernicus_product_details("GLOBAL_ANALYSISFORECAST_PHY_001_024") copernicus_product_details( product = "GLOBAL_ANALYSISFORECAST_PHY_001_024", layer = "cmems_mod_glo_phy-thetao_anfc_0.083deg_P1D-m", variable = "thetao" ) ## End(Not run)
## Not run: copernicus_product_details("GLOBAL_ANALYSISFORECAST_PHY_001_024") copernicus_product_details( product = "GLOBAL_ANALYSISFORECAST_PHY_001_024", layer = "cmems_mod_glo_phy-thetao_anfc_0.083deg_P1D-m", variable = "thetao" ) ## End(Not run)
Deprecated. Use cms_product_metadata()
instead.
copernicus_product_metadata(product)
copernicus_product_metadata(product)
product |
An identifier (type |
Collect meta information, such as vocabularies used, for specific Copernicus marine products
Returns a named list
with info about the requested product
. Returns NULL
when contacting Copernicus fails.
Pepijn de Vries
Other product-functions:
cms_cite_product()
,
cms_product_details()
,
cms_product_metadata()
,
cms_product_services()
,
cms_products_list()
,
copernicus_cite_product()
,
copernicus_product_details()
,
copernicus_products_list()
## Not run: copernicus_product_metadata("GLOBAL_ANALYSISFORECAST_PHY_001_024") ## End(Not run)
## Not run: copernicus_product_metadata("GLOBAL_ANALYSISFORECAST_PHY_001_024") ## End(Not run)
Obtain an overview of services provided by Copernicus for a specific marine product.
copernicus_product_services(product)
copernicus_product_services(product)
product |
An identifier (type |
Returns a tibble
with a list of available services for a
Copernicus marine product
Pepijn de Vries
## Not run: copernicus_product_services("GLOBAL_ANALYSISFORECAST_PHY_001_024") ## End(Not run)
## Not run: copernicus_product_services("GLOBAL_ANALYSISFORECAST_PHY_001_024") ## End(Not run)
Collect a list of products and some brief descriptions for marine products available from Copernicus
copernicus_products_list(..., info_type = c("list", "meta"))
copernicus_products_list(..., info_type = c("list", "meta"))
... |
Allows you to pass (search) query parameters to apply to the list. When omitted, the full list of products is returned. |
info_type |
One of |
Returns a tibble
of products available from https://data.marine.copernicus.eu or
a named list
when info_type = "meta"
. Returns NULL
in case on-line services are
unavailable.
Pepijn de Vries
Other product-functions:
cms_cite_product()
,
cms_product_details()
,
cms_product_metadata()
,
cms_product_services()
,
cms_products_list()
,
copernicus_cite_product()
,
copernicus_product_details()
,
copernicus_product_metadata()
## Not run: copernicus_products_list() ## Query a specific product: copernicus_products_list(freeText = "GLOBAL_ANALYSISFORECAST_PHY_001_024") ## End(Not run)
## Not run: copernicus_products_list() ## Query a specific product: copernicus_products_list(freeText = "GLOBAL_ANALYSISFORECAST_PHY_001_024") ## End(Not run)
Web Map Services are not available for all products and layers. Use this function to obtain URLs of WMS services if any.
copernicus_wms_details(product, layer, variable)
copernicus_wms_details(product, layer, variable)
product |
An identifier (type |
layer |
The name of a desired layer within a product (type |
variable |
The name of a desired variable in a specific layer of a product (type |
Returns a tibble
with WMS URLs and descriptors for the specified product.
WMS functions don't work on systems that don't support GDAL utils
Pepijn de Vries
Other wms-functions:
addCopernicusWMSTiles()
,
copernicus_wms2geotiff()
## Not run: copernicus_wms_details( product = "GLOBAL_ANALYSISFORECAST_PHY_001_024", layer = "cmems_mod_glo_phy-thetao_anfc_0.083deg_P1D-m", variable = "thetao" ) ## End(Not run)
## Not run: copernicus_wms_details( product = "GLOBAL_ANALYSISFORECAST_PHY_001_024", layer = "cmems_mod_glo_phy-thetao_anfc_0.083deg_P1D-m", variable = "thetao" ) ## End(Not run)
This function interacts with deprecated Copernicus Marine
Services. It will become .Defunct()
in future versions. Extract and store imagery from a
Copernicus WMS as a geo-referenced TIFF.
copernicus_wms2geotiff( product, layer, variable, region, destination, width, height )
copernicus_wms2geotiff( product, layer, variable, region, destination, width, height )
product |
An identifier (type |
layer |
The name of a desired layer within a product (type |
variable |
The name of a desired variable in a specific layer of a product (type |
region |
Specification of the bounding box as a |
destination |
File name for the geo-referenced TIFF. |
width |
Width in pixels of the TIFF image. |
height |
Height in pixels of the TIFF image. |
A Web Map Service (WMS) cannot be plotted directly (base, ggplot2 and/or lattice). For that purpose you need to extract and download a specific region in a format that can be handled by plots. You can use this function to store a subset of a WMS map as a geo-referenced TIFF file.
Stores the file as destination
and returns invisible NULL
WMS functions don't work on systems that don't support GDAL utils
Pepijn de Vries
Other wms-functions:
addCopernicusWMSTiles()
,
copernicus_wms_details()
## Not run: destination <- tempfile("wms", fileext = ".tiff") copernicus_wms2geotiff( product = "GLOBAL_ANALYSISFORECAST_PHY_001_024", layer = "cmems_mod_glo_phy-thetao_anfc_0.083deg_P1D-m", variable = "thetao", region = c(-1, 50, 7, 60), destination = destination, width = 1920, height = 1080 ) ## End(Not run)
## Not run: destination <- tempfile("wms", fileext = ".tiff") copernicus_wms2geotiff( product = "GLOBAL_ANALYSISFORECAST_PHY_001_024", layer = "cmems_mod_glo_phy-thetao_anfc_0.083deg_P1D-m", variable = "thetao", region = c(-1, 50, 7, 60), destination = destination, width = 1920, height = 1080 ) ## End(Not run)