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-16 00:00:05 2020   5  16    0   0  5.0004    289.1936      0.00946
## 2 2020-05-16 00:00:10 2020   5  16    0   0 10.0008    289.3650      0.00946
## 3 2020-05-16 00:00:15 2020   5  16    0   0 15.0012    289.5104      0.00946
## 4 2020-05-16 00:00:20 2020   5  16    0   0 20.0016    289.6375      0.00946
## 5 2020-05-16 00:00:24 2020   5  16    0   0 24.9984    289.7510      0.00946
## 6 2020-05-16 00:00:29 2020   5  16    0   0 29.9988    289.8541      0.00945
##    U_WIND  V_WIND Wind.Speed Wind.Direction Station
## 1 0.93961 5.48661   5.566485       189.7179     JFK
## 2 0.84782 5.16041   5.229592       189.3300     JFK
## 3 0.78008 4.93052   4.991849       188.9905     JFK
## 4 0.73242 4.74412   4.800324       188.7763     JFK
## 5 0.69566 4.59212   4.644514       188.6142     JFK
## 6 0.66952 4.45468   4.504712       188.5473     JFK
##             Date.Time year mon day hour min     sec Temperature Mixing.Ratio
## 1 2020-05-15 00:00:05 2020   5  15    0   0  5.0004    285.8225      0.00745
## 2 2020-05-15 00:00:10 2020   5  15    0   0 10.0008    285.9896      0.00746
## 3 2020-05-15 00:00:15 2020   5  15    0   0 15.0012    286.1297      0.00746
## 4 2020-05-15 00:00:20 2020   5  15    0   0 20.0016    286.2513      0.00746
## 5 2020-05-15 00:00:24 2020   5  15    0   0 24.9984    286.3593      0.00746
## 6 2020-05-15 00:00:29 2020   5  15    0   0 29.9988    286.4544      0.00746
##     U_WIND  V_WIND Wind.Speed Wind.Direction Station
## 1  0.05527 6.23564   6.235885       180.5078     JFK
## 2 -0.02734 5.83949   5.839554       179.7317     JFK
## 3 -0.08164 5.56177   5.562369       179.1590     JFK
## 4 -0.12061 5.33905   5.340412       178.7059     JFK
## 5 -0.14417 5.15583   5.157845       178.3983     JFK
## 6 -0.15835 5.00809   5.010593       178.1890     JFK
##             Date.Time year mon day hour min     sec Temperature Mixing.Ratio
## 1 2020-05-14 00:00:05 2020   5  14    0   0  5.0004    283.5710      0.00663
## 2 2020-05-14 00:00:10 2020   5  14    0   0 10.0008    283.7147      0.00663
## 3 2020-05-14 00:00:15 2020   5  14    0   0 15.0012    283.8395      0.00663
## 4 2020-05-14 00:00:20 2020   5  14    0   0 20.0016    283.9507      0.00663
## 5 2020-05-14 00:00:24 2020   5  14    0   0 24.9984    284.0515      0.00664
## 6 2020-05-14 00:00:29 2020   5  14    0   0 29.9988    284.1440      0.00664
##     U_WIND  V_WIND Wind.Speed Wind.Direction Station
## 1 -0.21702 4.49034   4.495581       177.2330     JFK
## 2 -0.25730 4.26258   4.270339       176.5457     JFK
## 3 -0.28874 4.09738   4.107541       175.9691     JFK
## 4 -0.31095 3.95381   3.966019       175.5032     JFK
## 5 -0.32786 3.83933   3.853303       175.1191     JFK
## 6 -0.33654 3.73945   3.754563       174.8574     JFK
##   Station           Date.Time Temperature Relative.Humidity Wind.Direction
## 1     JFK 2020-05-15 00:00:00         NaN               NaN            180
## 2     JFK 2020-05-15 00:05:00         NaN               NaN            180
## 3     JFK 2020-05-15 00:10:00         NaN               NaN            190
## 4     JFK 2020-05-15 00:15:00         NaN               NaN            190
## 5     JFK 2020-05-15 00:20:00         NaN               NaN            190
## 6     JFK 2020-05-15 00:25:00         NaN               NaN            190
##   Wind.Speed year mon day hour min sec
## 1   9.259259 2020   5  15    0   0   0
## 2   8.744856 2020   5  15    0   5   0
## 3   8.230453 2020   5  15    0  10   0
## 4   8.744856 2020   5  15    0  15   0
## 5   9.259259 2020   5  15    0  20   0
## 6   9.259259 2020   5  15    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.585 1.438 1.021
2 WRF D-1 -0.641 2.304 1.715
3 WRF D-2 -1.404 2.637 2.306
JFK - WRF 10-m Wind Speed (m/s) Performance
Forecast.Init BIAS RMSE MAE
1 WRF D-0 -1.313 2.678 2.284
2 WRF D-1 -1.751 3.209 2.623
3 WRF D-2 -2.113 3.423 2.847
JFK - WRF 10-m Wind Direction (degN) Performance
Forecast.Init RMSE MAE
1 WRF D-0 48.499 27.370
2 WRF D-1 45.556 31.504
3 WRF D-2 62.142 40.357

Forecast Hour Evaluation for LGA

LGA - WRF 2-m Temperature (K) Performance
Forecast.Init BIAS RMSE MAE
1 WRF D-0 0.301 1.312 1.025
2 WRF D-1 -0.631 1.904 1.493
3 WRF D-2 -2.360 3.144 2.397
LGA - WRF 10-m Wind Speed (m/s) Performance
Forecast.Init BIAS RMSE MAE
1 WRF D-0 -1.982 2.809 2.308
2 WRF D-1 -2.190 3.037 2.561
3 WRF D-2 -2.628 3.229 2.789
LGA - WRF 10-m Wind Direction (degN) Performance
Forecast.Init RMSE MAE
1 WRF D-0 44.561 32.344
2 WRF D-1 45.002 32.838
3 WRF D-2 52.131 35.856

Forecast Hour Evaluation for NYC

NYC - WRF 2-m Temperature (K) Performance
Forecast.Init BIAS RMSE MAE
1 WRF D-0 1.444 1.783 1.490
2 WRF D-1 0.312 1.858 1.159
3 WRF D-2 -1.113 1.883 1.327
NYC - WRF 10-m Wind Speed (m/s) Performance
Forecast.Init BIAS RMSE MAE
1 WRF D-0 -1.029 1.806 1.576
2 WRF D-1 -0.985 1.851 1.606
3 WRF D-2 -1.150 1.933 1.685
NYC - WRF 10-m Wind Direction (degN) Performance
Forecast.Init RMSE MAE
1 WRF D-0 55.652 37.657
2 WRF D-1 85.868 66.600
3 WRF D-2 78.818 58.808

uWRF and ASOS Time-Series Visualization

Temperature

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

Wind Speed

Wind Direction