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

How to read ground temperature from epw file

asked 2017-10-05 10:46:24 -0600

updated 2017-10-05 13:35:49 -0600

When I run a simulation with OpenStudio I always get this warning in the .err file:

* Warning * GetHTSurfaceData: Surfaces with interface to Ground found but no "Ground Temperatures" were input. * ~~~ * Found first in surface=SURFACE 6 * ~~~ * Defaults, constant throughout the year of (18.0) will be used.

If my understanding is correct, the default value of 18.0 C will be used for the calculation of heat loss for a surface with oustide boundary condition set to "ground". This is kind of problematic in a region where ground temperatures are way below this default value.

What I don't understand is that there are data on ground temperature in the epw weather file. So I'm wondering why those are not read during the simulation.

epw print screen

Based on this question I've wrote an OpenStudio measure with wich I can manually set ground temperature for each month.

However, I'd like to know if there is a way to call the epw file and read the ground temperature so I would'nt have to do it manually for each simulation.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2017-10-05 14:49:23 -0600

Well an EPW file is really just a CSV file, and the fields will be consistent. So you can use the Ruby CSV class to parse the file. There are probably many equally good ways of doing this, but here is what I quickly came up with:

require 'csv'
csv_path = "path/to/epw.epw"

first_depth_temps = []

CSV.foreach(csv_path) do |row|
  if row[0].include? "GROUND TEMPERATURES"
    num_depths = row[1]
    depth_1 = row[2]
    # index 3 thru 5 are for soil conductivity, density and specific heat
    first_depth_temps = row[6..17]
  end
end
# do stuff with temps

Probably a good idea to add some logic to check if there are values first, since not all EPWs have ground temps.

Finally be aware that, as the documentation states: "These should be considered “undisturbed” ground temperatures - temperatures of soil that have not been disturbed by construction. They are not considered appropriate for calculations of building losses."

edit flag offensive delete link more

Comments

If these ground temperatures are not used ih EnergyPlus and not considered appropriate for calculations of building losses, then what is the purpose of putting them in the EPW?

Joe Huang's avatar Joe Huang  ( 2018-01-22 01:09:05 -0600 )edit

@Joe Huang You'd have to ask the people who originally specified the EPW format. There exists other fields that aren't used, such as ceiling height.

ericringold's avatar ericringold  ( 2018-01-22 10:32:17 -0600 )edit

I was being cheeky because I was actually in the EnergyPlus Development Team meetings when the EPW format was developed and circulated for comment In fact, i think the EPW format is duplicative, because it just took the data in NREL's TY2 / TMY3.CSV formats and rearranged the columns. Over half of these are not needed or used in EnergyPlus, including all the illuminance values, visibility, surface albedo (?), etc.

Joe Huang's avatar Joe Huang  ( 2018-01-22 13:18:28 -0600 )edit

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

1 follower

Stats

Asked: 2017-10-05 10:46:24 -0600

Seen: 1,314 times

Last updated: Oct 05 '17