Created
March 3, 2021 23:57
-
-
Save cboettig/8316df8ae9fe2d38865e4bfcdd73a7ce to your computer and use it in GitHub Desktop.
access EFI NOAA data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```{r setup} | |
library(tidync) | |
``` | |
Today's (2021-03-03) 16-day forecast made for ABBY NEON site at 6h-intervals: (other intervals and older forecasts also possible) | |
```{r} | |
download.file("https://data.ecoforecast.org/drivers/noaa/NOAAGEFS_6hr/ABBY/2021-03-03/12/NOAAGEFS_6hr_ABBY_2021-03-03T00_2021-03-19T12_ens00.nc", "~/NOAAGEFS_6hr_ABBY_2021-03-03T00_2021-03-19T12_ens00.nc") | |
``` | |
```{r} | |
library(RNetCDF) | |
print.nc(open.nc("~/NOAAGEFS_6hr_ABBY_2021-03-03T00_2021-03-19T12_ens00.nc")) | |
``` | |
```{r} | |
nc <- tidync::tidync("~/NOAAGEFS_6hr_ABBY_2021-03-03T00_2021-03-19T12_ens00.nc") | |
nc | |
``` | |
```{r} | |
nc$variable | |
``` | |
data at the ABBY lat/long for | |
```{r} | |
df <- nc %>% hyper_tibble() | |
df | |
``` | |
```{r} | |
# forecasts go 16 days into future | |
max(df$time) / 24 | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment