Closed
Description
Describe the bug
The HRRR model 'temp_air' calculation uses the method:
pvlib/forecast.py:
'def isobaric_to_ambient_temperature(self, data)
The formula implemented by this method appears to produce incorrect 'temp_air' values.
To Reproduce
Steps to reproduce the behavior:
- Run the attached Jupyter notebook 'hrrr_air_temp_testcase':
hrrr_air_temp_testcase.ipynb.txt
- Compare the 'temperature_isobaric' values (in Kelvin) with the resulting 'temp_air' values (in Celsius):
from the weather forecast:
Temperature_isobaric
2018-10-12 07:00:00-07:00 288.361938
2018-10-12 08:00:00-07:00 288.778656
2018-10-12 09:00:00-07:00 289.354309
2018-10-12 10:00:00-07:00 290.199005
2018-10-12 11:00:00-07:00 291.025238
after conversion with 'get_processed_data():
temp_air wind_speed ghi dni \
2018-10-12 07:00:00-07:00 -2.443878 3.547055 0.000000 0.000000
2018-10-12 08:00:00-07:00 -1.725800 3.856754 72.719945 177.219441
2018-10-12 09:00:00-07:00 -1.064240 4.183833 269.398844 587.731450
2018-10-12 10:00:00-07:00 -0.781128 3.085214 452.789030 745.781057
2018-10-12 11:00:00-07:00 1.528809 3.174382 594.728725 793.903707
Expected behavior
'temp_air' values are expected to be around 17 C, not around the freezing point (0 in C).
Screenshots
see attached Jupyter notebook testcase
Versions:
pvlib.__version__
: v0.6.0pandas.__version__
: 0.23.4- python: Jupyter Python 3 kernel
Additional context