You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The EpwFile .getTimeSeries method fails when retrieving information from a weather file that contains a leap year but for which only 28 days of February data are provided. Examples of such files are the CWEC 2020 weather files for Toronto and Vancouver.
In both of the above files, the data for February is from a leap year (2004 for Toronto, 2000 for Vancouver). However, only 28 days of weather data for February are provided (no data for Feb. 29).
When using the EpwFile .getTimeSeries method to get dry bulb temperatures with such a file, the following error is produced:
[utilities.time.Date] <2> Bad Date: year = 2009, month = Feb(2), day = 29. C:/Users/Chris/projects/weather_test/weather_test.rb:6:in `getTimeSeries': D:\OSN\Openstudio\src\utilities\time\Date.cpp@382 : Bad Date: year = 2009, month = Feb(2), day = 29. (RuntimeError)
The problem does not occur if the year in the weather file for February is replaced with one that is not a leap year. This issue is especially problematic in TMY weather files since it is not obvious if the February in the file will be from a leap year but will only include 28 days of data.
Current Behavior
The following error:
[utilities.time.Date] <2> Bad Date: year = 2009, month = Feb(2), day = 29. C:/Users/Chris/projects/weather_test/weather_test.rb:6:in `getTimeSeries': D:\OSN\Openstudio\src\utilities\time\Date.cpp@382 : Bad Date: year = 2009, month = Feb(2), day = 29. (RuntimeError)
Version of OpenStudio (if using an intermediate build, include SHA): 3.7.0
Context
Using the method to retrieve weather data to calculate PHIUS information. This issue causes unpredictable errors when conducting analyses using a variety of TMY weather files as it is not always clear which weather file will contain leap years with only 28 days of data in February. A replacement method is being implemented in openstudio-standards to replace this method until this issue is resolved.
The text was updated successfully, but these errors were encountered:
ckirney
added
the
Triage
Issue needs to be assessed and labeled, further information on reported might be needed
label
May 31, 2024
Issue overview
Related to #3801
The EpwFile .getTimeSeries method fails when retrieving information from a weather file that contains a leap year but for which only 28 days of February data are provided. Examples of such files are the CWEC 2020 weather files for Toronto and Vancouver.
In both of the above files, the data for February is from a leap year (2004 for Toronto, 2000 for Vancouver). However, only 28 days of weather data for February are provided (no data for Feb. 29).
When using the EpwFile .getTimeSeries method to get dry bulb temperatures with such a file, the following error is produced:
[utilities.time.Date] <2> Bad Date: year = 2009, month = Feb(2), day = 29. C:/Users/Chris/projects/weather_test/weather_test.rb:6:in `getTimeSeries': D:\OSN\Openstudio\src\utilities\time\Date.cpp@382 : Bad Date: year = 2009, month = Feb(2), day = 29. (RuntimeError)
The problem does not occur if the year in the weather file for February is replaced with one that is not a leap year. This issue is especially problematic in TMY weather files since it is not obvious if the February in the file will be from a leap year but will only include 28 days of data.
Current Behavior
The following error:
[utilities.time.Date] <2> Bad Date: year = 2009, month = Feb(2), day = 29. C:/Users/Chris/projects/weather_test/weather_test.rb:6:in `getTimeSeries': D:\OSN\Openstudio\src\utilities\time\Date.cpp@382 : Bad Date: year = 2009, month = Feb(2), day = 29. (RuntimeError)
Expected Behavior
Time series weather data should be returned.
Steps to Reproduce
weather_file = 'path/to/CAN_ON_Toronto.Intl.AP.716240_CWEC2020.epw'
epw = OpenStudio::EpwFile.new(weather_file)
epw.getTimeSeries('Dry Bulb Temperature')
Possible Solution
Details
Environment
Some additional details about your environment for this issue (if relevant):
Context
Using the method to retrieve weather data to calculate PHIUS information. This issue causes unpredictable errors when conducting analyses using a variety of TMY weather files as it is not always clear which weather file will contain leap years with only 28 days of data in February. A replacement method is being implemented in openstudio-standards to replace this method until this issue is resolved.
The text was updated successfully, but these errors were encountered: