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 2021-07-13 20:51:49 -0600

antonszilasi's avatar

updated 2021-07-18 14:12:21 -0600

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?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2021-07-14 08:51:33 -0600

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.

edit flag offensive delete link more

Comments

@bonnema the epw files are for the whole world

antonszilasi's avatar antonszilasi  ( 2021-07-14 16:05:05 -0600 )edit

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  ( 2021-07-14 17:37:25 -0600 )edit

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  ( 2021-07-16 08:52:06 -0600 )edit

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

antonszilasi's avatar antonszilasi  ( 2021-08-25 15:01:49 -0600 )edit

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  ( 2021-08-25 15:30:29 -0600 )edit
3

answered 2021-07-14 10:25:20 -0600

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.

edit flag offensive delete link more

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: 2021-07-13 20:51:49 -0600

Seen: 63,634 times

Last updated: Aug 25 '21