ladybug-tools/ladybug

EPW design conditions

Closed this issue · 2 comments

It looks like some recent TMY EPW files on OneBuilding.org have a different format for the design conditions line ("2021 ASHRAE Handbook -- Fundamentals - Chapter 14 Climatic Design Information") that is different from what the EPW module is expecting form import (2009 ASHRAE?). The number of heating/cooling/extreme fields do not match, but I do not have a copy of the 2021 ASHRAE Handbook of Fundamentals to check what the new format might be. Relevant areas that would require updating (would need to newly keep track of the "design condition source" field instead of assuming 2009 ASHRAE?):

# keys denoting the values from which design days are derived
# these keys and their order com from Climate Design Data of ASHRAE Handbook
HEATING_KEYS = ('Month', 'DB996', 'DB990', 'DP996', 'HR_DP996', 'DB_DP996',
'DP990', 'HR_DP990', 'DB_DP990', 'WS004c', 'DB_WS004c',
'WS010c', 'DB_WS010c', 'WS_DB996', 'WD_DB996')
COOLING_KEYS = ('Month', 'DBR', 'DB004', 'WB_DB004', 'DB010', 'WB_DB010',
'DB020', 'WB_DB020', 'WB004', 'DB_WB004', 'WB010', 'DB_WB010',
'WB020', 'DB_WB020', 'WS_DB004', 'WD_DB004', 'DP004',
'HR_DP004', 'DB_DP004', 'DP010', 'HR_DP010', 'DB_DP010',
'DP020', 'HR_DP020', 'DB_DP020', 'EN004', 'DB_EN004',
'EN010', 'DB_EN010', 'EN020', 'DB_EN020', 'Hrs_8-4_&_DB')
EXTREME_KEYS = ('WS010', 'WS025', 'WS050', 'WBmax', 'DBmin_mean', 'DBmax_mean',
'DBmin_stddev', 'DBmax_stddev', 'DBmin05years', 'DBmax05years',
'DBmin10years', 'DBmax10years', 'DBmin20years', 'DBmax20years',
'DBmin50years', 'DBmax50years')

ladybug/ladybug/epw.py

Lines 445 to 455 in e70767b

dday_data = header_lines[1].strip().split(',')
if len(dday_data) >= 2 and int(dday_data[1]) == 1:
if dday_data[4] == 'Heating':
for key, val in zip(DesignDay.HEATING_KEYS, dday_data[5:20]):
self._heating_dict[key] = val
if dday_data[20] == 'Cooling':
for key, val in zip(DesignDay.COOLING_KEYS, dday_data[21:53]):
self._cooling_dict[key] = val
if dday_data[53] == 'Extremes':
for key, val in zip(DesignDay.EXTREME_KEYS, dday_data[54:70]):
self._extremes_dict[key] = val

ladybug/ladybug/epw.py

Lines 809 to 817 in e70767b

winter_found = bool(self._heating_dict)
summer_found = bool(self._cooling_dict)
extreme_found = bool(self._extremes_dict)
if winter_found and summer_found and extreme_found:
des_str = 'DESIGN CONDITIONS,1,Climate Design Data 2009 ASHRAE Handbook,,'
des_str = des_str + 'Heating,{},Cooling,{},Extremes,{}\n'.format(
','.join([self._heating_dict[key] for key in DesignDay.HEATING_KEYS]),
','.join([self._cooling_dict[key] for key in DesignDay.COOLING_KEYS]),
','.join([self._extremes_dict[key] for key in DesignDay.EXTREME_KEYS]))

Hi @cmsavage, Thank you for letting us know. I assigned @chriswmackey to this issue so he is aware of this issue.

Sorry it took me sol long to address this, @cmsavage . Thanks for bringing it to my attention. I am merging a fix now that can handle the new ASHRAE 2021 design day format. FYI, this website was helpful for me seeing the difference between the 2009 and 2021 fields:

https://ashrae-meteo.info/

As expected, there wasn't really that much that changed. They added a new field for heating design days called "Weather and shielding factor". And they shuffled a key around between the cooling design day and the extreme conditions. Just to make it difficult for all of us software developers 🙃 .