Skip to content

Commit

Permalink
fix(uwg): Handle the case of EPWs without all 34 fields
Browse files Browse the repository at this point in the history
It seems that some programs don't use all 34 fields in the EPW and the UWG is largely able to handle this except for the very last step of writing the EPW. This change fixes this.

More information can be found here:
https://discourse.ladybug.tools/t/2050-future-epw-data-could-not-be-morphed-by-df-tool/15242/2
  • Loading branch information
chriswmackey committed Aug 17, 2021
1 parent e20e12a commit 2a10b45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion uwg/uwg.py
Expand Up @@ -1414,7 +1414,7 @@ def write_epw(self):

for i in range(len(self.epwinput)):
printme = ''
for ei in range(34):
for ei in range(len(self.epwinput[i])):
printme += "{}".format(self.epwinput[i][ei]) + ','
printme = printme + "{}".format(self.epwinput[i][ei])
new_epw_line = '{0}\n'.format(printme)
Expand Down

0 comments on commit 2a10b45

Please sign in to comment.