View source: R/cms_download_native.R
cms_download_native | R Documentation |
Full marine data sets can be downloaded using the functions
documented here. Use
cms_list_native_files()
to list available files, and
cms_download_native()
to download specific files. Files are usually organised per product,
layer, year, month and day.
cms_download_native(destination, product, layer, pattern, progress = TRUE, ...)
cms_list_native_files(product, layer, pattern, ...)
destination |
Path where to store the downloaded file(s). |
product |
An identifier (type |
layer |
The name of a desired layer within a product (type |
pattern |
A regular expression (regex)
pattern. Only paths that match the pattern will be returned. It can be used
to select specific files. For instance if |
progress |
A |
... |
Ignored |
Returns NULL
invisibly.
Pepijn de Vries
if (interactive()) {
cms_list_native_files(
product = "GLOBAL_ANALYSISFORECAST_PHY_001_024",
layer = "cmems_mod_glo_phy_anfc_0.083deg_PT1H-m",
pattern = "2022/06/"
)
## Use 'pattern' to download a file for a specific day:
cms_download_native(
destination = tempdir(),
product = "GLOBAL_ANALYSISFORECAST_PHY_001_024",
layer = "cmems_mod_glo_phy_anfc_0.083deg_PT1H-m",
pattern = "m_20220630"
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.