View source: R/get-zenodo-data.R
get_zenodo_data | R Documentation |
HOTSSea and full BCCM model results have been wrangled from the original results and are hosted on Zenodo due to large filesizes. This function downloads an individual file and puts it in the appropriate cache on a user's local computer. Users should use the functions that call this, see [hotssea_all_variables()] and [bccm_all_variables_full()], and also the help for invidual functions such as [hotssea_surface_salinity_min()] and [bccm_bottom_temperature_full()].
get_zenodo_data(
layer,
update = FALSE,
ask = interactive(),
force = FALSE,
version = "01",
cache_subfolder,
zenodo_doi = "10.5281/zenodo.14027261",
timeout_value = 7200
)
layer |
Name of the data object. |
update |
Logical. Would you like to check for a newer version of the layer? |
ask |
Logical. Should the user be asked before downloading the data to local cache? Defaults to the value of interactive(). |
force |
Logical. Should download of data be forced? Overrides 'ask' argument if TRUE. Does not force a download if the file is already cached locally. |
version |
Character. Version number of data on Zenodo (as in what is appended at the end of the filenames). |
cache_subfolder |
Character. The folder 'paste0(pacea::pacea_cache(), cache_subfolder)' will be searched first for the desired model output file, and if the no file is there then it will be downloaded from Zenodo into this directory. Is set to 'hotssea' but gets automatically changed to 'bccm_full' if 'layer' contains 'bccm' and 'full'. |
zenodo_doi |
character. The DOI of the zenodo record to download files from. Default is for 'hotssea' but gets automatically changed to the DOI for 'bccm_full' if 'layer' contains 'bccm' and 'full'. |
timeout_value |
numeric Timeout (seconds) for downloading a file from the internet. Gets used in [zen4R::download_zenodo()]. |
Notes to keep track (for developers): The Zenodo links are: - 14019141 will always point to the latest version - 14019142 is the test ones at 200 km resolution - 14027261 is the latest version uploaded to Zenodo, and what we want. Sohttps://doi.org/10.5281/zenodo.14019141 does go to https://zenodo.org/records/14027261, but when people try it seems that the zen4R code is ending up at the ...142 version (using the token in a different way maybe). So, given ...141 wasn't working here for the default, am changing it to ...261 and so it will need manually updating in future if we update (or increment the version number).
Based on [get_bccm_data()], but getting from Zenodo not 'pacea-data/'.
Data object requested
Andrew Edwards and Travis Tai
## Not run:
h <- get_zenodo_data("hotssea_surface_temperature_max")
plot(h)
b <- get_zenodo_data("bccm_bottom_oxygen_full") # Only took 20 seconds on
home network, for a 108Mb file.
plot(b)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.