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-05-04 00:00:05 2020   5   4    0   0  5.0004    287.7050      0.00871
## 2 2020-05-04 00:00:10 2020   5   4    0   0 10.0008    287.8161      0.00871
## 3 2020-05-04 00:00:15 2020   5   4    0   0 15.0012    287.9155      0.00871
## 4 2020-05-04 00:00:20 2020   5   4    0   0 20.0016    288.0055      0.00871
## 5 2020-05-04 00:00:24 2020   5   4    0   0 24.9984    288.0884      0.00871
## 6 2020-05-04 00:00:29 2020   5   4    0   0 29.9988    288.1658      0.00871
##    U_WIND  V_WIND Wind.Speed Wind.Direction Station
## 1 1.19663 3.46634   3.667075       199.0454     JFK
## 2 1.14768 3.31912   3.511941       199.0743     JFK
## 3 1.10558 3.20617   3.391435       199.0257     JFK
## 4 1.07122 3.10672   3.286217       199.0246     JFK
## 5 1.04305 3.02173   3.196687       199.0438     JFK
## 6 1.01926 2.95210   3.123105       199.0481     JFK
##             Date.Time year mon day hour min     sec Temperature Mixing.Ratio
## 1 2020-05-03 00:00:05 2020   5   3    0   0  5.0004    287.0620      0.00694
## 2 2020-05-03 00:00:10 2020   5   3    0   0 10.0008    287.1412      0.00694
## 3 2020-05-03 00:00:15 2020   5   3    0   0 15.0012    287.2129      0.00694
## 4 2020-05-03 00:00:20 2020   5   3    0   0 20.0016    287.2779      0.00694
## 5 2020-05-03 00:00:24 2020   5   3    0   0 24.9984    287.3379      0.00694
## 6 2020-05-03 00:00:29 2020   5   3    0   0 29.9988    287.3940      0.00694
##    U_WIND  V_WIND Wind.Speed Wind.Direction Station
## 1 2.13945 2.40621   3.219797       221.6415     JFK
## 2 2.09414 2.31089   3.118595       222.1830     JFK
## 3 2.05428 2.23695   3.037106       222.5625     JFK
## 4 2.01637 2.17141   2.963236       222.8798     JFK
## 5 1.98697 2.11307   2.900537       223.2384     JFK
## 6 1.96479 2.06441   2.849945       223.5837     JFK
##             Date.Time year mon day hour min     sec Temperature Mixing.Ratio
## 1 2020-05-02 00:00:05 2020   5   2    0   0  5.0004    288.3958      0.00855
## 2 2020-05-02 00:00:10 2020   5   2    0   0 10.0008    288.4334      0.00855
## 3 2020-05-02 00:00:15 2020   5   2    0   0 15.0012    288.4677      0.00855
## 4 2020-05-02 00:00:20 2020   5   2    0   0 20.0016    288.4972      0.00856
## 5 2020-05-02 00:00:24 2020   5   2    0   0 24.9984    288.5255      0.00856
## 6 2020-05-02 00:00:29 2020   5   2    0   0 29.9988    288.5551      0.00856
##    U_WIND   V_WIND Wind.Speed Wind.Direction Station
## 1 1.32812 -2.08345   2.470762       327.4840     JFK
## 2 1.32177 -2.05464   2.443076       327.2464     JFK
## 3 1.31379 -2.01124   2.402318       326.8465     JFK
## 4 1.31710 -1.96317   2.364062       326.1422     JFK
## 5 1.30626 -1.93882   2.337806       326.0303     JFK
## 6 1.29717 -1.91939   2.316616       325.9482     JFK
##   Station           Date.Time Temperature Relative.Humidity Wind.Direction
## 1     JFK 2020-05-03 00:00:00         NaN               NaN            230
## 2     JFK 2020-05-03 00:05:00         NaN               NaN            230
## 3     JFK 2020-05-03 00:10:00         NaN               NaN            230
## 4     JFK 2020-05-03 00:15:00         NaN               NaN            230
## 5     JFK 2020-05-03 00:20:00         NaN               NaN            240
## 6     JFK 2020-05-03 00:25:00         NaN               NaN            240
##   Wind.Speed year mon day hour min sec
## 1   5.658436 2020   5   3    0   0   0
## 2   5.658436 2020   5   3    0   5   0
## 3   5.658436 2020   5   3    0  10   0
## 4   5.658436 2020   5   3    0  15   0
## 5   5.658436 2020   5   3    0  20   0
## 6   5.144033 2020   5   3    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.312 1.085 0.938
2 WRF D-1 -0.069 2.178 1.736
3 WRF D-2 -0.956 1.800 1.398
JFK - WRF 10-m Wind Speed (m/s) Performance
Forecast.Init BIAS RMSE MAE
1 WRF D-0 -1.411 2.698 2.085
2 WRF D-1 -0.528 3.137 2.509
3 WRF D-2 -1.028 3.295 2.730
JFK - WRF 10-m Wind Direction (degN) Performance
Forecast.Init RMSE MAE
1 WRF D-0 68.983 50.626
2 WRF D-1 80.929 62.348
3 WRF D-2 81.358 61.536

Forecast Hour Evaluation for LGA

LGA - WRF 2-m Temperature (K) Performance
Forecast.Init BIAS RMSE MAE
1 WRF D-0 -0.478 1.593 1.319
2 WRF D-1 -1.380 2.038 1.632
3 WRF D-2 -2.250 2.646 2.322
LGA - WRF 10-m Wind Speed (m/s) Performance
Forecast.Init BIAS RMSE MAE
1 WRF D-0 -2.797 3.558 2.959
2 WRF D-1 -2.446 3.640 2.940
3 WRF D-2 -2.711 3.913 3.368
LGA - WRF 10-m Wind Direction (degN) Performance
Forecast.Init RMSE MAE
1 WRF D-0 61.702 42.812
2 WRF D-1 60.631 44.939
3 WRF D-2 72.141 53.453

Forecast Hour Evaluation for NYC

NYC - WRF 2-m Temperature (K) Performance
Forecast.Init BIAS RMSE MAE
1 WRF D-0 -0.057 1.094 0.938
2 WRF D-1 -0.964 2.084 1.784
3 WRF D-2 -1.681 2.237 1.852
NYC - WRF 10-m Wind Speed (m/s) Performance
Forecast.Init BIAS RMSE MAE
1 WRF D-0 -1.683 2.348 1.924
2 WRF D-1 -1.587 2.260 1.897
3 WRF D-2 -1.665 2.392 1.981
NYC - WRF 10-m Wind Direction (degN) Performance
Forecast.Init RMSE MAE
1 WRF D-0 40.728 36.843
2 WRF D-1 44.638 37.482
3 WRF D-2 52.969 41.113

uWRF and ASOS Time-Series Visualization

Temperature

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

Wind Speed

Wind Direction