Introduction

In this document I will explore how to create the first part of the evaluation system I proposed. The working title of this is the “Forecast-Hour Evaluation.” The idea here is that we are looking at the performance of the model by looking at how it performed with different start times (using the most recent 00-hr forecast as input).

## Warning in rgl.init(initValue, onlyNULL): RGL: unable to open X11 display
## Warning: 'rgl.init' failed, running with 'rgl.useNULL = TRUE'.

Read Model and Observation Data

Read WRF Data

For this evaluation system we need to look at three different output folders. Here we use the folders named, forecast_day_minus_0, forecast_day_minus_1, forecast_day_minus_2. The contents of each of these folders will be similar: wrfout files for 86 forecast hours and time-series data for different locations of interest. Here we will first read the forecast data.

Read the OBS Data

Now we will read the observation data from the ASOS stations. The script that downloads the data is in ./obs_station_day_minus_0/dl_ny_asos.py. The lines for the dates to download need to be changed before running it. Once the files are download, the lines below reads the data and adds column names.

Unit Conversion

Model and observation data do not share the same units for the same variable. For temperature, WRF is in Kelvin and ASOS is in degreesF. For winds, WRF is in m/s and ASOS is in knots. The formulas used to convert the numbers to a common system is shown here. For temperature I will use Kelvin, and m/s for wind speeds.

Combined Data Frames

Now we have one data frame for all the observations, and three (3) data frames of the WRF data (one data frame per forecast init time). The lines below provide a visual of the data frames.

##             Date.Time year mon day hour min     sec Temperature Mixing.Ratio
## 1 2020-07-27 00:00:05 2020   7  27    0   0  5.0004    303.1856      0.01413
## 2 2020-07-27 00:00:10 2020   7  27    0   0 10.0008    303.2060      0.01413
## 3 2020-07-27 00:00:15 2020   7  27    0   0 15.0012    303.2241      0.01413
## 4 2020-07-27 00:00:20 2020   7  27    0   0 20.0016    303.2395      0.01413
## 5 2020-07-27 00:00:24 2020   7  27    0   0 24.9984    303.2527      0.01413
## 6 2020-07-27 00:00:29 2020   7  27    0   0 29.9988    303.2641      0.01413
##    U_WIND  V_WIND Wind.Speed Wind.Direction Station
## 1 3.01805 0.67541   3.092702       257.3856     JFK
## 2 2.98021 0.65114   3.050514       257.6752     JFK
## 3 2.93443 0.64468   3.004412       257.6092     JFK
## 4 2.90709 0.61946   2.972356       257.9710     JFK
## 5 2.87335 0.60611   2.936581       258.0885     JFK
## 6 2.84116 0.59524   2.902844       258.1673     JFK
##             Date.Time year mon day hour min     sec Temperature Mixing.Ratio
## 1 2020-07-26 00:00:05 2020   7  26    0   0  5.0004    299.7292      0.01889
## 2 2020-07-26 00:00:10 2020   7  26    0   0 10.0008    299.8017      0.01889
## 3 2020-07-26 00:00:15 2020   7  26    0   0 15.0012    299.8618      0.01889
## 4 2020-07-26 00:00:20 2020   7  26    0   0 20.0016    299.9129      0.01889
## 5 2020-07-26 00:00:24 2020   7  26    0   0 24.9984    299.9566      0.01889
## 6 2020-07-26 00:00:29 2020   7  26    0   0 29.9988    299.9955      0.01889
##    U_WIND  V_WIND Wind.Speed Wind.Direction Station
## 1 0.90864 4.83350   4.918165       190.6467     JFK
## 2 0.83358 4.60276   4.677634       190.2653     JFK
## 3 0.78935 4.43366   4.503378       190.0949     JFK
## 4 0.75183 4.29829   4.363547       189.9215     JFK
## 5 0.72729 4.18675   4.249450       189.8546     JFK
## 6 0.70042 4.09501   4.154479       189.7061     JFK
##             Date.Time year mon day hour min     sec Temperature Mixing.Ratio
## 1 2020-07-25 00:00:05 2020   7  25    0   0  5.0004    297.8785      0.01777
## 2 2020-07-25 00:00:10 2020   7  25    0   0 10.0008    297.8979      0.01777
## 3 2020-07-25 00:00:15 2020   7  25    0   0 15.0012    297.9153      0.01777
## 4 2020-07-25 00:00:20 2020   7  25    0   0 20.0016    297.9312      0.01777
## 5 2020-07-25 00:00:24 2020   7  25    0   0 24.9984    297.9457      0.01776
## 6 2020-07-25 00:00:29 2020   7  25    0   0 29.9988    297.9628      0.01777
##     U_WIND  V_WIND Wind.Speed Wind.Direction Station
## 1 -0.19366 0.90123  0.9218024       167.8725     JFK
## 2 -0.19436 0.89258  0.9134960       167.7156     JFK
## 3 -0.18742 0.89084  0.9103418       168.1191     JFK
## 4 -0.19043 0.88544  0.9056862       167.8624     JFK
## 5 -0.18519 0.87600  0.8953610       168.0632     JFK
## 6 -0.18203 0.86297  0.8819593       168.0890     JFK
##   Station           Date.Time Temperature Relative.Humidity Wind.Direction
## 1     JFK 2020-07-26 00:00:00         NaN               NaN            190
## 2     JFK 2020-07-26 00:05:00         NaN               NaN            190
## 3     JFK 2020-07-26 00:10:00         NaN               NaN            190
## 4     JFK 2020-07-26 00:15:00         NaN               NaN            190
## 5     JFK 2020-07-26 00:20:00         NaN               NaN            190
## 6     JFK 2020-07-26 00:25:00         NaN               NaN            190
##   Wind.Speed year mon day hour min sec
## 1   6.687243 2020   7  26    0   0   0
## 2   5.658436 2020   7  26    0   5   0
## 3   5.658436 2020   7  26    0  10   0
## 4   6.687243 2020   7  26    0  15   0
## 5   6.687243 2020   7  26    0  20   0
## 6   6.687243 2020   7  26    0  25   0

