View source: R/hotssea-all-variables.R
hotssea_all_variables | R Documentation |
This downloads (in parallel by default) all 40 HOTSSea model results from https://zenodo.org/records/14027261 (as specified in [get_zenodo_data()] to your local folder given by 'paste0(pacea_cache(), "/hotssea")'. Each file is around 3-9Mb, and so downloading them all may take a few minutes or possibly longer. You can check your cache folder for progress to see them appearing there. The download is done in parallel (by default). Speed depends on network speed and number of cores.
hotssea_all_variables(
variables = c("temperature", "salinity"),
run_parallel = TRUE,
timeout_value = 14400
)
variables |
character Either 'c("temperature", "salinity")', '"temperature"', or '"salinity"', describing what variables to download. Given the potentially long download times, some people may just want temperature or salinity only. |
run_parallel |
logical Run the downloads in parallel using 'parallel::foreach()'. |
timeout_value |
numeric Timeout (seconds) for downloading a single file from the internet. Gets used by [zen4R::download_zenodo()] via [get_zenodo_data()]. Try increasing if get an Error saying Timeout has been reached. If it says 'Timeout of 60 seconds' then 'timeout_value' is not getting used (the default is 4 hours). Maybe try the manual download option above. |
You can or set 'variables' to "temperature" or "salinity" if you only want one of those types of model output. Or you can just download the individual files you definitely need, see [?hotssea_bottom_temperature_max]. Remember the downloading is a one-time exercise (hence it's desirable to get all files at once) and then you will have the files locally for all eternity (ish).
If this function fails, you can try rerunning it; it will not re-download any that were successful and this worked for someone testing it. Else you could then also try 'hotssea_all_variables(run_parallel = FALSE)', or typing 'options(timeout = 1200)' (or higher) especially if running from the Pacific Biological Station. This function is particularly hard to test independently under different scenarios. An alternative if you are at the Pacific Biological Station is the 1990s solution of getting Andy to copy the files to an external drive for you.
Or you can just download them manually (download all) from the Zenodo site given above) and put them in 'paste0(pacea_cache(), "/hotssea")'.
Type 'hotssea_data' to view the full list of available variables. See help files for specific variables for more details on HOTSSea model results, e.g. [?hotssea_bottom_temperature_max].
Also see the hotssea vignette.
downloaded files to 'paste0(pacea_cache(), "/hotssea")' directory.
Andrew Edwards and Travis Tai
Oldford, G.L., Jarníková, T., Christensen, V., and Dunphy, M. (in review). HOTSSea v1: a NEMO-based physical Hindcast of the Salish Sea (1980–2018) supporting ecosystem model development. Preprint. https://doi.org/10.5194/gmd-2024-58
## Not run:
hotssea_all_variables()
plot(hotssea_avg150toBot_temperature_min())
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.