First time here? Check out the Help page!
1 | initial version |
This works for me:
import openstudio
model = openstudio.model.Model()
epw_path = openstudio.path('//path//to//weather//USA_CO_Boulder-Broomfield-Jefferson.County.AP.724699_TMY3.epw')
epw_file = openstudio.openstudioutilitiesfiletypes.EpwFile(epw_path)
openstudio.model.WeatherFile.setWeatherFile(model, epw_file)
print(model)
It produces an OSM with:
OS:Version,
{93be9bc6-f569-4f5c-9804-7f01878e7175}, !- Handle
3.2.1; !- Version Identifier
OS:WeatherFile,
{b21bb643-6d07-4e17-9e14-31c2171765da}, !- Handle
Broomfield Jeffco Boulder S, !- City
CO, !- State Province Region
USA, !- Country
TMY3, !- Data Source
724699, !- WMO Number
40.13, !- Latitude {deg}
-105.24, !- Longitude {deg}
-7, !- Time Zone {hr}
1689, !- Elevation {m}
//path//to//weather//USA_CO_Boulder-Broomfield-Jefferson.County.AP.724699_TMY3.epw, !- Url
AC900369; !- Checksum