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-07 00:00:05 2020   5   7    0   0  5.0004    281.0447      0.00536
## 2 2020-05-07 00:00:10 2020   5   7    0   0 10.0008    281.0729      0.00537
## 3 2020-05-07 00:00:15 2020   5   7    0   0 15.0012    281.0999      0.00537
## 4 2020-05-07 00:00:20 2020   5   7    0   0 20.0016    281.1263      0.00537
## 5 2020-05-07 00:00:24 2020   5   7    0   0 24.9984    281.1519      0.00537
## 6 2020-05-07 00:00:29 2020   5   7    0   0 29.9988    281.1773      0.00538
##     U_WIND   V_WIND Wind.Speed Wind.Direction Station
## 1 -0.76734 -0.86494   1.156258       41.57815     JFK
## 2 -0.74852 -0.84630   1.129826       41.49153     JFK
## 3 -0.73963 -0.83047   1.112085       41.68878     JFK
## 4 -0.73228 -0.81594   1.096354       41.90696     JFK
## 5 -0.73173 -0.80190   1.085575       42.38031     JFK
## 6 -0.72715 -0.79588   1.078041       42.41616     JFK
##             Date.Time year mon day hour min     sec Temperature Mixing.Ratio
## 1 2020-05-06 00:00:05 2020   5   6    0   0  5.0004    284.9117      0.00619
## 2 2020-05-06 00:00:10 2020   5   6    0   0 10.0008    284.9834      0.00619
## 3 2020-05-06 00:00:15 2020   5   6    0   0 15.0012    285.0485      0.00619
## 4 2020-05-06 00:00:20 2020   5   6    0   0 20.0016    285.1081      0.00620
## 5 2020-05-06 00:00:24 2020   5   6    0   0 24.9984    285.1633      0.00620
## 6 2020-05-06 00:00:29 2020   5   6    0   0 29.9988    285.2150      0.00620
##     U_WIND  V_WIND Wind.Speed Wind.Direction Station
## 1 -0.08240 2.30482   2.306292       177.9525     JFK
## 2 -0.09377 2.24738   2.249335       177.6108     JFK
## 3 -0.10545 2.19877   2.201297       177.2543     JFK
## 4 -0.11260 2.15324   2.156182       177.0065     JFK
## 5 -0.12106 2.11108   2.114548       176.7180     JFK
## 6 -0.12704 2.07366   2.077548       176.4942     JFK
##             Date.Time year mon day hour min     sec Temperature Mixing.Ratio
## 1 2020-05-05 00:00:05 2020   5   5    0   0  5.0004    285.5814      0.00510
## 2 2020-05-05 00:00:10 2020   5   5    0   0 10.0008    285.7219      0.00510
## 3 2020-05-05 00:00:15 2020   5   5    0   0 15.0012    285.8377      0.00510
## 4 2020-05-05 00:00:20 2020   5   5    0   0 20.0016    285.9331      0.00510
## 5 2020-05-05 00:00:24 2020   5   5    0   0 24.9984    286.0137      0.00510
## 6 2020-05-05 00:00:29 2020   5   5    0   0 29.9988    286.0836      0.00509
##    U_WIND   V_WIND Wind.Speed Wind.Direction Station
## 1 5.18231 -5.70611   7.708179       317.7542     JFK
## 2 5.04464 -5.44770   7.424677       317.1999     JFK
## 3 4.92823 -5.24456   7.196726       316.7811     JFK
## 4 4.82157 -5.06860   6.995587       316.4308     JFK
## 5 4.71896 -4.91857   6.816224       316.1865     JFK
## 6 4.62266 -4.78693   6.654599       316.0002     JFK
##   Station           Date.Time Temperature Relative.Humidity Wind.Direction
## 1     JFK 2020-05-06 00:00:00         NaN               NaN            170
## 2     JFK 2020-05-06 00:05:00         NaN               NaN            150
## 3     JFK 2020-05-06 00:10:00         NaN               NaN            160
## 4     JFK 2020-05-06 00:15:00         NaN               NaN            160
## 5     JFK 2020-05-06 00:20:00         NaN               NaN            140
## 6     JFK 2020-05-06 00:25:00         NaN               NaN            120
##   Wind.Speed year mon day hour min sec
## 1   2.572016 2020   5   6    0   0   0
## 2   2.572016 2020   5   6    0   5   0
## 3   2.057613 2020   5   6    0  10   0
## 4   1.028807 2020   5   6    0  15   0
## 5   2.057613 2020   5   6    0  20   0
## 6   2.572016 2020   5   6    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 1.132 1.891 1.448
2 WRF D-1 0.419 1.415 0.871
3 WRF D-2 0.323 1.465 1.067
JFK - WRF 10-m Wind Speed (m/s) Performance
Forecast.Init BIAS RMSE MAE
1 WRF D-0 -1.279 2.134 1.742
2 WRF D-1 -0.932 2.275 1.892
3 WRF D-2 -0.723 1.977 1.583
JFK - WRF 10-m Wind Direction (degN) Performance
Forecast.Init RMSE MAE
1 WRF D-0 54.794 38.077
2 WRF D-1 64.322 49.800
3 WRF D-2 79.347 57.523

Forecast Hour Evaluation for LGA

LGA - WRF 2-m Temperature (K) Performance
Forecast.Init BIAS RMSE MAE
1 WRF D-0 0.237 1.184 1.063
2 WRF D-1 -0.523 0.996 0.885
3 WRF D-2 -0.792 1.063 0.892
LGA - WRF 10-m Wind Speed (m/s) Performance
Forecast.Init BIAS RMSE MAE
1 WRF D-0 -1.915 2.463 2.052
2 WRF D-1 -1.826 2.494 2.072
3 WRF D-2 -1.633 2.307 1.886
LGA - WRF 10-m Wind Direction (degN) Performance
Forecast.Init RMSE MAE
1 WRF D-0 46.131 32.902
2 WRF D-1 54.648 43.803
3 WRF D-2 64.563 47.935

Forecast Hour Evaluation for NYC

NYC - WRF 2-m Temperature (K) Performance
Forecast.Init BIAS RMSE MAE
1 WRF D-0 1.065 1.437 1.184
2 WRF D-1 0.300 0.814 0.627
3 WRF D-2 0.173 0.935 0.716
NYC - WRF 10-m Wind Speed (m/s) Performance
Forecast.Init BIAS RMSE MAE
1 WRF D-0 -1.289 1.858 1.558
2 WRF D-1 -1.266 1.815 1.543
3 WRF D-2 -1.206 1.807 1.538
NYC - WRF 10-m Wind Direction (degN) Performance
Forecast.Init RMSE MAE
1 WRF D-0 41.347 36.527
2 WRF D-1 74.899 58.961
3 WRF D-2 87.893 70.644

uWRF and ASOS Time-Series Visualization

Temperature

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

Wind Speed

Wind Direction