Question-and-Answer Resource for the Building Energy Modeling Community
Get s tarted with the Help page
Ask Your Question
2

Best way to get ASHRAE climate zone of a weather location

asked 2021-07-13 20:51:49 -0500

antonszilasi gravatar image

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

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
2

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

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 gravatar image antonszilasi  ( 2021-07-14 16:05:05 -0500 )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 gravatar image bonnema  ( 2021-07-14 17:37:25 -0500 )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 gravatar image bonnema  ( 2021-07-16 08:52:06 -0500 )edit
2

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

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

 

Question Tools

3 followers

Stats

Asked: 2021-07-13 20:51:49 -0500

Seen: 148 times

Last updated: Jul 14