Locations for Plots

Match Times for Model and Observations

Select Day of Interest

Time-matching is performed using a routine that can be found in Analysis01-Time_Matching_Problem.Rmd. The time matching will be done per variable. For the Forecast-Hour Evaluation product, we will focus on the temperature, wind speed and wind direction variables. Also, now that we have read all the TS data and ASOS data, we need to extract the day of interest, or doi for the time-series.

Note that for this product the “day of interest” will always be the UTC date of the day before.

We now have filtered data frames for the observations and model data for the day of interest.

Next, we will select only the temperature data for comparing the model and observations. This needs to be done on a per station basis. Note that we use the function drop_na() to drop rows which contain NaN or NA data. Since each variable is measured at different intervals, not all variables will have data available at every time step in the ASOS data. The functions may be too sensitive to missing data and thus we take care to remvove it here from the observations, after we have isolated a particular variable.

Temperature Time-Matching

Location: JFK

Location: LGA

Location: NYC

Wind Speed Time-Matching

Location: JFK

Location: LGA

Location: NYC

Wind Direction Time-Matching

Location: JFK

Location: LGA

Location: NYC

Forecast Hour Evaluation for JFK

For the temperature data I will use Bias, RMSE and MAE for the comparison statistics

JFK - WRF 2-m Temperature (K) Performance
Forecast.Init BIAS RMSE MAE
1 WRF D-0 0.331 1.598 1.338
2 WRF D-1 0.738 1.546 1.262
3 WRF D-2 0.103 1.317 1.107
JFK - WRF 10-m Wind Speed (m/s) Performance
Forecast.Init BIAS RMSE MAE
1 WRF D-0 -1.542 1.908 1.704
2 WRF D-1 -0.936 1.416 1.178
3 WRF D-2 -0.991 1.411 1.206
JFK - WRF 10-m Wind Direction (degN) Performance
Forecast.Init RMSE MAE
1 WRF D-0 19.943 16.151
2 WRF D-1 16.625 12.977
3 WRF D-2 16.684 13.799

Forecast Hour Evaluation for LGA

LGA - WRF 2-m Temperature (K) Performance
Forecast.Init BIAS RMSE MAE
1 WRF D-0 -0.620 1.553 1.420
2 WRF D-1 -0.649 1.517 1.431
3 WRF D-2 -1.164 1.818 1.633
LGA - WRF 10-m Wind Speed (m/s) Performance
Forecast.Init BIAS RMSE MAE
1 WRF D-0 -2.138 2.559 2.220
2 WRF D-1 -2.058 2.555 2.199
3 WRF D-2 -2.183 2.617 2.258
LGA - WRF 10-m Wind Direction (degN) Performance
Forecast.Init RMSE MAE
1 WRF D-0 26.064 18.511
2 WRF D-1 29.093 21.056
3 WRF D-2 29.773 21.170

Forecast Hour Evaluation for NYC

NYC - WRF 2-m Temperature (K) Performance
Forecast.Init BIAS RMSE MAE
1 WRF D-0 2.321 2.528 2.321
2 WRF D-1 2.132 2.411 2.132
3 WRF D-2 1.530 1.937 1.553
NYC - WRF 10-m Wind Speed (m/s) Performance
Forecast.Init BIAS RMSE MAE
1 WRF D-0 -1.328 1.802 1.564
2 WRF D-1 -1.319 1.841 1.597
3 WRF D-2 -1.327 1.835 1.596
NYC - WRF 10-m Wind Direction (degN) Performance
Forecast.Init RMSE MAE
1 WRF D-0 62.980 42.972
2 WRF D-1 62.079 41.671
3 WRF D-2 64.418 42.640

uWRF and ASOS Time-Series Visualization

Temperature

## Warning: Removed 288 rows containing missing values (geom_point).
## Warning: Removed 288 rows containing missing values (geom_path).

Wind Speed

Wind Direction