First time here? Check our help page!
3

Best way to get ASHRAE climate zone of a weather location

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?

antonszilasi's avatar
1.5k
antonszilasi
asked 2021-07-13 20:51:49 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2021-07-18 14:12:21 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

3

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.

David Goldwasser's avatar
20.4k
David Goldwasser
answered 2021-07-14 10:25:20 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
3

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.

bonnema's avatar
191
bonnema
answered 2021-07-14 08:51:33 -0500
edit flag offensive 0 remove flag delete link

Comments

@bonnema the epw files are for the whole world

antonszilasi's avatar 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's avatar 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's avatar bonnema (2021-07-16 08:52:06 -0500) 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 -0500) 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 -0500) edit
add a comment see more comments