Skip to content

Commit

Permalink
fix(study): Allow EPW with different extension
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkelkp committed Aug 27, 2024
1 parent 102438e commit 84cd5f4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions honeybee_radiance/cli/study.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import sys
import logging
import os
import shutil
import json

from ladybug.wea import Wea
Expand Down Expand Up @@ -43,6 +44,8 @@ def study_info(wea, timestep, folder, name):
is_wea = True if first_word == 'place' else False
if not is_wea:
_wea_file = os.path.join(os.path.dirname(wea), 'epw_to_wea.wea')
if os.path.splitext(wea)[-1] != '.epw':
wea = shutil.copyfile(wea, os.path.splitext(wea)[0] + '.epw')
wea = Wea.from_epw_file(wea).write(_wea_file)
wea = Wea.from_file(wea, timestep=timestep)
study_info['timestep'] = timestep
Expand Down

0 comments on commit 84cd5f4

Please sign in to comment.