forked from seankross/bookdown-start
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathShared-Forecast-Drivers.qmd
141 lines (106 loc) · 5.54 KB
/
Shared-Forecast-Drivers.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# Meteorology Inputs {#sec-met}
We are downloading, subsetting, and processing forecasted meteorology drivers for each NEON site. Currently, we have NOAA's Global Ensemble Forecasting System (GEFS) V12 output available at the native time resolution and a 1 hr time resolution for each NEON site.
The following are important considerations when using the NOAA GEFS forecasts
- There are 31 ensemble members for each forecast.\
- The forecasts extend 35-days in the future.\
- We are downloading and processing the latest forecast each day.\
The following meteorological variables are included:
- air temperature\
- air pressure\
- wind speed\
- precipitation\
- downwelling longwave radiation\
- downwelling shortwave radiation\
- relative humidity\
The weather forecasts are available through an s3 bucket (see NOAA Global Ensemble Forecasting System below) and we provide an R functions code in the [neon4cast package](https://github.com/eco4cast/neon4cast) for downloading all the ensemble members for particular location and NEON site
```{r eval = FALSE}
remotes::install_github("eco4cast/neon4cast")
```
## NOAA Global Ensemble Forecasting System
### Stage 1
At each site, 31 ensemble member forecasts are provided at 3 hr intervals for the first 10 days, and 6 hr intervals for up to 35 days (840 hr horizon).
Forecasts include the following variables:
- TMP: temperature (C)\
- RH: Relative humidity (%)\
- PRES: Atmospheric pressure (Pa)\
- UGRD: U-component of wind speed (m/s)\
- VGRD: V-component of wind speed (m/s)\
- APCP: Total precipitation in interval (kg/m\^2)\
- DSWRF: Downward shortwave radiation flux in interval (W/m\^2)\
- DLWRF: Downward longwave radiation flux in interval (W/m\^2)\
All variables are given at height 2m above ground, surface, or 10 m above ground as indicated in height column. See https://www.nco.ncep.noaa.gov/pmb/products/gens/ for more details on GEFS variables and intervals.
Common ways to filter the data before running `collect()` include `reference_datetime`, `site_id`, `variable`, and `horizon`.
```{r eval = FALSE}
weather <- neon4cast::noaa_stage1()
# 5.7M rows of data:
weather |>
dplyr::filter(start_date == "2022-04-01") |>
dplyr::collect()
```
Stage 1 has the following columns:
`site_id: string` : NEON site ID\
`prediction: double` : forecasted value\
`variable: string` : weather variable\
`horizon: double` : number of hours in the future\
`family: string`: class of uncertainty (ensemble)\
`ensemble: int32` : ensemble member number\
`reference_datetime: timestamp[us, tz=UTC]`: datetime of horizon 0\
`forecast_valid: string`: period of time (in hours) that the predicted value applies\
`datetime: timestamp[us, tz=UTC]` : datetime of forecast\
`cycle: string`: hour of day that forecast was started
### Stage 2
Stage 2 is a processed version of Stage 1 and involves the following transforms of the data that may be useful for some modeling approaches:
- Fluxes are standardized to per second rates\
- Fluxes and states are interpolated to 1 hour intervals\
Variables are renamed to match CF conventions:
- TMP -\> air_temperature (K)\
- PRES -\> air_pressure (Pa)\
- RH -\> relative_humidity (proportion)\
- DLWRF -\> surface_downwelling_longwave_flux_in_air (W/m\^2)\
- DSWRF -\> surface_downwelling_shortwave_flux_in_air (W/m\^2)
- APCP -\> precipitation_flux (kg/(m\^2 s))\
- VGRD -\> eastward_wind (m/s)\
- UGRD -\> northward_wind (m/s)\
```{r eval = FALSE}
weather_1hr <- neon4cast::noaa_stage2()
weather_1hr |>
dplyr::filter(start_date == "2022-04-01" & site_id == "BART") |>
dplyr::collect()
```
Stage 2 has the following columns:
`site_id: string` : NEON site ID\
`prediction: double` : forecasted value\
`variable: string` : weather variable\
`horizon: double` : number of hours in the future\
`family: string`: class of uncertainty (ensemble)\
`parameter: int32` : ensemble member number\
`reference_datetime: timestamp[us, tz=UTC]`: datetime of horizon 0\
`datetime: timestamp[us, tz=UTC]` : datetime of forecast\
### Stage 3
Stage 3 can be viewed as the "historical" weather for site as simulated by NOAA GEFS. Stage 3 is useful for model training because it ensures that the magnitude and variability of the weather data used to train your model is similar to that in the NOAA GEFS weather forecast you may use as inputs to your forecast.
Stage 3 uses CF variable names and 1 hr interval
- air_temperature (K)\
- air_pressure (Pa)\
- relative_humidity (proportion)\
- surface_downwelling_longwave_flux_in_air (W/m\^2)\
- surface_downwelling_shortwave_flux_in_air (W/m\^2)
- precipitation_flux (kg/(m\^2 s))\
- eastward_wind (m/s)\
- northward_wind (m/s)\
```{r eval = FALSE}
weather_stage3 <- neon4cast::noaa_stage3()
weather_stage3 |>
dplyr::filter(site_id == "BART") |>
dplyr::collect()
```
Stage 3 has the following columns
`site_id: string` : NEON site ID\
`prediction: double` : forecasted value\
`variable: string` : weather variable\
`family: string`: class of uncertainty (ensemble)\
`parameter: int32` : ensemble member number\
`reference_datetime: timestamp[us, tz=UTC]`: always NA in Stage3
`datetime: timestamp[us, tz=UTC]` : datetime of forecast\
## Downloading of raw NOAA GEFS Forecasts
The documentation above describes how to access NOAA GEFS forecasts that we have subsetted for NEON sites. We recommend using this approach.
The code used to download and process the raw NOAA GEFS forecast from Amazon Web Services Registry of Open Data is available in the `gefs4cast` package found at [github.com/eco4cast/gefs4cast](https://github.com/eco4cast/gefs4cast)