2

How to read ground temperature from epw file

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.

Frederic Leveille's avatar
191
Frederic Leveille
asked 2017-10-05 10:46:24 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2017-10-05 13:35:49 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

2

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."

ericringold's avatar
10.6k
ericringold
answered 2017-10-05 14:49:23 -0500
edit flag offensive 0 remove flag delete link

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 -0500) 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 -0500) 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 -0500) edit
add a comment see more comments