Skip to content

Commit

Permalink
Merge pull request #1475 from NREL/ground_temperatures
Browse files Browse the repository at this point in the history
Update undisturbed ground temperatures
  • Loading branch information
shorowit authored Oct 24, 2023
2 parents 5f73cd1 + 3fa726c commit e2d970c
Show file tree
Hide file tree
Showing 13 changed files with 1,022 additions and 1,000 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ __New Features__
- Always validate the HPXML file before applying defaults and only optionally validate the final HPXML file.
- Battery losses now split between charging and discharging.
- Interior/exterior window shading multipliers are now modeled using the EnergyPlus incident solar multiplier.
- Updates ground temperatures using a correlation based on L. Xing's simplified design model (2014).
- Improvements to HERS & MaxLoad heat pump sizing methodologies.
- Added README.md documentation for all OpenStudio measures.

Expand Down
20 changes: 10 additions & 10 deletions HPXMLtoOpenStudio/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.1</schema_version>
<name>hpxm_lto_openstudio</name>
<uid>b1543b30-9465-45ff-ba04-1d1f85e763bc</uid>
<version_id>e142a131-d024-4ff1-9801-ce74cd7c7283</version_id>
<version_modified>2023-10-23T16:23:42Z</version_modified>
<version_id>e2fd57c2-0e0e-43cd-a906-64bca7c8a63b</version_id>
<version_modified>2023-10-24T17:27:19Z</version_modified>
<xml_checksum>D8922A73</xml_checksum>
<class_name>HPXMLtoOpenStudio</class_name>
<display_name>HPXML to OpenStudio Translator</display_name>
Expand Down Expand Up @@ -148,7 +148,7 @@
<filename>airflow.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>69A339D7</checksum>
<checksum>F6DB7943</checksum>
</file>
<file>
<filename>battery.rb</filename>
Expand Down Expand Up @@ -286,13 +286,13 @@
<filename>hvac.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>6281BDD6</checksum>
<checksum>D11B59B7</checksum>
</file>
<file>
<filename>hvac_sizing.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>CB7E432C</checksum>
<checksum>09671E36</checksum>
</file>
<file>
<filename>lighting.rb</filename>
Expand Down Expand Up @@ -340,7 +340,7 @@
<filename>psychrometrics.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>F5311570</checksum>
<checksum>203B4A64</checksum>
</file>
<file>
<filename>pv.rb</filename>
Expand Down Expand Up @@ -472,13 +472,13 @@
<filename>waterheater.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>38F19A13</checksum>
<checksum>7ED2BB52</checksum>
</file>
<file>
<filename>weather.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>04DDB59E</checksum>
<checksum>4E39BD30</checksum>
</file>
<file>
<filename>xmlhelper.rb</filename>
Expand Down Expand Up @@ -514,7 +514,7 @@
<filename>test_enclosure.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>D31818E1</checksum>
<checksum>B1A8DFFE</checksum>
</file>
<file>
<filename>test_generator.rb</filename>
Expand Down Expand Up @@ -592,7 +592,7 @@
<filename>test_weather.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>1464E73A</checksum>
<checksum>1B56132A</checksum>
</file>
<file>
<filename>util.rb</filename>
Expand Down
11 changes: 6 additions & 5 deletions HPXMLtoOpenStudio/resources/airflow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1318,6 +1318,7 @@ def self.apply_dryer_exhaust(model, vented_dryer, schedules_file, index, unavail
def self.calc_hrv_erv_effectiveness(vent_mech_fans)
# Create the mapping between mech vent instance and the effectiveness results
hrv_erv_effectiveness_map = {}
p_atm = UnitConversions.convert(1.0, 'atm', 'psi')
vent_mech_fans.each do |vent_mech|
hrv_erv_effectiveness_map[vent_mech] = {}

Expand All @@ -1331,7 +1332,7 @@ def self.calc_hrv_erv_effectiveness(vent_mech_fans)
cp_a = 1006.0
p_fan = vent_mech.average_unit_fan_power # Watts

m_fan = UnitConversions.convert(vent_mech_cfm, 'cfm', 'm^3/s') * 16.02 * Psychrometrics.rhoD_fT_w_P(UnitConversions.convert(t_sup_in, 'C', 'F'), w_sup_in, 14.7) # kg/s
m_fan = UnitConversions.convert(vent_mech_cfm, 'cfm', 'm^3/s') * UnitConversions.convert(Psychrometrics.rhoD_fT_w_P(UnitConversions.convert(t_sup_in, 'C', 'F'), w_sup_in, p_atm), 'lbm/ft^3', 'kg/m^3') # kg/s

if not vent_mech.sensible_recovery_efficiency.nil?
# The following is derived from CSA 439, Clause 9.3.3.1, Eq. 12:
Expand Down Expand Up @@ -1367,7 +1368,7 @@ def self.calc_hrv_erv_effectiveness(vent_mech_fans)
t_exh_in = 24.0
w_exh_in = 0.0092

m_fan = UnitConversions.convert(vent_mech_cfm, 'cfm', 'm^3/s') * UnitConversions.convert(Psychrometrics.rhoD_fT_w_P(UnitConversions.convert(t_sup_in, 'C', 'F'), w_sup_in, 14.7), 'lbm/ft^3', 'kg/m^3') # kg/s
m_fan = UnitConversions.convert(vent_mech_cfm, 'cfm', 'm^3/s') * UnitConversions.convert(Psychrometrics.rhoD_fT_w_P(UnitConversions.convert(t_sup_in, 'C', 'F'), w_sup_in, p_atm), 'lbm/ft^3', 'kg/m^3') # kg/s

t_sup_out_gross = t_sup_in - vent_mech_sens_eff * (t_sup_in - t_exh_in)
t_sup_out = t_sup_out_gross + p_fan / (m_fan * cp_a)
Expand Down Expand Up @@ -1849,7 +1850,7 @@ def self.apply_infiltration_to_conditioned(site, conditioned_ach50, conditioned_
# Based on "Field Validation of Algebraic Equations for Stack and
# Wind Driven Air Infiltration Calculations" by Walker and Wilson (1998)

outside_air_density = UnitConversions.convert(weather.header.LocalPressure, 'atm', 'Btu/ft^3') / (Gas.Air.r * (weather.data.AnnualAvgDrybulb + 460.0))
outside_air_density = UnitConversions.convert(weather.header.LocalPressure, 'atm', 'Btu/ft^3') / (Gas.Air.r * UnitConversions.convert(weather.data.AnnualAvgDrybulb, 'F', 'R'))

n_i = InfilPressureExponent
conditioned_sla = get_infiltration_SLA_from_ACH50(conditioned_ach50, n_i, @cfa, infil_volume) # Calculate SLA
Expand Down Expand Up @@ -1903,7 +1904,7 @@ def self.apply_infiltration_to_conditioned(site, conditioned_ach50, conditioned_
f_i = 0.0 # Additive flue function (eq. 12)
end
f_s = ((1.0 + n_i * r_i) / (n_i + 1.0)) * (0.5 - 0.5 * m_i**1.2)**(n_i + 1.0) + f_i
stack_coef = f_s * (UnitConversions.convert(outside_air_density * Constants.g * infil_height, 'lbm/(ft*s^2)', 'inH2O') / (Constants.AssumedInsideTemp + 460.0))**n_i # inH2O^n/R^n
stack_coef = f_s * (UnitConversions.convert(outside_air_density * Constants.g * infil_height, 'lbm/(ft*s^2)', 'inH2O') / UnitConversions.convert(Constants.AssumedInsideTemp, 'F', 'R'))**n_i # inH2O^n/R^n

# Calculate wind coefficient
if not @spaces[HPXML::LocationCrawlspaceVented].nil?
Expand Down Expand Up @@ -1956,7 +1957,7 @@ def self.calc_wind_stack_coeffs(site, hor_lk_frac, neutral_level, space, space_h
f_t_SG = site_ap.site_terrain_multiplier * ((space_height + coord_z) / 32.8)**site_ap.site_terrain_exponent / (site_ap.terrain_multiplier * (site_ap.height / 32.8)**site_ap.terrain_exponent)
f_s_SG = 2.0 / 3.0 * (1 + hor_lk_frac / 2.0) * (2.0 * neutral_level * (1.0 - neutral_level))**0.5 / (neutral_level**0.5 + (1.0 - neutral_level)**0.5)
f_w_SG = site_ap.s_g_shielding_coef * (1.0 - hor_lk_frac)**(1.0 / 3.0) * f_t_SG
c_s_SG = f_s_SG**2.0 * Constants.g * space_height / (Constants.AssumedInsideTemp + 460.0)
c_s_SG = f_s_SG**2.0 * Constants.g * space_height / UnitConversions.convert(Constants.AssumedInsideTemp, 'F', 'R')
c_w_SG = f_w_SG**2.0
return c_w_SG, c_s_SG
end
Expand Down
2 changes: 1 addition & 1 deletion HPXMLtoOpenStudio/resources/hvac.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2979,7 +2979,7 @@ def self.set_cool_rated_shrs_gross(runner, cooling_system)
cool_nominal_cfm_per_ton = clg_ap.cool_rated_cfm_per_ton[0]
end

p_atm = 14.696 # standard atmospheric pressure (psia)
p_atm = UnitConversions.convert(1, 'atm', 'psi')

ao = Psychrometrics.CoilAoFactor(runner, dB_rated, p_atm, UnitConversions.convert(1, 'ton', 'kBtu/hr'), cool_nominal_cfm_per_ton, cooling_system.cooling_shr, win)

Expand Down
22 changes: 16 additions & 6 deletions HPXMLtoOpenStudio/resources/hvac_sizing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def self.process_site_calcs_and_design_temps(weather)

# Inside air density
avg_setpoint = (@cool_setpoint + @heat_setpoint) / 2.0
@inside_air_dens = UnitConversions.convert(weather.header.LocalPressure, 'atm', 'Btu/ft^3') / (Gas.Air.r * (avg_setpoint + 460.0))
@inside_air_dens = UnitConversions.convert(weather.header.LocalPressure, 'atm', 'Btu/ft^3') / (Gas.Air.r * UnitConversions.convert(avg_setpoint, 'F', 'R'))

# Design Temperatures

Expand Down Expand Up @@ -2415,7 +2415,7 @@ def self.get_space_ua_values(location, weather)
end
volume = Geometry.calculate_zone_volume(@hpxml, location)
infiltration_cfm = ach / UnitConversions.convert(1.0, 'hr', 'min') * volume
outside_air_density = UnitConversions.convert(weather.header.LocalPressure, 'atm', 'Btu/ft^3') / (Gas.Air.r * (weather.data.AnnualAvgDrybulb + 460.0))
outside_air_density = UnitConversions.convert(weather.header.LocalPressure, 'atm', 'Btu/ft^3') / (Gas.Air.r * UnitConversions.convert(weather.data.AnnualAvgDrybulb, 'F', 'R'))
space_UAs['infil'] = infiltration_cfm * outside_air_density * Gas.Air.cp * UnitConversions.convert(1.0, 'hr', 'min')

# Total UA
Expand Down Expand Up @@ -2697,11 +2697,21 @@ def self.gshp_hxbore_ft_per_ton(weather, hvac_cooling_ap, bore_spacing, pipe_r_v
r_value_grout = 1.0 / hvac_cooling_ap.grout_conductivity / beta_0 / ((hvac_cooling_ap.bore_diameter / hvac_cooling_ap.pipe_od)**beta_1)
r_value_bore = r_value_grout + pipe_r_value / 2.0 # Note: Convection resistance is negligible when calculated against Glhepro (Jeffrey D. Spitler, 2000)

rtf_DesignMon_Heat = [0.25, (71.0 - weather.data.MonthlyAvgDrybulbs[0]) / @htd].max
rtf_DesignMon_Cool = [0.25, (weather.data.MonthlyAvgDrybulbs[6] - 76.0) / @ctd].max
is_southern_hemisphere = (weather.header.Latitude < 0)

nom_length_heat = (1.0 - hvac_cooling_ap.heat_rated_eirs[0]) * (r_value_bore + r_value_ground * rtf_DesignMon_Heat) / (weather.data.AnnualAvgDrybulb - (2.0 * hvac_cooling_ap.design_hw - hvac_cooling_ap.design_delta_t) / 2.0) * UnitConversions.convert(1.0, 'ton', 'Btu/hr')
nom_length_cool = (1.0 + hvac_cooling_ap.cool_rated_eirs[0]) * (r_value_bore + r_value_ground * rtf_DesignMon_Cool) / ((2.0 * hvac_cooling_ap.design_chw + hvac_cooling_ap.design_delta_t) / 2.0 - weather.data.AnnualAvgDrybulb) * UnitConversions.convert(1.0, 'ton', 'Btu/hr')
if is_southern_hemisphere
heating_month = 6 # July
cooling_month = 0 # January
else
heating_month = 0 # January
cooling_month = 6 # July
end

rtf_DesignMon_Heat = [0.25, (71.0 - weather.data.MonthlyAvgDrybulbs[heating_month]) / @htd].max
rtf_DesignMon_Cool = [0.25, (weather.data.MonthlyAvgDrybulbs[cooling_month] - 76.0) / @ctd].max

nom_length_heat = (1.0 - hvac_cooling_ap.heat_rated_eirs[0]) * (r_value_bore + r_value_ground * rtf_DesignMon_Heat) / (weather.data.GroundAnnualTemp - (2.0 * hvac_cooling_ap.design_hw - hvac_cooling_ap.design_delta_t) / 2.0) * UnitConversions.convert(1.0, 'ton', 'Btu/hr')
nom_length_cool = (1.0 + hvac_cooling_ap.cool_rated_eirs[0]) * (r_value_bore + r_value_ground * rtf_DesignMon_Cool) / ((2.0 * hvac_cooling_ap.design_chw + hvac_cooling_ap.design_delta_t) / 2.0 - weather.data.GroundAnnualTemp) * UnitConversions.convert(1.0, 'ton', 'Btu/hr')

return nom_length_heat, nom_length_cool
end
Expand Down
2 changes: 1 addition & 1 deletion HPXMLtoOpenStudio/resources/psychrometrics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def self.Pstd_fZ(z)
Pstd float barometric pressure (psia)
'''

pstd = 14.696 * ((1 - 6.8754e-6 * z)**5.2559)
pstd = UnitConversions.convert(((1 - 6.8754e-6 * z)**5.2559), 'atm', 'psi')
return pstd
end

Expand Down
5 changes: 3 additions & 2 deletions HPXMLtoOpenStudio/resources/waterheater.rb
Original file line number Diff line number Diff line change
Expand Up @@ -700,9 +700,10 @@ def self.setup_hpwh_dxcoil(model, runner, water_heating_system, weather, obj_nam
# Calculate an altitude adjusted rated evaporator wetbulb temperature
rated_ewb_F = 56.4
rated_edb_F = 67.5
p_atm = UnitConversions.convert(1.0, 'atm', 'psi')
rated_edb = UnitConversions.convert(rated_edb_F, 'F', 'C')
w_rated = Psychrometrics.w_fT_Twb_P(rated_edb_F, rated_ewb_F, 14.7)
dp_rated = Psychrometrics.Tdp_fP_w(runner, 14.7, w_rated)
w_rated = Psychrometrics.w_fT_Twb_P(rated_edb_F, rated_ewb_F, p_atm)
dp_rated = Psychrometrics.Tdp_fP_w(runner, p_atm, w_rated)
p_atm = Psychrometrics.Pstd_fZ(weather.header.Altitude)
w_adj = Psychrometrics.w_fT_Twb_P(dp_rated, dp_rated, p_atm)
twb_adj = Psychrometrics.Twb_fT_w_P(runner, rated_edb_F, w_adj, p_atm)
Expand Down
9 changes: 7 additions & 2 deletions HPXMLtoOpenStudio/resources/weather.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def initialize
class WeatherData
def initialize
end
ATTRS ||= [:AnnualAvgDrybulb, :CDD50F, :CDD65F, :HDD50F, :HDD65F, :MonthlyAvgDrybulbs, :GroundMonthlyTemps, :WSF, :MonthlyAvgDailyHighDrybulbs, :MonthlyAvgDailyLowDrybulbs]
ATTRS ||= [:AnnualAvgDrybulb, :CDD50F, :CDD65F, :HDD50F, :HDD65F, :MonthlyAvgDrybulbs, :GroundAnnualTemp, :GroundMonthlyTemps, :WSF, :MonthlyAvgDailyHighDrybulbs, :MonthlyAvgDailyLowDrybulbs]
attr_accessor(*ATTRS)
end

Expand Down Expand Up @@ -290,6 +290,8 @@ def calc_design_info(runner, rowdata)

def calc_ground_temperatures
# Return monthly ground temperatures.
# This correlation is the same that is used in DOE-2's src\WTH.f file, subroutine GTEMP,
# except that we have replaced the annual average ground temperature using Xing's model.

amon = [15.0, 46.0, 74.0, 95.0, 135.0, 166.0, 196.0, 227.0, 258.0, 288.0, 319.0, 349.0]
po = 0.6
Expand All @@ -307,10 +309,13 @@ def calc_ground_temperatures
phi = Math::atan(z)
bo = (data.MonthlyAvgDrybulbs.max - data.MonthlyAvgDrybulbs.min) * 0.5

# The regression coefficients are from L. Xing's simplified design model ground temperatures (Appendix A-3) and the nearest TMY3 station's annual dry bulb.
@data.GroundAnnualTemp = UnitConversions.convert(0.91 * UnitConversions.convert(data.AnnualAvgDrybulb, 'F', 'C') + 1.82, 'C', 'F')

@data.GroundMonthlyTemps = []
for i in 0..11
theta = amon[i] * 24.0
@data.GroundMonthlyTemps << UnitConversions.convert(data.AnnualAvgDrybulb - bo * Math::cos(2.0 * Math::PI / p * theta - po - phi) * gm + 460.0, 'R', 'F')
@data.GroundMonthlyTemps << @data.GroundAnnualTemp - bo * Math::cos(2.0 * Math::PI / p * theta - po - phi) * gm
end
end

Expand Down
4 changes: 2 additions & 2 deletions HPXMLtoOpenStudio/tests/test_enclosure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -852,8 +852,8 @@ def test_kiva_initial_temperatures
initial_temps = { 'base.xml' => 68.0, # foundation adjacent to conditioned space, IECC zone 5
'base-foundation-conditioned-crawlspace.xml' => 68.0, # foundation adjacent to conditioned space, IECC zone 5
'base-foundation-slab.xml' => 68.0, # foundation adjacent to conditioned space, IECC zone 5
'base-foundation-unconditioned-basement.xml' => 41.4, # foundation adjacent to unconditioned basement w/ ceiling insulation
'base-foundation-unconditioned-basement-wall-insulation.xml' => 56.0, # foundation adjacent to unconditioned basement w/ wall insulation
'base-foundation-unconditioned-basement.xml' => 42.3, # foundation adjacent to unconditioned basement w/ ceiling insulation
'base-foundation-unconditioned-basement-wall-insulation.xml' => 56.6, # foundation adjacent to unconditioned basement w/ wall insulation
'base-foundation-unvented-crawlspace.xml' => 38.6, # foundation adjacent to unvented crawlspace w/ ceiling insulation
'base-foundation-vented-crawlspace.xml' => 36.9, # foundation adjacent to vented crawlspace w/ ceiling insulation
'base-location-miami-fl.xml' => 78.0 } # foundation adjacent to conditioned space, IECC zone 1
Expand Down
12 changes: 8 additions & 4 deletions HPXMLtoOpenStudio/tests/test_weather.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def test_denver
# Check data
assert_equal(1, weather.header.RecordsPerHour)
assert_in_delta(51.6, weather.data.AnnualAvgDrybulb, 0.1)
assert_in_delta(53.1, weather.data.GroundAnnualTemp, 0.1)
assert_in_delta(3072.3, weather.data.CDD50F, 0.1)
assert_in_delta(883.6, weather.data.CDD65F, 0.1)
assert_in_delta(2497.2, weather.data.HDD50F, 0.1)
Expand All @@ -49,7 +50,7 @@ def test_denver
[19.3, 19.9, 30.3, 31.1, 47.4, 57.9, 59.1, 61.0, 52.4, 38.4, 27.0, 23.0].each_with_index do |monthly_temp, i|
assert_in_delta(monthly_temp, weather.data.MonthlyAvgDailyLowDrybulbs[i], 0.1)
end
[44.1, 40.9, 40.6, 42.2, 48.2, 54.3, 59.5, 62.8, 63.1, 60.4, 55.3, 49.4].each_with_index do |monthly_temp, i|
[45.3, 42.1, 41.8, 43.3, 49.4, 55.5, 60.7, 64.0, 64.3, 61.6, 56.5, 50.6].each_with_index do |monthly_temp, i|
assert_in_delta(monthly_temp, weather.data.GroundMonthlyTemps[i], 0.1)
end

Expand Down Expand Up @@ -84,6 +85,7 @@ def test_honolulu
# Check data
assert_equal(1, weather.header.RecordsPerHour)
assert_in_delta(76.8, weather.data.AnnualAvgDrybulb, 0.1)
assert_in_delta(76.1, weather.data.GroundAnnualTemp, 0.1)
assert_in_delta(9798.7, weather.data.CDD50F, 0.1)
assert_in_delta(4323.7, weather.data.CDD65F, 0.1)
assert_in_delta(0.0, weather.data.HDD50F, 0.1)
Expand All @@ -98,7 +100,7 @@ def test_honolulu
[66.1, 65.9, 66.6, 68.8, 70.7, 73.7, 75.2, 74.5, 75.2, 71.9, 70.6, 69.1].each_with_index do |monthly_temp, i|
assert_in_delta(monthly_temp, weather.data.MonthlyAvgDailyLowDrybulbs[i], 0.1)
end
[75.6, 75.0, 74.9, 75.2, 76.4, 77.6, 78.7, 79.3, 79.4, 78.9, 77.8, 76.7].each_with_index do |monthly_temp, i|
[74.5, 73.9, 73.9, 74.2, 75.4, 76.6, 77.6, 78.2, 78.3, 77.8, 76.8, 75.6].each_with_index do |monthly_temp, i|
assert_in_delta(monthly_temp, weather.data.GroundMonthlyTemps[i], 0.1)
end

Expand Down Expand Up @@ -133,6 +135,7 @@ def test_cape_town
# Check data
assert_equal(1, weather.header.RecordsPerHour)
assert_in_delta(61.7, weather.data.AnnualAvgDrybulb, 0.1)
assert_in_delta(62.3, weather.data.GroundAnnualTemp, 0.1)
assert_in_delta(4297.8, weather.data.CDD50F, 0.1)
assert_in_delta(503.0, weather.data.CDD65F, 0.1)
assert_in_delta(17.5, weather.data.HDD50F, 0.1)
Expand All @@ -147,7 +150,7 @@ def test_cape_town
[61.0, 61.9, 59.7, 54.5, 50.8, 46.7, 45.3, 47.7, 50.1, 50.6, 57.9, 59.6].each_with_index do |monthly_temp, i|
assert_in_delta(monthly_temp, weather.data.MonthlyAvgDailyLowDrybulbs[i], 0.1)
end
[59.2, 58.0, 57.9, 58.5, 60.7, 62.9, 64.9, 66.1, 66.2, 65.2, 63.3, 61.1].each_with_index do |monthly_temp, i|
[59.4, 58.3, 58.2, 58.7, 61.0, 63.2, 65.1, 66.4, 66.5, 65.5, 63.6, 61.4].each_with_index do |monthly_temp, i|
assert_in_delta(monthly_temp, weather.data.GroundMonthlyTemps[i], 0.1)
end

Expand Down Expand Up @@ -182,6 +185,7 @@ def test_boulder_amy_with_leap_day
# Check data
assert_equal(1, weather.header.RecordsPerHour)
assert_in_delta(49.4, weather.data.AnnualAvgDrybulb, 0.1)
assert_in_delta(51.1, weather.data.GroundAnnualTemp, 0.1)
assert_in_delta(2633.8, weather.data.CDD50F, 0.1)
assert_in_delta(609.1, weather.data.CDD65F, 0.1)
assert_in_delta(2863.0, weather.data.HDD50F, 0.1)
Expand All @@ -196,7 +200,7 @@ def test_boulder_amy_with_leap_day
[22.1, 17.4, 30.4, 34.4, 40.8, 54.1, 57.5, 55.6, 48.1, 33.5, 30.0, 18.9].each_with_index do |monthly_temp, i|
assert_in_delta(monthly_temp, weather.data.MonthlyAvgDailyLowDrybulbs[i], 0.1)
end
[41.3, 37.9, 37.6, 39.2, 45.7, 52.2, 57.9, 61.4, 61.8, 58.8, 53.4, 47.1].each_with_index do |monthly_temp, i|
[42.7, 39.2, 39.0, 40.6, 47.1, 53.6, 59.3, 62.8, 63.1, 60.2, 54.7, 48.4].each_with_index do |monthly_temp, i|
assert_in_delta(monthly_temp, weather.data.GroundMonthlyTemps[i], 0.1)
end

Expand Down
Loading

0 comments on commit e2d970c

Please sign in to comment.