First time here? Check out the Help page!

Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
3

Best way to get ASHRAE climate zone of a weather location

asked 3 years ago

antonszilasi's avatar

updated 3 years ago

I am trying to produce a json which contains the key details of all epw files including the ASHRAE climate zone.

I am starting from the very helpful scripts here: link text'

As I understand it the ASHRAE climate zone is only contained in the .stat file for each location is that correct? So would I need to query the .stat file in my python script or can I obtain the climate zone elsewhere?

Alternatively does this json already exist in some other form?

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
3

answered 3 years ago

The Change Building Location measure has code to use regex to extract the climate zone from the stat file. You could adapt that code for Python. Note this works for the most but not all stat files, depending on how they were generated.

Preview: (hide)
link
3

answered 3 years ago

Using the stat file might be the best option. Can you provide mode detail? Where are the EPW files from? Are they specific to one country? For instance, if they're in the U.S., ASHRAE climate zones are by county. You could use this API to get county based on latitude and longitude, and then get climate zone from that.

Preview: (hide)
link

Comments

@bonnema the epw files are for the whole world

antonszilasi's avatar antonszilasi  ( 3 years ago )

Got it. Some options I see include:

  • Use the stat file. David gave an example regular expression. Probably easiest if the stat files exists. There is other useful information in the stat file (data for the water mains temperatures for example)
  • Use Appendix A from Standard 169 to determine the climate zone algorithmically and include it in your script
  • Use the weather data sources here. How well do these locations align with yours?

Does that help?

bonnema's avatar bonnema  ( 3 years ago )

It might be helpful to know the weather data source(s). For example, if using data from http://climate.onebuilding.org/, the KML files could be mined for useful information. They're effectively XML files that can be parsed using a python library.

bonnema's avatar bonnema  ( 3 years ago )

@bonnema at the moment its just all weather files on doe website https://energyplus.net/weather

antonszilasi's avatar antonszilasi  ( 3 years ago )

Gotcha. I think you can use the python code you originally referenced to download all the stat files (example url: https://energyplus.net/weather-downlo...). Then parse the stat file for the climate zone.

bonnema's avatar bonnema  ( 3 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

3 followers

Stats

Asked: 3 years ago

Seen: 63,983 times

Last updated: Dec 30 '24