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,
prefix,
progress = TRUE,
...
)
cms_list_native_files(product, layer, pattern, prefix, max = Inf, ...)
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 |
prefix |
A |
progress |
A |
... |
Ignored |
max |
A maximum number of records to be returned. |
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",
prefix = "2022/06/"
)
## If you omit the prefix, you may want to limit the
## number of results by setting `max`
cms_list_native_files(
product = "GLOBAL_ANALYSISFORECAST_PHY_001_024",
layer = "cmems_mod_glo_phy_anfc_0.083deg_PT1H-m",
max = 10
)
## Prefix can be omitted when not relevant:
cms_list_native_files(product = "SEALEVEL_GLO_PHY_MDT_008_063")
## 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",
prefix = "2022/06/",
pattern = "m_20220630"
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.