Description Usage Arguments Value File storage References Examples
NOAA Extended Reconstructed Sea Surface Temperature (ERSST) data
1 |
year |
(numeric) A year. Must be > 1853. The max value is whatever the current year is. Required |
month |
A month, character or numeric. If single digit (e.g. 8), we add a zero in front (e.g., 08). Required |
overwrite |
(logical) To overwrite the path to store files in or not,
Default: |
... |
Curl options passed on to |
An ncdf4
object for now, may change output later to
perhaps a data.frame. See ncdf4 for parsing the output.
We use rappdirs to store files, see
user_cache_dir
for how we determine the directory on
your machine to save files to, and run
rappdirs::user_cache_dir("rnoaa/ersst")
to get that directory.
Files are quite small, so we don't worry about reading in cached data to save time, as we do in some of the other functions in this package.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
# October, 2015
ersst(year = 2015, month = 10)
# May, 2015
ersst(year = 2015, month = 5)
ersst(year = 2015, month = "05")
# February, 1890
ersst(year = 1890, month = 2)
# Process data
library("ncdf4")
res <- ersst(year = 1890, month = 2)
## varibles
names(res$var)
## get a variable
ncdf4::ncvar_get(res, "ssta")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.