openstudio-standards 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/data/standards/OpenStudio_Standards.xlsx +0 -0
- data/data/standards/OpenStudio_Standards_chillers.json +5 -5
- data/data/standards/OpenStudio_Standards_construction_sets.json +2 -2
- data/data/standards/OpenStudio_Standards_curve_cubics.json +12 -0
- data/data/standards/OpenStudio_Standards_heat_pumps.json +2126 -72
- data/data/standards/OpenStudio_Standards_heat_pumps_heating.json +766 -14
- data/data/standards/OpenStudio_Standards_heat_rejection.json +172 -0
- data/data/standards/OpenStudio_Standards_prototype_inputs.json +355 -267
- data/data/standards/OpenStudio_Standards_schedules.json +262 -10
- data/data/standards/OpenStudio_Standards_space_types.json +1466 -794
- data/data/standards/manage_OpenStudio_Standards.rb +19 -21
- data/data/weather/weather_info.csv +96 -0
- data/lib/openstudio-standards/btap/btap.rb +1 -1
- data/lib/openstudio-standards/btap/compliance.rb +135 -40
- data/lib/openstudio-standards/btap/envelope.rb +26 -5
- data/lib/openstudio-standards/btap/geometry.rb +11 -1
- data/lib/openstudio-standards/btap/hvac.rb +489 -56
- data/lib/openstudio-standards/btap/simmanager.rb +1 -1
- data/lib/openstudio-standards/hvac_sizing/HVACSizing.CoilHeatingDXMultiSpeed.rb +120 -0
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXMultiSpeed.rb +151 -7
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingGasMultiStage.rb +48 -7
- data/lib/openstudio-standards/hvac_sizing/Siz.Model.rb +14 -12
- data/lib/openstudio-standards/prototypes/Prototype.AirTerminalSingleDuctVAVReheat.rb +33 -7
- data/lib/openstudio-standards/prototypes/Prototype.Model.hvac.rb +123 -91
- data/lib/openstudio-standards/prototypes/Prototype.Model.rb +130 -45
- data/lib/openstudio-standards/prototypes/Prototype.Model.swh.rb +13 -7
- data/lib/openstudio-standards/prototypes/Prototype.full_service_restaurant.rb +332 -324
- data/lib/openstudio-standards/prototypes/Prototype.hospital.rb +401 -99
- data/lib/openstudio-standards/prototypes/Prototype.hvac_systems.rb +309 -222
- data/lib/openstudio-standards/prototypes/Prototype.large_hotel.rb +100 -80
- data/lib/openstudio-standards/prototypes/Prototype.large_office.rb +37 -22
- data/lib/openstudio-standards/prototypes/Prototype.medium_office.rb +68 -53
- data/lib/openstudio-standards/prototypes/Prototype.mid_rise_apartment.rb +109 -88
- data/lib/openstudio-standards/prototypes/Prototype.outpatient.rb +52 -4
- data/lib/openstudio-standards/prototypes/Prototype.primary_school.rb +230 -213
- data/lib/openstudio-standards/prototypes/Prototype.quick_service_restaurant.rb +225 -218
- data/lib/openstudio-standards/prototypes/Prototype.retail_standalone.rb +29 -17
- data/lib/openstudio-standards/prototypes/Prototype.retail_stripmall.rb +42 -32
- data/lib/openstudio-standards/prototypes/Prototype.secondary_school.rb +331 -314
- data/lib/openstudio-standards/prototypes/Prototype.small_hotel.rb +233 -219
- data/lib/openstudio-standards/prototypes/Prototype.small_office.rb +40 -32
- data/lib/openstudio-standards/prototypes/Prototype.warehouse.rb +19 -6
- data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +576 -555
- data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctVAVReheat.rb +3 -1
- data/lib/openstudio-standards/standards/Standards.BoilerHotWater.rb +35 -17
- data/lib/openstudio-standards/standards/Standards.ChillerElectricEIR.rb +51 -23
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXMultiSpeed.rb +255 -0
- data/lib/openstudio-standards/standards/Standards.CoilHeatingDXMultiSpeed.rb +192 -0
- data/lib/openstudio-standards/standards/Standards.CoilHeatingGasMultiStage.rb +65 -0
- data/lib/openstudio-standards/standards/Standards.Fan.rb +37 -6
- data/lib/openstudio-standards/standards/Standards.Model.rb +28 -3
- data/lib/openstudio-standards/standards/Standards.SpaceType.rb +3 -1
- data/lib/openstudio-standards/standards/Standards.WaterHeaterMixed.rb +41 -15
- data/lib/openstudio-standards/version.rb +1 -1
- data/lib/openstudio-standards/weather/Weather.Model.rb +509 -5
- data/lib/openstudio-standards/weather/Weather.stat_file.rb +145 -5
- metadata +8 -3
- data/lib/openstudio-standards/btap/environment.rb +0 -718
@@ -27,11 +27,25 @@ module EnergyPlus
|
|
27
27
|
attr_accessor :lon
|
28
28
|
attr_accessor :elevation
|
29
29
|
attr_accessor :gmt
|
30
|
-
attr_accessor :
|
30
|
+
attr_accessor :monthly_dry_bulb
|
31
|
+
attr_accessor :delta_dry_bulb
|
31
32
|
attr_accessor :hdd18
|
32
33
|
attr_accessor :cdd18
|
33
34
|
attr_accessor :hdd10
|
34
35
|
attr_accessor :cdd10
|
36
|
+
attr_accessor :heating_design_info
|
37
|
+
attr_accessor :cooling_design_info
|
38
|
+
attr_accessor :extremes_design_info
|
39
|
+
attr_accessor :climate_zone
|
40
|
+
attr_accessor :standard
|
41
|
+
attr_accessor :summer_wet_months
|
42
|
+
attr_accessor :winter_dry_months
|
43
|
+
attr_accessor :autumn_months
|
44
|
+
attr_accessor :spring_months
|
45
|
+
attr_accessor :typical_summer_wet_week
|
46
|
+
attr_accessor :typical_winter_dry_week
|
47
|
+
attr_accessor :typical_autumn_week
|
48
|
+
attr_accessor :typical_spring_week
|
35
49
|
|
36
50
|
def initialize(path)
|
37
51
|
@path = Pathname.new(path)
|
@@ -46,8 +60,45 @@ module EnergyPlus
|
|
46
60
|
@cdd10 = []
|
47
61
|
@monthly_dry_bulb = []
|
48
62
|
@delta_dry_bulb = []
|
63
|
+
@heating_design_info = []
|
64
|
+
@cooling_design_info = []
|
65
|
+
@extremes_design_info = []
|
66
|
+
@climate_zone = []
|
67
|
+
@standard = []
|
68
|
+
@summer_wet_months = []
|
69
|
+
@winter_dry_months = []
|
70
|
+
@autumn_months = []
|
71
|
+
@spring_months = []
|
72
|
+
@typical_summer_wet_week = []
|
73
|
+
@typical_winter_dry_week = []
|
74
|
+
@typical_autumn_week = []
|
75
|
+
@typical_spring_week = []
|
76
|
+
@data = []
|
49
77
|
init
|
50
78
|
end
|
79
|
+
|
80
|
+
#Output for debugging stat routines.
|
81
|
+
def output()
|
82
|
+
line = String.new
|
83
|
+
line << "#{@path} , "
|
84
|
+
line << "#{@lat} ,"
|
85
|
+
line << "#{@lon} ,"
|
86
|
+
line << "#{@gmt} ,"
|
87
|
+
line << "#{@elevation} ,"
|
88
|
+
line << "#{@hdd18} ,"
|
89
|
+
line << "#{@cdd18} ,"
|
90
|
+
line << "#{@hdd10} ,"
|
91
|
+
line << "#{@cdd10} ,"
|
92
|
+
line << "#{mean_dry_bulb} ,"
|
93
|
+
line << "#{delta_dry_bulb} ,"
|
94
|
+
line << "#{@heating_design_info} ,"
|
95
|
+
line << "#{@cooling_design_info} ,"
|
96
|
+
line << "#{@extremes_design_info} ,"
|
97
|
+
line << "#{@climate_zone} ,"
|
98
|
+
line << "#{@standard} ,"
|
99
|
+
line << "#{@valid} ,"
|
100
|
+
end
|
101
|
+
|
51
102
|
|
52
103
|
def valid?
|
53
104
|
return @valid
|
@@ -85,6 +136,7 @@ module EnergyPlus
|
|
85
136
|
File.open(@path) do |f|
|
86
137
|
text = f.read.force_encoding('iso-8859-1')
|
87
138
|
parse(text)
|
139
|
+
|
88
140
|
end
|
89
141
|
end
|
90
142
|
end
|
@@ -125,18 +177,21 @@ module EnergyPlus
|
|
125
177
|
end
|
126
178
|
end
|
127
179
|
|
180
|
+
|
128
181
|
# get heating and cooling degree days
|
129
|
-
cdd10Regex = /-\s*(.*) annual \(standard\) cooling degree-days \(10.C baseline\)/
|
182
|
+
cdd10Regex = /-\s*(.*) annual \((standard|wthr file)\) cooling degree-days \(10.C baseline\)/
|
130
183
|
match_data = text.match(cdd10Regex)
|
131
184
|
if match_data.nil?
|
132
185
|
OpenStudio::logFree(OpenStudio::Warn, "openstudio.Weather.stat_file", "Can't find CDD 10")
|
133
186
|
return
|
187
|
+
|
134
188
|
else
|
135
189
|
@cdd10 = match_data[1].to_f
|
136
190
|
end
|
137
191
|
|
138
|
-
hdd10Regex = /-\s*(.*) annual \(standard\) heating degree-days \(10.C baseline\)/
|
192
|
+
hdd10Regex = /-\s*(.*) annual \((standard|wthr file)\) heating degree-days \(10.C baseline\)/
|
139
193
|
match_data = text.match(hdd10Regex)
|
194
|
+
|
140
195
|
if match_data.nil?
|
141
196
|
OpenStudio::logFree(OpenStudio::Warn, "openstudio.Weather.stat_file", "Can't find HDD 10")
|
142
197
|
return
|
@@ -144,7 +199,7 @@ module EnergyPlus
|
|
144
199
|
@hdd10 = match_data[1].to_f
|
145
200
|
end
|
146
201
|
|
147
|
-
cdd18Regex = /-\s*(.*) annual \(standard\) cooling degree-days \(18
|
202
|
+
cdd18Regex = /-\s*(.*) annual \((standard|wthr file)\) cooling degree-days \(18.*C baseline\)/
|
148
203
|
match_data = text.match(cdd18Regex)
|
149
204
|
if match_data.nil?
|
150
205
|
OpenStudio::logFree(OpenStudio::Warn, "openstudio.Weather.stat_file", "Can't find CDD 18")
|
@@ -153,8 +208,9 @@ module EnergyPlus
|
|
153
208
|
@cdd18 = match_data[1].to_f
|
154
209
|
end
|
155
210
|
|
156
|
-
hdd18Regex = /-\s*(.*) annual \(standard\) heating degree-days \(18
|
211
|
+
hdd18Regex = /-\s*(.*) annual \((standard|wthr file)\) heating degree-days \(18.*C baseline\)/
|
157
212
|
match_data = text.match(hdd18Regex)
|
213
|
+
|
158
214
|
if match_data.nil?
|
159
215
|
OpenStudio::logFree(OpenStudio::Warn, "openstudio.Weather.stat_file", "Can't find HDD 18")
|
160
216
|
return
|
@@ -182,6 +238,90 @@ module EnergyPlus
|
|
182
238
|
# insert as numbers
|
183
239
|
monthly_temps.each { |temp| @monthly_dry_bulb << temp.to_f }
|
184
240
|
end
|
241
|
+
|
242
|
+
#Get 2004 Climate zone.
|
243
|
+
# - Climate type "3B" (ASHRAE Standard 196-2006 Climate Zone)**
|
244
|
+
# - Climate type "6A" (ASHRAE Standards 90.1-2004 and 90.2-2004 Climate Zone)**
|
245
|
+
#use regex to get the temperatures
|
246
|
+
regex = /Climate type \"(.*?)\" \(ASHRAE Standards?(.*)\)\*\*/
|
247
|
+
match_data = text.match(regex)
|
248
|
+
if match_data.nil?
|
249
|
+
OpenStudio::logFree(OpenStudio::Warn, "openstudio.Weather.stat_file", "Can't find Climate zone 2004")
|
250
|
+
@climate_zone = "NA"
|
251
|
+
else
|
252
|
+
@climate_zone = match_data[1].to_s.strip
|
253
|
+
@standard = match_data[2].to_s.strip
|
254
|
+
end
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
# Seasons as define by file (Summer, Autumn, Spring Winter...or Wet and Dry )
|
259
|
+
match_data = text.match(/(Summer is |Wet Period=)(.*)/)
|
260
|
+
if match_data.nil?
|
261
|
+
OpenStudio::logFree(OpenStudio::Warn, "openstudio.Weather.stat_file", "Can't Summer / Wet months")
|
262
|
+
else
|
263
|
+
@summer_wet_months = match_data[2].to_s.strip
|
264
|
+
end
|
265
|
+
|
266
|
+
match_data = text.match(/(Winter is |Dry Period=)(.*)/)
|
267
|
+
if match_data.nil?
|
268
|
+
OpenStudio::logFree(OpenStudio::Warn, "openstudio.Weather.stat_file", "Can't Winter / Dry months")
|
269
|
+
else
|
270
|
+
@winter_dry_months = match_data[2].to_s.strip
|
271
|
+
end
|
272
|
+
|
273
|
+
match_data = text.match(/Autumn is (.*)/)
|
274
|
+
if match_data.nil?
|
275
|
+
OpenStudio::logFree(OpenStudio::Warn, "openstudio.Weather.stat_file", "Can't Summer months")
|
276
|
+
@autumn_months = "NA"
|
277
|
+
else
|
278
|
+
@autumn_months = match_data[1].to_s.strip
|
279
|
+
end
|
280
|
+
|
281
|
+
match_data = text.match(/Spring is (.*)/)
|
282
|
+
if match_data.nil?
|
283
|
+
OpenStudio::logFree(OpenStudio::Warn, "openstudio.Weather.stat_file", "Can't Summer months")
|
284
|
+
@spring_months = "NA"
|
285
|
+
else
|
286
|
+
@spring_months = match_data[1].to_s.strip
|
287
|
+
end
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
regex = /Typical Week Period selected:(.*?)C/
|
293
|
+
match_data = text.scan(regex)
|
294
|
+
if match_data.nil?
|
295
|
+
OpenStudio::logFree(OpenStudio::Warn, "openstudio.Weather.stat_file", "Can't find Typical weather weeks")
|
296
|
+
else
|
297
|
+
@typical_summer_wet_week = Date.parse("#{match_data[0][0].split(":")[0]} 2000")
|
298
|
+
@typical_winter_dry_week = Date.parse("#{match_data[1][0].split(":")[0]} 2000")
|
299
|
+
if match_data[2].nil?
|
300
|
+
@typical_autumn_week = "NA"
|
301
|
+
@typical_spring_week = "NA"
|
302
|
+
else
|
303
|
+
@typical_autumn_week = Date.parse("#{match_data[2][0].split(":")[0]} 2000")
|
304
|
+
@typical_spring_week = Date.parse("#{match_data[3][0].split(":")[0]} 2000")
|
305
|
+
end
|
306
|
+
end
|
307
|
+
|
308
|
+
regex = /Extreme Hot Week Period selected:(.*?)C/
|
309
|
+
match_data = text.match(regex)
|
310
|
+
if match_data.nil?
|
311
|
+
OpenStudio::logFree(OpenStudio::Warn, "openstudio.Weather.stat_file", "Can't find Extreme hot weather week")
|
312
|
+
else
|
313
|
+
@extreme_hot_week = Date.parse("#{match_data[1].split(":")[0]}")
|
314
|
+
end
|
315
|
+
|
316
|
+
regex = /Extreme Cold Week Period selected:(.*?)C/
|
317
|
+
match_data = text.match(regex)
|
318
|
+
if match_data.nil?
|
319
|
+
OpenStudio::logFree(OpenStudio::Warn, "openstudio.Weather.stat_file", "Can't find Extreme hot weather week")
|
320
|
+
else
|
321
|
+
@extreme_cold_week = Date.parse("#{match_data[1].split(":")[0]}")
|
322
|
+
end
|
323
|
+
|
324
|
+
|
185
325
|
|
186
326
|
# now we are valid
|
187
327
|
@valid = true
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openstudio-standards
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Parker
|
@@ -20,7 +20,7 @@ authors:
|
|
20
20
|
autorequire:
|
21
21
|
bindir: bin
|
22
22
|
cert_chain: []
|
23
|
-
date: 2016-
|
23
|
+
date: 2016-06-28 00:00:00.000000000 Z
|
24
24
|
dependencies:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: bundler
|
@@ -148,7 +148,6 @@ files:
|
|
148
148
|
- lib/openstudio-standards/btap/compliance.rb
|
149
149
|
- lib/openstudio-standards/btap/economics.rb
|
150
150
|
- lib/openstudio-standards/btap/envelope.rb
|
151
|
-
- lib/openstudio-standards/btap/environment.rb
|
152
151
|
- lib/openstudio-standards/btap/equest.rb
|
153
152
|
- lib/openstudio-standards/btap/fileio.rb
|
154
153
|
- lib/openstudio-standards/btap/geometry.rb
|
@@ -164,6 +163,7 @@ files:
|
|
164
163
|
- lib/openstudio-standards/btap/utilities.rb
|
165
164
|
- lib/openstudio-standards/btap/vintagizer.rb
|
166
165
|
- lib/openstudio-standards/btap/visualization.rb
|
166
|
+
- lib/openstudio-standards/hvac_sizing/HVACSizing.CoilHeatingDXMultiSpeed.rb
|
167
167
|
- lib/openstudio-standards/hvac_sizing/Siz.AirConditionerVariableRefrigerantFlow.rb
|
168
168
|
- lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVAC.rb
|
169
169
|
- lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatCoolVAVChngByp.rb
|
@@ -267,9 +267,12 @@ files:
|
|
267
267
|
- lib/openstudio-standards/standards/Standards.BoilerHotWater.rb
|
268
268
|
- lib/openstudio-standards/standards/Standards.BuildingStory.rb
|
269
269
|
- lib/openstudio-standards/standards/Standards.ChillerElectricEIR.rb
|
270
|
+
- lib/openstudio-standards/standards/Standards.CoilCoolingDXMultiSpeed.rb
|
270
271
|
- lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb
|
271
272
|
- lib/openstudio-standards/standards/Standards.CoilCoolingDXTwoSpeed.rb
|
273
|
+
- lib/openstudio-standards/standards/Standards.CoilHeatingDXMultiSpeed.rb
|
272
274
|
- lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb
|
275
|
+
- lib/openstudio-standards/standards/Standards.CoilHeatingGasMultiStage.rb
|
273
276
|
- lib/openstudio-standards/standards/Standards.Construction.rb
|
274
277
|
- lib/openstudio-standards/standards/Standards.Fan.rb
|
275
278
|
- lib/openstudio-standards/standards/Standards.FanConstantVolume.rb
|
@@ -350,6 +353,7 @@ files:
|
|
350
353
|
- data/standards/OpenStudio_Standards_ground_temperatures.json
|
351
354
|
- data/standards/OpenStudio_Standards_heat_pumps.json
|
352
355
|
- data/standards/OpenStudio_Standards_heat_pumps_heating.json
|
356
|
+
- data/standards/OpenStudio_Standards_heat_rejection.json
|
353
357
|
- data/standards/OpenStudio_Standards_materials.json
|
354
358
|
- data/standards/OpenStudio_Standards_motors.json
|
355
359
|
- data/standards/OpenStudio_Standards_prototype_inputs.json
|
@@ -645,6 +649,7 @@ files:
|
|
645
649
|
- data/weather/USA_VT_Burlington.Intl.AP.726170_TMY3.ddy
|
646
650
|
- data/weather/USA_VT_Burlington.Intl.AP.726170_TMY3.epw
|
647
651
|
- data/weather/USA_VT_Burlington.Intl.AP.726170_TMY3.stat
|
652
|
+
- data/weather/weather_info.csv
|
648
653
|
homepage: http://openstudio.net
|
649
654
|
licenses:
|
650
655
|
- LGPL
|
@@ -1,718 +0,0 @@
|
|
1
|
-
# *********************************************************************
|
2
|
-
# * Copyright (c) 2008-2015, Natural Resources Canada
|
3
|
-
# * All rights reserved.
|
4
|
-
# *
|
5
|
-
# * This library is free software; you can redistribute it and/or
|
6
|
-
# * modify it under the terms of the GNU Lesser General Public
|
7
|
-
# * License as published by the Free Software Foundation; either
|
8
|
-
# * version 2.1 of the License, or (at your option) any later version.
|
9
|
-
# *
|
10
|
-
# * This library is distributed in the hope that it will be useful,
|
11
|
-
# * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
-
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
-
# * Lesser General Public License for more details.
|
14
|
-
# *
|
15
|
-
# * You should have received a copy of the GNU Lesser General Public
|
16
|
-
# * License along with this library; if not, write to the Free Software
|
17
|
-
# * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
-
# **********************************************************************/
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
require 'open-uri'
|
23
|
-
module BTAP
|
24
|
-
module Environment
|
25
|
-
WeatherData =
|
26
|
-
{
|
27
|
-
"CAN_AB_Calgary.718770_CWEC.epw" => { "country" => "CAN", "state_province" => "AB", "city" => "Calgary Int'l","hdd18" => 5146.0,"cdd18" => 40.0,"latitude" => 51.12, "longitude" => -114.02, "elevation" => 1084.0, "monthly_dry_bulb" => "[-8.2, -6.4, -3.8, 4.3, 9.4, 14.6, 16.8, 16.0, 10.2, 5.9, -3.6, -7.9]", "delta_dry_bulb" => 25.0 },
|
28
|
-
"CAN_AB_Edmonton.711230_CWEC.epw" => { "country" => "CAN", "state_province" => "AB", "city" => "Edmonton Stony Plain","hdd18" => 5583.0,"cdd18" => 22.0,"latitude" => 53.53, "longitude" => -114.1, "elevation" => 723.0, "monthly_dry_bulb" => "[-11.8, -9.4, -2.7, 3.9, 10.9, 14.4, 15.7, 14.7, 8.7, 3.5, -6.5, -9.1]", "delta_dry_bulb" => 27.5 },
|
29
|
-
"CAN_AB_Fort.McMurray.719320_CWEC.epw" => { "country" => "CAN", "state_province" => "AB", "city" => "Fort McMurray","hdd18" => 6191.0,"cdd18" => 65.0,"latitude" => 56.65, "longitude" => -111.22, "elevation" => 369.0, "monthly_dry_bulb" => "[-16.1, -12.7, -8.2, 1.7, 11.6, 15.1, 17.4, 14.8, 8.7, 3.8, -8.8, -13.8]", "delta_dry_bulb" => 33.5 },
|
30
|
-
"CAN_AB_Grande.Prairie.719400_CWEC.epw" => { "country" => "CAN", "state_province" => "AB", "city" => "Grand Prairie","hdd18" => 5897.0,"cdd18" => 26.0,"latitude" => 55.18, "longitude" => -118.88, "elevation" => 669.0, "monthly_dry_bulb" => "[-13.3, -10.7, -6.3, 2.6, 9.7, 14.0, 15.6, 15.3, 9.7, 4.2, -6.4, -12.2]", "delta_dry_bulb" => 28.9 },
|
31
|
-
"CAN_AB_Lethbridge.712430_CWEC.epw" => { "country" => "CAN", "state_province" => "AB", "city" => "Lethbridge","hdd18" => 4432.0,"cdd18" => 126.0,"latitude" => 49.63, "longitude" => -112.8, "elevation" => 921.0, "monthly_dry_bulb" => "[-6.8, -7.6, 0.2, 6.8, 11.1, 16.6, 18.9, 17.6, 12.3, 7.5, 0.8, -3.9]", "delta_dry_bulb" => 26.5 },
|
32
|
-
"CAN_AB_Medicine.Hat.718720_CWEC.epw" => { "country" => "CAN", "state_province" => "AB", "city" => "Medicine Hat","hdd18" => 4678.0,"cdd18" => 199.0,"latitude" => 50.02, "longitude" => -110.72, "elevation" => 716.0, "monthly_dry_bulb" => "[-11.8, -7.1, 0.4, 6.0, 12.1, 17.1, 19.6, 19.8, 12.8, 8.1, -2.4, -6.8]", "delta_dry_bulb" => 31.6 },
|
33
|
-
"CAN_BC_Abbotsford.711080_CWEC.epw" => { "country" => "CAN", "state_province" => "BC", "city" => "Abbotsford","hdd18" => 3134.0,"cdd18" => 33.0,"latitude" => 49.03, "longitude" => -122.37, "elevation" => 58.0, "monthly_dry_bulb" => "[2.8, 3.9, 5.4, 8.4, 12.3, 14.4, 16.8, 17.1, 13.5, 10.2, 5.3, 3.5]", "delta_dry_bulb" => 14.3 },
|
34
|
-
"CAN_BC_Comox.718930_CWEC.epw" => { "country" => "CAN", "state_province" => "BC", "city" => "Comox","hdd18" => 3177.0,"cdd18" => 30.0,"latitude" => 49.72, "longitude" => -124.9, "elevation" => 24.0, "monthly_dry_bulb" => "[2.1, 4.6, 5.6, 8.6, 11.3, 14.4, 17.1, 17.3, 13.5, 9.2, 5.5, 3.3]", "delta_dry_bulb" => 15.200000000000001 },
|
35
|
-
"CAN_BC_Cranbrook.718800_CWEC.epw" => { "country" => "CAN", "state_province" => "BC", "city" => "Cranbrook","hdd18" => 4645.0,"cdd18" => 118.0,"latitude" => 49.6, "longitude" => -115.78, "elevation" => 940.0, "monthly_dry_bulb" => "[-7.9, -3.2, 2.4, 6.0, 10.5, 14.4, 18.7, 17.3, 11.7, 5.4, -2.0, -6.6]", "delta_dry_bulb" => 26.6 },
|
36
|
-
"CAN_BC_Fort.St.John.719430_CWEC.epw" => { "country" => "CAN", "state_province" => "BC", "city" => "Fort St John","hdd18" => 5863.0,"cdd18" => 25.0,"latitude" => 56.23, "longitude" => -120.73, "elevation" => 695.0, "monthly_dry_bulb" => "[-13.8, -10.8, -5.0, 4.1, 9.8, 14.0, 15.3, 14.6, 8.9, 4.2, -6.7, -11.3]", "delta_dry_bulb" => 29.1 },
|
37
|
-
"CAN_BC_Kamloops.718870_CWEC.epw" => { "country" => "CAN", "state_province" => "BC", "city" => "Kamloops","hdd18" => 3629.0,"cdd18" => 287.0,"latitude" => 50.7, "longitude" => -120.45, "elevation" => 346.0, "monthly_dry_bulb" => "[-4.3, -1.2, 3.9, 9.2, 14.7, 18.4, 21.3, 20.3, 15.5, 8.0, 2.9, -3.4]", "delta_dry_bulb" => 25.6 },
|
38
|
-
"CAN_BC_Port.Hardy.711090_CWEC.epw" => { "country" => "CAN", "state_province" => "BC", "city" => "Port Hardy","hdd18" => 3712.0,"cdd18" => 0.0,"latitude" => 50.68, "longitude" => -127.37, "elevation" => 22.0, "monthly_dry_bulb" => "[2.5, 3.8, 4.7, 6.6, 9.5, 11.5, 13.3, 13.3, 11.2, 8.3, 5.4, 3.6]", "delta_dry_bulb" => 10.8 },
|
39
|
-
"CAN_BC_Prince.George.718960_CWEC.epw" => { "country" => "CAN", "state_province" => "BC", "city" => "Prince George","hdd18" => 5070.0,"cdd18" => 15.0,"latitude" => 53.88, "longitude" => -122.68, "elevation" => 691.0, "monthly_dry_bulb" => "[-10.8, -5.3, 0.1, 5.0, 10.2, 13.2, 14.5, 15.2, 10.8, 4.8, -2.4, -6.1]", "delta_dry_bulb" => 26.0 },
|
40
|
-
"CAN_BC_Prince.Rupert.718980_CWEC.epw" => { "country" => "CAN", "state_province" => "BC", "city" => "Prince Rupert","hdd18" => 4151.0,"cdd18" => 0.0,"latitude" => 54.3, "longitude" => -130.43, "elevation" => 34.0, "monthly_dry_bulb" => "[-0.2, 1.4, 3.1, 5.7, 8.6, 10.7, 12.9, 13.3, 11.0, 7.9, 3.3, 1.3]", "delta_dry_bulb" => 13.5 },
|
41
|
-
"CAN_BC_Sandspit.711010_CWEC.epw" => { "country" => "CAN", "state_province" => "BC", "city" => "Sandspit","hdd18" => 3644.0,"cdd18" => 0.0,"latitude" => 53.25, "longitude" => -131.82, "elevation" => 6.0, "monthly_dry_bulb" => "[1.4, 3.2, 5.0, 5.8, 9.0, 11.5, 13.6, 14.5, 12.7, 9.1, 6.4, 3.6]", "delta_dry_bulb" => 13.1 },
|
42
|
-
"CAN_BC_Smithers.719500_CWEC.epw" => { "country" => "CAN", "state_province" => "BC", "city" => "Smithers","hdd18" => 5265.0,"cdd18" => 22.0,"latitude" => 54.82, "longitude" => -127.18, "elevation" => 523.0, "monthly_dry_bulb" => "[-8.4, -3.9, -1.5, 4.6, 8.5, 12.2, 15.8, 14.1, 9.0, 4.6, -3.8, -8.0]", "delta_dry_bulb" => 24.200000000000003 },
|
43
|
-
"CAN_BC_Summerland.717680_CWEC.epw" => { "country" => "CAN", "state_province" => "BC", "city" => "Summerland","hdd18" => 3388.0,"cdd18" => 199.0,"latitude" => 49.57, "longitude" => -119.65, "elevation" => 479.0, "monthly_dry_bulb" => "[-1.7, 1.5, 4.2, 8.7, 13.8, 17.9, 20.1, 19.2, 14.7, 8.9, 3.9, -0.5]", "delta_dry_bulb" => 21.8 },
|
44
|
-
"CAN_BC_Vancouver.718920_CWEC.epw" => { "country" => "CAN", "state_province" => "BC", "city" => "Vancouver Int'l","hdd18" => 3019.0,"cdd18" => 4.0,"latitude" => 49.18, "longitude" => -123.17, "elevation" => 2.0, "monthly_dry_bulb" => "[3.2, 5.1, 6.1, 8.7, 11.8, 15.1, 17.0, 17.1, 13.8, 9.8, 5.3, 3.6]", "delta_dry_bulb" => 13.900000000000002 },
|
45
|
-
"CAN_BC_Victoria.717990_CWEC.epw" => { "country" => "CAN", "state_province" => "BC", "city" => "Victoria Int'l","hdd18" => 3075.0,"cdd18" => 8.0,"latitude" => 48.65, "longitude" => -123.43, "elevation" => 19.0, "monthly_dry_bulb" => "[3.8, 4.9, 6.2, 8.5, 11.7, 14.3, 15.8, 16.1, 13.1, 9.8, 6.5, 4.3]", "delta_dry_bulb" => 12.3 },
|
46
|
-
"CAN_MB_Brandon.711400_CWEC.epw" => { "country" => "CAN", "state_province" => "MB", "city" => "Brandon","hdd18" => 5912.0,"cdd18" => 95.0,"latitude" => 49.92, "longitude" => -99.95, "elevation" => 409.0, "monthly_dry_bulb" => "[-18.0, -14.7, -7.0, 3.7, 11.4, 16.1, 18.7, 17.8, 11.3, 4.9, -5.2, -15.2]", "delta_dry_bulb" => 36.7 },
|
47
|
-
"CAN_MB_Churchill.719130_CWEC.epw" => { "country" => "CAN", "state_province" => "MB", "city" => "Churchill","hdd18" => 9114.0,"cdd18" => 3.0,"latitude" => 58.75, "longitude" => -94.07, "elevation" => 29.0, "monthly_dry_bulb" => "[-23.4, -25.8, -19.8, -11.1, -1.2, 5.4, 11.9, 11.1, 5.5, -2.0, -12.1, -23.4]", "delta_dry_bulb" => 37.7 },
|
48
|
-
"CAN_MB_The.Pas.718670_CWEC.epw" => { "country" => "CAN", "state_province" => "MB", "city" => "The Pas","hdd18" => 6442.0,"cdd18" => 106.0,"latitude" => 53.97, "longitude" => -101.1, "elevation" => 271.0, "monthly_dry_bulb" => "[-19.4, -15.8, -8.6, -0.2, 10.7, 14.7, 18.5, 17.6, 9.8, 2.8, -6.2, -17.4]", "delta_dry_bulb" => 37.9 },
|
49
|
-
"CAN_MB_Winnipeg.718520_CWEC.epw" => { "country" => "CAN", "state_province" => "MB", "city" => "Winnipeg Int'l","hdd18" => 5754.0,"cdd18" => 197.0,"latitude" => 49.9, "longitude" => -97.23, "elevation" => 239.0, "monthly_dry_bulb" => "[-17.3, -14.3, -6.9, 4.2, 11.3, 16.9, 20.5, 18.6, 12.3, 5.7, -4.6, -14.1]", "delta_dry_bulb" => 37.8 },
|
50
|
-
"CAN_NB_Fredericton.717000_CWEC.epw" => { "country" => "CAN", "state_province" => "NB", "city" => "Fredericton","hdd18" => 4734.0,"cdd18" => 132.0,"latitude" => 45.87, "longitude" => -66.53, "elevation" => 20.0, "monthly_dry_bulb" => "[-10.0, -8.0, -2.3, 3.5, 11.3, 16.0, 19.5, 18.2, 13.5, 7.7, 0.9, -6.6]", "delta_dry_bulb" => 29.5 },
|
51
|
-
"CAN_NB_Miramichi.717440_CWEC.epw" => { "country" => "CAN", "state_province" => "NB", "city" => "Miramichi","hdd18" => 4921.0,"cdd18" => 141.0,"latitude" => 47.02, "longitude" => -65.45, "elevation" => 33.0, "monthly_dry_bulb" => "[-10.4, -8.9, -3.3, 2.9, 10.5, 16.1, 19.2, 18.1, 12.5, 7.0, 1.4, -7.0]", "delta_dry_bulb" => 29.6 },
|
52
|
-
"CAN_NB_Saint.John.716090_CWEC.epw" => { "country" => "CAN", "state_province" => "NB", "city" => "Saint John","hdd18" => 4695.0,"cdd18" => 12.0,"latitude" => 45.32, "longitude" => -65.88, "elevation" => 109.0, "monthly_dry_bulb" => "[-7.4, -6.4, -2.4, 3.5, 9.1, 13.4, 16.4, 16.2, 13.2, 8.0, 2.4, -4.7]", "delta_dry_bulb" => 23.799999999999997 },
|
53
|
-
"CAN_NF_Battle.Harbour.718170_CWEC.epw" => { "country" => "CAN", "state_province" => "NF", "city" => "Battle Harbour","hdd18" => 6462.0,"cdd18" => 0.0,"latitude" => 52.3, "longitude" => -55.83, "elevation" => 8.0, "monthly_dry_bulb" => "[-11.2, -10.2, -5.3, -1.6, 1.9, 5.0, 9.6, 10.4, 7.7, 3.3, -0.3, -6.6]", "delta_dry_bulb" => 21.6 },
|
54
|
-
"CAN_NF_Gander.718030_CWEC.epw" => { "country" => "CAN", "state_province" => "NF", "city" => "Gander Int'l","hdd18" => 5101.0,"cdd18" => 25.0,"latitude" => 48.95, "longitude" => -54.57, "elevation" => 151.0, "monthly_dry_bulb" => "[-6.1, -6.7, -3.7, 1.5, 6.9, 11.5, 15.9, 15.1, 11.0, 5.5, 1.1, -3.7]", "delta_dry_bulb" => 22.6 },
|
55
|
-
"CAN_NF_Goose.718160_CWEC.epw" => { "country" => "CAN", "state_province" => "NF", "city" => "Goose","hdd18" => 6558.0,"cdd18" => 38.0,"latitude" => 53.32, "longitude" => -60.37, "elevation" => 49.0, "monthly_dry_bulb" => "[-17.0, -15.2, -8.9, -0.9, 4.6, 11.9, 16.0, 14.3, 9.1, 2.7, -3.2, -12.9]", "delta_dry_bulb" => 33.0 },
|
56
|
-
"CAN_NF_St.Johns.718010_CWEC.epw" => { "country" => "CAN", "state_province" => "NF", "city" => "St John's","hdd18" => 4886.0,"cdd18" => 24.0,"latitude" => 47.62, "longitude" => -52.73, "elevation" => 140.0, "monthly_dry_bulb" => "[-3.3, -5.5, -2.1, 1.1, 5.7, 11.3, 15.0, 14.7, 11.4, 6.6, 2.4, -2.0]", "delta_dry_bulb" => 20.5 },
|
57
|
-
"CAN_NF_Stephenville.718150_CWEC.epw" => { "country" => "CAN", "state_province" => "NF", "city" => "Stephenville","hdd18" => 4724.0,"cdd18" => 10.0,"latitude" => 48.53, "longitude" => -58.55, "elevation" => 26.0, "monthly_dry_bulb" => "[-5.2, -6.7, -2.2, 3.4, 7.1, 11.3, 16.3, 16.4, 12.5, 7.3, 2.2, -2.4]", "delta_dry_bulb" => 23.099999999999998 },
|
58
|
-
"CAN_NS_Greenwood.713970_CWEC.epw" => { "country" => "CAN", "state_province" => "NS", "city" => "Greenwood","hdd18" => 4131.0,"cdd18" => 128.0,"latitude" => 44.98, "longitude" => -64.92, "elevation" => 28.0, "monthly_dry_bulb" => "[-4.7, -3.9, -0.7, 4.6, 10.9, 16.1, 19.1, 18.8, 13.5, 7.9, 4.2, -2.0]", "delta_dry_bulb" => 23.8 },
|
59
|
-
"CAN_NS_Sable.Island.716000_CWEC.epw" => { "country" => "CAN", "state_province" => "NS", "city" => "Sable Island","hdd18" => 3860.0,"cdd18" => 14.0,"latitude" => 43.93, "longitude" => -60.02, "elevation" => 4.0, "monthly_dry_bulb" => "[-0.7, -0.9, 0.6, 3.6, 6.4, 11.2, 15.1, 17.4, 15.5, 11.3, 7.0, 2.3]", "delta_dry_bulb" => 18.299999999999997 },
|
60
|
-
"CAN_NS_Shearwater.716010_CWEC.epw" => { "country" => "CAN", "state_province" => "NS", "city" => "Shearwater","hdd18" => 4197.0,"cdd18" => 58.0,"latitude" => 44.63, "longitude" => -63.5, "elevation" => 51.0, "monthly_dry_bulb" => "[-4.1, -4.2, -0.8, 3.9, 8.8, 13.7, 17.6, 17.8, 14.3, 9.3, 4.8, -1.9]", "delta_dry_bulb" => 22.0 },
|
61
|
-
"CAN_NS_Sydney.717070_CWEC.epw" => { "country" => "CAN", "state_province" => "NS", "city" => "Sydney","hdd18" => 4634.0,"cdd18" => 51.0,"latitude" => 46.17, "longitude" => -60.05, "elevation" => 62.0, "monthly_dry_bulb" => "[-5.3, -6.5, -3.1, 2.0, 7.3, 12.4, 17.5, 17.3, 13.0, 8.8, 3.0, -2.0]", "delta_dry_bulb" => 24.0 },
|
62
|
-
"CAN_NS_Truro.713980_CWEC.epw" => { "country" => "CAN", "state_province" => "NS", "city" => "Truro","hdd18" => 4537.0,"cdd18" => 35.0,"latitude" => 45.37, "longitude" => -63.27, "elevation" => 40.0, "monthly_dry_bulb" => "[-6.0, -7.5, -2.5, 2.4, 8.3, 14.6, 17.7, 17.0, 13.7, 8.4, 3.7, -2.7]", "delta_dry_bulb" => 25.2 },
|
63
|
-
"CAN_NT_Inuvik.719570_CWEC.epw" => { "country" => "CAN", "state_province" => "NT", "city" => "Inuvik Ua","hdd18" => 9952.0,"cdd18" => 17.0,"latitude" => 68.3, "longitude" => -133.48, "elevation" => 68.0, "monthly_dry_bulb" => "[-28.2, -27.5, -23.9, -12.9, -0.1, 10.4, 12.4, 10.4, 3.3, -8.9, -21.0, -25.9]", "delta_dry_bulb" => 40.6 },
|
64
|
-
"CAN_NU_Resolute.719240_CWEC.epw" => { "country" => "CAN", "state_province" => "NU", "city" => "Resolute","hdd18" => 12570.0,"cdd18" => 0.0,"latitude" => 74.72, "longitude" => -94.98, "elevation" => 67.0, "monthly_dry_bulb" => "[-30.6, -30.7, -32.2, -25.0, -10.8, -1.2, 3.7, 2.0, -4.2, -14.6, -24.7, -30.1]", "delta_dry_bulb" => 35.900000000000006 },
|
65
|
-
"CAN_ON_Kingston.716200_CWEC.epw" => { "country" => "CAN", "state_province" => "ON", "city" => "Kingston","hdd18" => 4287.0,"cdd18" => 187.0,"latitude" => 44.22, "longitude" => -76.6, "elevation" => 93.0, "monthly_dry_bulb" => "[-6.3, -7.1, -2.0, 3.5, 11.2, 16.0, 20.3, 20.6, 15.3, 10.5, 3.3, -5.2]", "delta_dry_bulb" => 27.700000000000003 },
|
66
|
-
"CAN_ON_London.716230_CWEC.epw" => { "country" => "CAN", "state_province" => "ON", "city" => "London","hdd18" => 4111.0,"cdd18" => 211.0,"latitude" => 43.03, "longitude" => -81.15, "elevation" => 278.0, "monthly_dry_bulb" => "[-7.1, -6.2, -0.7, 6.4, 11.7, 17.8, 20.8, 19.0, 15.3, 9.8, 3.2, -3.2]", "delta_dry_bulb" => 27.9 },
|
67
|
-
"CAN_ON_Mount.Forest.716310_CWEC.epw" => { "country" => "CAN", "state_province" => "ON", "city" => "Mount Forest","hdd18" => 4578.0,"cdd18" => 121.0,"latitude" => 43.98, "longitude" => -80.75, "elevation" => 415.0, "monthly_dry_bulb" => "[-9.2, -8.4, -2.6, 5.2, 10.4, 16.3, 18.5, 17.8, 14.3, 9.1, 1.6, -4.3]", "delta_dry_bulb" => 27.7 },
|
68
|
-
"CAN_ON_Muskoka.716300_CWEC.epw" => { "country" => "CAN", "state_province" => "ON", "city" => "Muskoka","hdd18" => 4774.0,"cdd18" => 97.0,"latitude" => 44.97, "longitude" => -79.3, "elevation" => 282.0, "monthly_dry_bulb" => "[-10.8, -9.6, -3.0, 4.7, 12.4, 16.4, 18.5, 17.3, 12.3, 6.9, 1.9, -5.8]", "delta_dry_bulb" => 29.3 },
|
69
|
-
"CAN_ON_North.Bay.717310_CWEC.epw" => { "country" => "CAN", "state_province" => "ON", "city" => "North Bay","hdd18" => 5341.0,"cdd18" => 103.0,"latitude" => 46.35, "longitude" => -79.43, "elevation" => 371.0, "monthly_dry_bulb" => "[-13.8, -11.1, -6.0, 3.5, 11.2, 16.0, 18.4, 17.0, 12.2, 6.9, -1.5, -10.1]", "delta_dry_bulb" => 32.2 },
|
70
|
-
"CAN_ON_Ottawa.716280_CWEC.epw" => { "country" => "CAN", "state_province" => "ON", "city" => "Ottawa Int'l","hdd18" => 4664.0,"cdd18" => 189.0,"latitude" => 45.32, "longitude" => -75.67, "elevation" => 114.0, "monthly_dry_bulb" => "[-11.5, -9.3, -2.1, 5.6, 12.2, 18.1, 20.3, 19.3, 14.2, 7.4, 1.2, -7.4]", "delta_dry_bulb" => 31.8 },
|
71
|
-
"CAN_ON_Sault.Ste.Marie.712600_CWEC.epw" => { "country" => "CAN", "state_province" => "ON", "city" => "Sault Ste Marie","hdd18" => 4993.0,"cdd18" => 75.0,"latitude" => 46.48, "longitude" => -84.52, "elevation" => 192.0, "monthly_dry_bulb" => "[-10.4, -10.0, -5.1, 3.9, 10.0, 14.3, 17.9, 17.0, 13.4, 7.8, 0.8, -6.4]", "delta_dry_bulb" => 28.299999999999997 },
|
72
|
-
"CAN_ON_Simcoe.715270_CWEC.epw" => { "country" => "CAN", "state_province" => "ON", "city" => "Simcoe","hdd18" => 4066.0,"cdd18" => 190.0,"latitude" => 42.85, "longitude" => -80.27, "elevation" => 241.0, "monthly_dry_bulb" => "[-6.3, -6.1, -0.3, 5.1, 11.6, 18.3, 20.1, 19.6, 14.3, 9.6, 3.8, -2.1]", "delta_dry_bulb" => 26.400000000000002 },
|
73
|
-
"CAN_ON_Thunder.Bay.717490_CWEC.epw" => { "country" => "CAN", "state_province" => "ON", "city" => "Thunder Bay","hdd18" => 5624.0,"cdd18" => 60.0,"latitude" => 48.37, "longitude" => -89.32, "elevation" => 199.0, "monthly_dry_bulb" => "[-15.8, -10.7, -5.9, 1.9, 9.9, 14.1, 18.0, 16.2, 11.0, 5.8, -1.7, -10.8]", "delta_dry_bulb" => 33.8 },
|
74
|
-
"CAN_ON_Timmins.717390_CWEC.epw" => { "country" => "CAN", "state_province" => "ON", "city" => "Timmins","hdd18" => 5952.0,"cdd18" => 63.0,"latitude" => 48.57, "longitude" => -81.37, "elevation" => 295.0, "monthly_dry_bulb" => "[-16.4, -13.0, -7.8, 1.3, 9.9, 14.5, 17.4, 15.9, 10.8, 5.2, -3.6, -12.8]", "delta_dry_bulb" => 33.8 },
|
75
|
-
"CAN_ON_Toronto.716240_CWEC.epw" => { "country" => "CAN", "state_province" => "ON", "city" => "Toronto Int'l","hdd18" => 4088.0,"cdd18" => 231.0,"latitude" => 43.67, "longitude" => -79.63, "elevation" => 173.0, "monthly_dry_bulb" => "[-5.8, -5.7, -0.7, 5.7, 12.0, 17.7, 20.8, 19.8, 15.0, 8.5, 3.5, -2.5]", "delta_dry_bulb" => 26.6 },
|
76
|
-
"CAN_ON_Trenton.716210_CWEC.epw" => { "country" => "CAN", "state_province" => "ON", "city" => "Trenton","hdd18" => 4176.0,"cdd18" => 207.0,"latitude" => 44.12, "longitude" => -77.53, "elevation" => 86.0, "monthly_dry_bulb" => "[-6.9, -6.4, -0.8, 5.8, 12.4, 17.4, 20.8, 19.3, 15.0, 9.0, 2.8, -3.8]", "delta_dry_bulb" => 27.700000000000003 },
|
77
|
-
"CAN_ON_Windsor.715380_CWEC.epw" => { "country" => "CAN", "state_province" => "ON", "city" => "Windsor","hdd18" => 3570.0,"cdd18" => 367.0,"latitude" => 42.27, "longitude" => -82.97, "elevation" => 190.0, "monthly_dry_bulb" => "[-4.5, -4.0, 1.0, 8.4, 13.1, 19.9, 22.6, 21.1, 17.4, 11.6, 4.7, -1.5]", "delta_dry_bulb" => 27.1 },
|
78
|
-
"CAN_PE_Charlottetown.717060_CWEC.epw" => { "country" => "CAN", "state_province" => "PE", "city" => "Charlottetown CDA","hdd18" => 4647.0,"cdd18" => 72.0,"latitude" => 46.28, "longitude" => -63.13, "elevation" => 54.0, "monthly_dry_bulb" => "[-7.5, -6.8, -3.5, 2.8, 9.0, 14.1, 18.1, 18.1, 14.2, 7.7, 3.2, -4.7]", "delta_dry_bulb" => 25.6 },
|
79
|
-
"CAN_PQ_Bagotville.717270_CWEC.epw" => { "country" => "CAN", "state_province" => "PQ", "city" => "Bagotville","hdd18" => 5781.0,"cdd18" => 49.0,"latitude" => 48.33, "longitude" => -71.0, "elevation" => 159.0, "monthly_dry_bulb" => "[-14.8, -12.9, -5.7, 2.1, 8.7, 15.7, 17.6, 15.4, 10.3, 5.4, -2.2, -13.1]", "delta_dry_bulb" => 32.400000000000006 },
|
80
|
-
"CAN_PQ_Baie.Comeau.711870_CWEC.epw" => { "country" => "CAN", "state_province" => "PQ", "city" => "Baie Comeau","hdd18" => 5889.0,"cdd18" => 3.0,"latitude" => 49.13, "longitude" => -68.2, "elevation" => 22.0, "monthly_dry_bulb" => "[-13.8, -11.6, -6.2, 0.7, 7.0, 12.3, 16.0, 14.3, 9.9, 4.4, -1.7, -9.8]", "delta_dry_bulb" => 29.8 },
|
81
|
-
"CAN_PQ_Grindstone.Island_CWEC.epw" => { "country" => "CAN", "state_province" => "PQ", "city" => "Grindstone Island","hdd18" => 4941.0,"cdd18" => 18.0,"latitude" => 47.38, "longitude" => -61.87, "elevation" => 59.0, "monthly_dry_bulb" => "[-7.0, -7.0, -2.2, 0.0, 5.1, 11.7, 15.9, 16.8, 12.3, 6.6, 3.2, -2.1]", "delta_dry_bulb" => 23.8 },
|
82
|
-
"CAN_PQ_Kuujjuarapik.719050_CWEC.epw" => { "country" => "CAN", "state_province" => "PQ", "city" => "Kuujjuarapik","hdd18" => 7986.0,"cdd18" => 12.0,"latitude" => 55.28, "longitude" => -77.77, "elevation" => 12.0, "monthly_dry_bulb" => "[-21.0, -20.4, -16.8, -6.9, 1.3, 6.5, 10.3, 11.0, 7.4, 2.0, -4.2, -16.2]", "delta_dry_bulb" => 32.0 },
|
83
|
-
"CAN_PQ_Kuujuaq.719060_CWEC.epw" => { "country" => "CAN", "state_province" => "PQ", "city" => "Kuujuaq","hdd18" => 8491.0,"cdd18" => 0.0,"latitude" => 58.1, "longitude" => -68.42, "elevation" => 37.0, "monthly_dry_bulb" => "[-20.7, -20.8, -19.0, -8.9, -0.3, 6.8, 11.0, 10.8, 4.7, -0.8, -8.2, -18.8]", "delta_dry_bulb" => 31.8 },
|
84
|
-
"CAN_PQ_La.Grande.Riviere.718270_CWEC.epw" => { "country" => "CAN", "state_province" => "PQ", "city" => "La Grande Riviere","hdd18" => 7616.0,"cdd18" => 11.0,"latitude" => 53.63, "longitude" => -77.7, "elevation" => 195.0, "monthly_dry_bulb" => "[-21.8, -21.6, -14.3, -5.3, 6.1, 10.1, 13.4, 12.0, 7.6, 1.9, -5.9, -17.4]", "delta_dry_bulb" => 35.2 },
|
85
|
-
"CAN_PQ_Lake.Eon.714210_CWEC.epw" => { "country" => "CAN", "state_province" => "PQ", "city" => "Lake Eon","hdd18" => 7383.0,"cdd18" => 8.0,"latitude" => 51.87, "longitude" => -63.28, "elevation" => 561.0, "monthly_dry_bulb" => "[-20.3, -14.7, -9.8, -5.1, 2.0, 9.2, 13.6, 11.6, 6.7, 0.1, -6.3, -14.2]", "delta_dry_bulb" => 33.9 },
|
86
|
-
"CAN_PQ_Mont.Joli.717180_CWEC.epw" => { "country" => "CAN", "state_province" => "PQ", "city" => "Mont Joli","hdd18" => 5522.0,"cdd18" => 65.0,"latitude" => 48.6, "longitude" => -68.22, "elevation" => 52.0, "monthly_dry_bulb" => "[-12.8, -10.4, -5.2, 1.8, 7.8, 14.1, 18.0, 16.2, 10.8, 5.2, -0.5, -9.1]", "delta_dry_bulb" => 30.8 },
|
87
|
-
"CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw" => { "country" => "CAN", "state_province" => "PQ", "city" => "Montreal Int'l","hdd18" => 4493.0,"cdd18" => 234.0,"latitude" => 45.47, "longitude" => -73.75, "elevation" => 36.0, "monthly_dry_bulb" => "[-9.8, -9.4, -2.7, 6.5, 13.0, 18.4, 20.4, 20.0, 14.6, 8.2, 2.6, -6.8]", "delta_dry_bulb" => 30.2 },
|
88
|
-
"CAN_PQ_Montreal.Jean.Brebeuf.716278_CWEC.epw" => { "country" => "CAN", "state_province" => "PQ", "city" => "Montreal Jean Brebeuf","hdd18" => 4616.0,"cdd18" => 209.0,"latitude" => 45.5, "longitude" => -73.62, "elevation" => 133.0, "monthly_dry_bulb" => "[-10.5, -9.4, -3.4, 5.2, 12.9, 18.6, 20.7, 19.6, 14.6, 7.8, 1.2, -6.8]", "delta_dry_bulb" => 31.2 },
|
89
|
-
"CAN_PQ_Montreal.Mirabel.716278_CWEC.epw" => { "country" => "CAN", "state_province" => "PQ", "city" => "Montreal Mirabel","hdd18" => 4861.0,"cdd18" => 102.0,"latitude" => 45.68, "longitude" => -74.03, "elevation" => 82.0, "monthly_dry_bulb" => "[-13.9, -7.2, -3.2, 5.7, 12.4, 17.0, 19.5, 17.7, 13.1, 6.7, 0.7, -9.5]", "delta_dry_bulb" => 33.4 },
|
90
|
-
"CAN_PQ_Nitchequon.CAN270_CWEC.epw" => { "country" => "CAN", "state_province" => "PQ", "city" => "Nitchequon","hdd18" => 7922.0,"cdd18" => 6.0,"latitude" => 53.2, "longitude" => -70.9, "elevation" => 536.0, "monthly_dry_bulb" => "[-22.5, -21.4, -14.2, -4.2, 2.7, 9.6, 13.3, 11.8, 6.4, -0.1, -7.8, -19.0]", "delta_dry_bulb" => 35.8 },
|
91
|
-
"CAN_PQ_Quebec.717140_CWEC.epw" => { "country" => "CAN", "state_province" => "PQ", "city" => "Quebec City","hdd18" => 4964.0,"cdd18" => 111.0,"latitude" => 46.8, "longitude" => -71.38, "elevation" => 73.0, "monthly_dry_bulb" => "[-11.6, -10.4, -3.9, 3.6, 11.4, 16.2, 19.4, 18.0, 12.9, 7.1, -0.2, -7.2]", "delta_dry_bulb" => 31.0 },
|
92
|
-
"CAN_PQ_Riviere.du.Loup.717150_CWEC.epw" => { "country" => "CAN", "state_province" => "PQ", "city" => "Riviere Du Loup","hdd18" => 5424.0,"cdd18" => 82.0,"latitude" => 47.8, "longitude" => -69.55, "elevation" => 148.0, "monthly_dry_bulb" => "[-12.3, -10.9, -5.2, 1.0, 8.7, 14.4, 17.8, 16.9, 10.0, 6.0, 0.8, -7.7]", "delta_dry_bulb" => 30.1 },
|
93
|
-
"CAN_PQ_Roberval.717280_CWEC.epw" => { "country" => "CAN", "state_province" => "PQ", "city" => "Roberval","hdd18" => 5757.0,"cdd18" => 97.0,"latitude" => 48.52, "longitude" => -72.27, "elevation" => 179.0, "monthly_dry_bulb" => "[-17.1, -12.7, -6.3, 2.1, 10.5, 15.7, 18.5, 16.2, 10.6, 5.6, -1.0, -13.1]", "delta_dry_bulb" => 35.6 },
|
94
|
-
"CAN_PQ_Schefferville.718280_CWEC.epw" => { "country" => "CAN", "state_province" => "PQ", "city" => "Schefferville","hdd18" => 8057.0,"cdd18" => 7.0,"latitude" => 54.8, "longitude" => -66.82, "elevation" => 521.0, "monthly_dry_bulb" => "[-21.6, -20.1, -14.1, -5.0, 1.3, 8.5, 13.0, 11.1, 5.3, -1.1, -9.3, -17.7]", "delta_dry_bulb" => 34.6 },
|
95
|
-
"CAN_PQ_Sept-Iles.718110_CWEC.epw" => { "country" => "CAN", "state_province" => "PQ", "city" => "Sept-Iles","hdd18" => 6134.0,"cdd18" => 4.0,"latitude" => 50.22, "longitude" => -66.27, "elevation" => 55.0, "monthly_dry_bulb" => "[-15.2, -14.5, -5.9, 1.0, 6.3, 11.6, 15.7, 14.1, 9.3, 3.8, -1.8, -11.1]", "delta_dry_bulb" => 30.9 },
|
96
|
-
"CAN_PQ_Sherbrooke.716100_CWEC.epw" => { "country" => "CAN", "state_province" => "PQ", "city" => "Sherbrooke","hdd18" => 5068.0,"cdd18" => 93.0,"latitude" => 45.43, "longitude" => -71.68, "elevation" => 241.0, "monthly_dry_bulb" => "[-10.0, -9.7, -3.6, 4.0, 11.3, 16.2, 18.2, 16.7, 11.6, 6.2, -0.9, -8.6]", "delta_dry_bulb" => 28.2 },
|
97
|
-
"CAN_PQ_St.Hubert.713710_CWEC.epw" => { "country" => "CAN", "state_province" => "PQ", "city" => "St Hubert","hdd18" => 4566.0,"cdd18" => 251.0,"latitude" => 45.52, "longitude" => -73.42, "elevation" => 27.0, "monthly_dry_bulb" => "[-10.0, -8.7, -2.8, 5.3, 13.4, 18.3, 21.2, 19.5, 14.9, 7.8, 1.4, -7.2]", "delta_dry_bulb" => 31.2 },
|
98
|
-
"CAN_PQ_Ste.Agathe.des.Monts.717200_CWEC.epw" => { "country" => "CAN", "state_province" => "PQ", "city" => "Ste Agathe Des Monts","hdd18" => 5350.0,"cdd18" => 45.0,"latitude" => 46.05, "longitude" => -74.28, "elevation" => 395.0, "monthly_dry_bulb" => "[-11.9, -11.0, -5.4, 2.9, 10.9, 15.3, 17.7, 16.4, 11.2, 5.1, -1.0, -9.6]", "delta_dry_bulb" => 29.6 },
|
99
|
-
"CAN_PQ_Val.d.Or.717250_CWEC.epw" => { "country" => "CAN", "state_province" => "PQ", "city" => "Val d'Or","hdd18" => 6129.0,"cdd18" => 79.0,"latitude" => 48.07, "longitude" => -77.78, "elevation" => 337.0, "monthly_dry_bulb" => "[-17.7, -15.2, -7.4, 0.8, 9.8, 14.6, 17.3, 15.5, 10.6, 3.8, -2.3, -13.9]", "delta_dry_bulb" => 35.0 },
|
100
|
-
"CAN_SK_Estevan.718620_CWEC.epw" => { "country" => "CAN", "state_province" => "SK", "city" => "Estevan","hdd18" => 5370.0,"cdd18" => 189.0,"latitude" => 49.22, "longitude" => -102.97, "elevation" => 581.0, "monthly_dry_bulb" => "[-14.9, -11.4, -5.6, 4.9, 11.9, 17.1, 20.2, 18.8, 12.2, 6.0, -3.4, -11.0]", "delta_dry_bulb" => 35.1 },
|
101
|
-
"CAN_SK_North.Battleford.718760_CWEC.epw" => { "country" => "CAN", "state_province" => "SK", "city" => "North Battleford","hdd18" => 5962.0,"cdd18" => 75.0,"latitude" => 52.77, "longitude" => -108.25, "elevation" => 548.0, "monthly_dry_bulb" => "[-17.3, -13.1, -8.6, 3.3, 11.1, 15.9, 18.1, 16.7, 11.0, 4.7, -6.2, -14.0]", "delta_dry_bulb" => 35.400000000000006 },
|
102
|
-
"CAN_SK_Regina.718630_CWEC.epw" => { "country" => "CAN", "state_province" => "SK", "city" => "Regina","hdd18" => 5646.0,"cdd18" => 129.0,"latitude" => 50.43, "longitude" => -104.67, "elevation" => 577.0, "monthly_dry_bulb" => "[-16.0, -11.4, -6.6, 3.2, 12.1, 16.5, 19.4, 17.6, 10.9, 4.1, -4.9, -11.1]", "delta_dry_bulb" => 35.4 },
|
103
|
-
"CAN_SK_Saskatoon.718660_CWEC.epw" => { "country" => "CAN", "state_province" => "SK", "city" => "Saskatoon","hdd18" => 5812.0,"cdd18" => 84.0,"latitude" => 52.17, "longitude" => -106.68, "elevation" => 504.0, "monthly_dry_bulb" => "[-15.6, -12.8, -7.8, 3.8, 11.8, 16.2, 18.8, 16.5, 10.5, 4.9, -5.9, -13.7]", "delta_dry_bulb" => 34.4 },
|
104
|
-
"CAN_SK_Swift.Current.718700_CWEC.epw" => { "country" => "CAN", "state_province" => "SK", "city" => "Swift Current","hdd18" => 5227.0,"cdd18" => 96.0,"latitude" => 50.28, "longitude" => -107.68, "elevation" => 818.0, "monthly_dry_bulb" => "[-12.6, -9.1, -5.1, 4.9, 11.2, 15.9, 18.2, 17.4, 11.2, 6.5, -3.3, -8.8]", "delta_dry_bulb" => 30.799999999999997 },
|
105
|
-
"CAN_YT_Whitehorse.719640_CWEC.epw" => { "country" => "CAN", "state_province" => "YT", "city" => "Whitehorse","hdd18" => 6946.0,"cdd18" => 2.0,"latitude" => 60.72, "longitude" => -135.07, "elevation" => 703.0, "monthly_dry_bulb" => "[-20.5, -11.3, -6.3, 0.1, 6.7, 11.5, 14.0, 11.6, 7.1, 0.2, -10.3, -15.8]", "delta_dry_bulb" => 34.5 },
|
106
|
-
"USA_CO_Denver.Intl.AP.725650_TMY3.epw" => { "country" => "USA", "state_province" => "CO", "city" => "Denver Intl Ap","hdd18" => 3131.0,"cdd18" => 528.0,"latitude" => 39.83, "longitude" => -104.65, "elevation" => 1650.0, "monthly_dry_bulb" => "[0.8, -0.1, 6.1, 5.8, 15.5, 23.1, 22.3, 22.6, 19.2, 10.0, 2.9, 1.4]", "delta_dry_bulb" => 23.200000000000003 },
|
107
|
-
"USA_MA_Boston-Logan.Intl.AP.725090_TMY3.epw" => { "country" => "USA", "state_province" => "MA", "city" => "Boston Logan IntL Arpt","hdd18" => 3121.0,"cdd18" => 420.0,"latitude" => 42.37, "longitude" => -71.02, "elevation" => 6.0, "monthly_dry_bulb" => "[-3.0, -0.5, 3.8, 8.6, 14.9, 18.9, 23.4, 21.7, 18.1, 12.2, 6.3, 2.2]", "delta_dry_bulb" => 26.4 },
|
108
|
-
}
|
109
|
-
|
110
|
-
#This method will look up the weather data.
|
111
|
-
#@author phylroy.lopez@nrcan.gc.ca
|
112
|
-
#@param file [String]
|
113
|
-
def self.weather_data_lookup(file)
|
114
|
-
|
115
|
-
end
|
116
|
-
|
117
|
-
#This method will create a climate index file.
|
118
|
-
#@author phylroy.lopez@nrcan.gc.ca
|
119
|
-
#@param folder [String]
|
120
|
-
#@param output_file [String]
|
121
|
-
def self.create_climate_index_file(folder = '../weather/', output_file = "C:/test/phylroy.csv" )
|
122
|
-
counter = 0
|
123
|
-
File.open(output_file, 'w') { |file|
|
124
|
-
file.write( "file,country,state_province_region,city,hdd18,cdd18,latitude,longitude,elevation, monthlyDB, deltaDB\n" )
|
125
|
-
BTAP::FileIO::get_find_files_from_folder_by_extension(folder, 'epw').each do |wfile|
|
126
|
-
wf = BTAP::Environment::WeatherFile.new(wfile)
|
127
|
-
file.write( "\"#{File.basename(wfile)}\" => { \"country\" => \"#{wf.country}\", \"state_province\" => \"#{wf.state_province_region}\", \"city\" => \"#{wf.city}\",\"hdd18\" => #{wf.hdd18},\"cdd18\" => #{wf.cdd18},\"latitude\" => #{wf.latitude}, \"longitude\" => #{wf.longitude}, \"elevation\" => #{wf.elevation}, \"monthly_dry_bulb\" => \"#{wf.monthly_dry_bulb}\", \"delta_dry_bulb\" => #{wf.delta_dry_bulb} },\n" )
|
128
|
-
counter += 1
|
129
|
-
end
|
130
|
-
|
131
|
-
}
|
132
|
-
puts "parsed #{counter} weather files."
|
133
|
-
end
|
134
|
-
|
135
|
-
|
136
|
-
class StatFile
|
137
|
-
attr_accessor :path
|
138
|
-
attr_accessor :valid
|
139
|
-
attr_accessor :lat
|
140
|
-
attr_accessor :lon
|
141
|
-
attr_accessor :elevation
|
142
|
-
attr_accessor :gmt
|
143
|
-
attr_accessor :monthly_dry_bulb
|
144
|
-
attr_accessor :hdd18
|
145
|
-
attr_accessor :cdd18
|
146
|
-
attr_accessor :hdd10
|
147
|
-
attr_accessor :cdd10
|
148
|
-
attr_accessor :heating_design_info
|
149
|
-
attr_accessor :cooling_design_info
|
150
|
-
attr_accessor :extremes_design_info
|
151
|
-
|
152
|
-
#This method initializes.
|
153
|
-
#@author phylroy.lopez@nrcan.gc.ca
|
154
|
-
#@param path [String]
|
155
|
-
def initialize(path)
|
156
|
-
@path = Pathname.new(path)
|
157
|
-
@valid = false
|
158
|
-
@lat = []
|
159
|
-
@lon = []
|
160
|
-
@gmt = []
|
161
|
-
@elevation = []
|
162
|
-
@hdd18 = []
|
163
|
-
@cdd18 = []
|
164
|
-
@hdd10 = []
|
165
|
-
@cdd10 = []
|
166
|
-
@monthly_dry_bulb = []
|
167
|
-
@delta_dry_bulb = []
|
168
|
-
@heating_design_info = []
|
169
|
-
@cooling_design_info = []
|
170
|
-
@extremes_design_info = []
|
171
|
-
init
|
172
|
-
end
|
173
|
-
|
174
|
-
def valid?
|
175
|
-
return @valid
|
176
|
-
end
|
177
|
-
|
178
|
-
# the mean of the mean monthly dry bulbs
|
179
|
-
def mean_dry_bulb
|
180
|
-
if not @monthly_dry_bulb.empty? then
|
181
|
-
sum = 0
|
182
|
-
@monthly_dry_bulb.each { |db| sum += db }
|
183
|
-
mean = sum/@monthly_dry_bulb.size
|
184
|
-
else
|
185
|
-
mean = ""
|
186
|
-
end
|
187
|
-
mean
|
188
|
-
end
|
189
|
-
|
190
|
-
# max - min of the mean monthly dry bulbs
|
191
|
-
def delta_dry_bulb
|
192
|
-
if not @monthly_dry_bulb.empty? then
|
193
|
-
delta_t = @monthly_dry_bulb.max-@monthly_dry_bulb.min
|
194
|
-
else
|
195
|
-
delta_t = ""
|
196
|
-
end
|
197
|
-
|
198
|
-
delta_t
|
199
|
-
end
|
200
|
-
|
201
|
-
private
|
202
|
-
|
203
|
-
# initialize
|
204
|
-
def init
|
205
|
-
if @path.exist?
|
206
|
-
text = File.read(@path).force_encoding("iso-8859-1")
|
207
|
-
parse(text)
|
208
|
-
#get HDD and CDD 18 in a better manner.
|
209
|
-
unless File.exist?(@path)
|
210
|
-
raise 'File does not exist: ' + @path.to_s
|
211
|
-
end
|
212
|
-
File.open(@path).each do |l|
|
213
|
-
line = String.new(l)
|
214
|
-
if line.include?("HDD base 18C")
|
215
|
-
@hdd18 = line.split(' ')[3..14].map { |x| x.to_i }.inject{|sum,x| sum + x }.to_f
|
216
|
-
end
|
217
|
-
if line.include?("CDD base 18C")
|
218
|
-
@cdd18 = line.split(' ')[3..14].map { |x| x.to_i }.inject{|sum,x| sum + x }.to_f
|
219
|
-
break
|
220
|
-
end
|
221
|
-
end
|
222
|
-
raise ("Invalid Weather file: Could not determine HDD or CDD from weatherstatfile. @path") if @cdd18.nil? or @hdd18.nil?
|
223
|
-
end
|
224
|
-
end
|
225
|
-
|
226
|
-
#This method parses text.
|
227
|
-
#@author phylroy.lopez@nrcan.gc.ca
|
228
|
-
#@param text [String]
|
229
|
-
#@return [Void]
|
230
|
-
def parse(text)
|
231
|
-
|
232
|
-
# get lat, lon, gmt
|
233
|
-
regex = /\{(N|S)\s*([0-9]*).\s*([0-9]*)'\}\s*\{(E|W)\s*([0-9]*).\s*([0-9]*)'\}\s*\{GMT\s*(.*)\s*Hours\}/
|
234
|
-
match_data = text.match(regex)
|
235
|
-
if match_data.nil?
|
236
|
-
puts "Can't find lat/lon/gmt"
|
237
|
-
return
|
238
|
-
else
|
239
|
-
|
240
|
-
@lat = match_data[2].to_f + (match_data[3].to_f)/60.0
|
241
|
-
if match_data[1] == 'S'
|
242
|
-
@lat = -@lat
|
243
|
-
end
|
244
|
-
|
245
|
-
@lon = match_data[5].to_f + (match_data[6].to_f)/60.0
|
246
|
-
if match_data[4] == 'W'
|
247
|
-
@lon = -@lon
|
248
|
-
end
|
249
|
-
|
250
|
-
@gmt = match_data[7]
|
251
|
-
end
|
252
|
-
|
253
|
-
# get elevation
|
254
|
-
regex = /Elevation --\s*(.*)m (above|below) sea level/
|
255
|
-
match_data = text.match(regex)
|
256
|
-
if match_data.nil?
|
257
|
-
puts "Can't find elevation"
|
258
|
-
return
|
259
|
-
else
|
260
|
-
@elevation = match_data[1].to_f
|
261
|
-
if match_data[2] == 'below'
|
262
|
-
@elevation = -@elevation
|
263
|
-
end
|
264
|
-
end
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
# get heating and cooling degree days
|
273
|
-
cdd10Regex = /-\s*(.*) annual \(standard\) cooling degree-days \(10.*C baseline\)/
|
274
|
-
match_data = text.match(cdd10Regex)
|
275
|
-
if match_data.nil?
|
276
|
-
puts "Can't find CDD 10"
|
277
|
-
else
|
278
|
-
@cdd10 = match_data[1].to_f
|
279
|
-
end
|
280
|
-
|
281
|
-
hdd10Regex = /-\s*(.*) annual \(standard\) heating degree-days \(10.*C baseline\)/
|
282
|
-
match_data = text.match(hdd10Regex)
|
283
|
-
if match_data.nil?
|
284
|
-
puts "Can't find HDD 10"
|
285
|
-
else
|
286
|
-
@hdd10 = match_data[1].to_f
|
287
|
-
end
|
288
|
-
|
289
|
-
cdd18Regex = /-\s*(.*) annual \(standard\) cooling degree-days \(18.3.*C baseline\)/
|
290
|
-
match_data = text.match(cdd18Regex)
|
291
|
-
if match_data.nil?
|
292
|
-
puts "Can't find CDD 18"
|
293
|
-
else
|
294
|
-
@cdd18 = match_data[1].to_f
|
295
|
-
end
|
296
|
-
|
297
|
-
hdd18Regex = /-\s*(.*) annual \(standard\) heating degree-days \(18.3.*C baseline\)/
|
298
|
-
match_data = text.match(hdd18Regex)
|
299
|
-
if match_data.nil?
|
300
|
-
puts "Can't find HDD 18"
|
301
|
-
else
|
302
|
-
@hdd18 = match_data[1].to_f
|
303
|
-
end
|
304
|
-
|
305
|
-
|
306
|
-
# Design Stat ColdestMonth DB996 DB990 DP996 HR_DP996 DB_DP996 DP990 HR_DP990 DB_DP990 WS004c DB_WS004c WS010c DB_WS010c WS_DB996 WD_DB996
|
307
|
-
# Units {} {�C} {�C} {�C} {} {�C} {�C} {} {�C} {m/s} {�C} {m/s} {�C} {m/s} {deg}
|
308
|
-
# Heating 12 -7 -4 -13.9 1.1 -5 -9.6 1.7 -2.9 14.2 5.9 11.9 6.8 2.9 100
|
309
|
-
#use regex to get the temperatures
|
310
|
-
regex = /\s*Heating(\s*\d+.*)\n/
|
311
|
-
match_data = text.match(regex)
|
312
|
-
if match_data.nil?
|
313
|
-
puts "Can't find heating design information"
|
314
|
-
else
|
315
|
-
# first match is outdoor air temps
|
316
|
-
|
317
|
-
heating_design_info_raw = match_data[1].strip.split(/\s+/)
|
318
|
-
|
319
|
-
# have to be 14 data points
|
320
|
-
if heating_design_info_raw.size != 15
|
321
|
-
puts "Can't find cooling design info, found #{heating_design_info_raw.size}"
|
322
|
-
end
|
323
|
-
|
324
|
-
# insert as numbers
|
325
|
-
heating_design_info_raw.each do |value|
|
326
|
-
@heating_design_info << value.to_f
|
327
|
-
end
|
328
|
-
#puts @heating_design_info
|
329
|
-
end
|
330
|
-
|
331
|
-
regex = /\s*Cooling(\s*\d+.*)\n/
|
332
|
-
match_data = text.match(regex)
|
333
|
-
if match_data.nil?
|
334
|
-
puts "Can't find cooling design information"
|
335
|
-
else
|
336
|
-
# first match is outdoor air temps
|
337
|
-
|
338
|
-
design_info_raw = match_data[1].strip.split(/\s+/)
|
339
|
-
|
340
|
-
# have to be 14 data points
|
341
|
-
if design_info_raw.size != 32
|
342
|
-
puts "Can't find cooling design info, found #{design_info_raw.size} "
|
343
|
-
end
|
344
|
-
|
345
|
-
# insert as numbers
|
346
|
-
design_info_raw.each do |value|
|
347
|
-
@cooling_design_info << value
|
348
|
-
end
|
349
|
-
#puts @cooling_design_info
|
350
|
-
end
|
351
|
-
|
352
|
-
regex = /\s*Extremes\s*(.*)\n/
|
353
|
-
match_data = text.match(regex)
|
354
|
-
if match_data.nil?
|
355
|
-
puts "Can't find extremes design information"
|
356
|
-
else
|
357
|
-
# first match is outdoor air temps
|
358
|
-
|
359
|
-
design_info_raw = match_data[1].strip.split(/\s+/)
|
360
|
-
|
361
|
-
# have to be 14 data points
|
362
|
-
if design_info_raw.size != 16
|
363
|
-
#puts "Can't find extremes design info"
|
364
|
-
end
|
365
|
-
|
366
|
-
# insert as numbers
|
367
|
-
design_info_raw.each do |value|
|
368
|
-
@extremes_design_info << value
|
369
|
-
end
|
370
|
-
#puts @extremes_design_info
|
371
|
-
end
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
#use regex to get the temperatures
|
377
|
-
regex = /Daily Avg(.*)\n/
|
378
|
-
match_data = text.match(regex)
|
379
|
-
if match_data.nil?
|
380
|
-
puts "Can't find outdoor air temps"
|
381
|
-
else
|
382
|
-
# first match is outdoor air temps
|
383
|
-
monthly_temps = match_data[1].strip.split(/\s+/)
|
384
|
-
|
385
|
-
# have to be 12 months
|
386
|
-
if monthly_temps.size != 12
|
387
|
-
puts "Can't find outdoor air temps"
|
388
|
-
end
|
389
|
-
|
390
|
-
# insert as numbers
|
391
|
-
monthly_temps.each { |temp| @monthly_dry_bulb << temp.to_f }
|
392
|
-
#puts "#{@monthly_dry_bulb}"
|
393
|
-
end
|
394
|
-
|
395
|
-
# now we are valid
|
396
|
-
@valid = true
|
397
|
-
end
|
398
|
-
|
399
|
-
end
|
400
|
-
class WeatherFile
|
401
|
-
|
402
|
-
attr_accessor :location_name,
|
403
|
-
:energy_plus_location_name,
|
404
|
-
:latitude,
|
405
|
-
:longitude,
|
406
|
-
:elevation,
|
407
|
-
:city,
|
408
|
-
:state_province_region,
|
409
|
-
:country,
|
410
|
-
:hdd18,
|
411
|
-
:cdd18,
|
412
|
-
:hdd10,
|
413
|
-
:cdd10,
|
414
|
-
:monthly_dry_bulb,
|
415
|
-
:delta_dry_bulb
|
416
|
-
|
417
|
-
attr_accessor :heating_design_info
|
418
|
-
attr_accessor :cooling_design_info
|
419
|
-
attr_accessor :extremes_design_info
|
420
|
-
|
421
|
-
Year = 0
|
422
|
-
Month = 1
|
423
|
-
Day = 2
|
424
|
-
Hour= 3
|
425
|
-
Minute = 4
|
426
|
-
Data_Source = 5
|
427
|
-
Dry_Bulb_Temperature = 6
|
428
|
-
Dew_Point_Temperature = 7
|
429
|
-
Relative_Humidity = 8
|
430
|
-
Atmospheric_Station_Pressure = 9
|
431
|
-
Extraterrestrial_Horizontal_Radiation = 10 #not used
|
432
|
-
Extraterrestrial_Direct_Normal_Radiation = 11 #not used
|
433
|
-
Horizontal_Infrared_Radiation_Intensity = 12
|
434
|
-
Global_Horizontal_Radiation = 13 #not used
|
435
|
-
Direct_Normal_Radiation = 14
|
436
|
-
Diffuse_Horizontal_Radiation = 15
|
437
|
-
Global_Horizontal_Illuminance = 16 #not used
|
438
|
-
Direct_Normal_Illuminance = 17#not used
|
439
|
-
Diffuse_Horizontal_Illuminance = 18#not used
|
440
|
-
Zenith_Luminance = 19#not used
|
441
|
-
Wind_Direction = 20
|
442
|
-
Wind_Speed = 21
|
443
|
-
Total_Sky_Cover = 22#not used
|
444
|
-
Opaque_Sky_Cover = 23#not used
|
445
|
-
Visibility = 24#not used
|
446
|
-
Ceiling_Height = 25#not used
|
447
|
-
Present_Weather_Observation = 26
|
448
|
-
Present_Weather_Codes = 27
|
449
|
-
Precipitable_Water = 28 #not used
|
450
|
-
Aerosol_Optical_Depth = 29 #not used
|
451
|
-
Snow_Depth = 30
|
452
|
-
Days_Since_Last_Snowfall = 31#not used
|
453
|
-
Albedo = 32 #not used
|
454
|
-
Liquid_Precipitation_Depth = 33
|
455
|
-
Liquid_Precipitation_Quantity = 34
|
456
|
-
|
457
|
-
#This method initializes and returns self.
|
458
|
-
#@author phylroy.lopez@nrcan.gc.ca
|
459
|
-
#@param weather_file [String]
|
460
|
-
#@return [String] self
|
461
|
-
def initialize(weather_file)
|
462
|
-
# Define the openstudio-standards weather location
|
463
|
-
top_dir = File.expand_path( '../../..',File.dirname(__FILE__))
|
464
|
-
weather_dir = "#{top_dir}/data/weather"
|
465
|
-
|
466
|
-
# First check if the epw file exists at a full path. If not found there,
|
467
|
-
# check for the file in the openstudio-standards/data/weather directory.
|
468
|
-
weather_file = weather_file.to_s
|
469
|
-
@epw_filepath = nil
|
470
|
-
@ddy_filepath = nil
|
471
|
-
@stat_filepath = nil
|
472
|
-
if File.exists?(weather_file)
|
473
|
-
@epw_filepath = "#{weather_file}"
|
474
|
-
@ddy_filepath = "#{weather_file.sub('epw','ddy')}"
|
475
|
-
@stat_filepath = "#{weather_file.sub('epw','stat')}"
|
476
|
-
elsif File.exists?("#{weather_dir}/#{weather_file}")
|
477
|
-
@epw_filepath = "#{weather_dir}/#{weather_file}"
|
478
|
-
@ddy_filepath = "#{weather_dir}/#{weather_file.sub('epw','ddy')}"
|
479
|
-
@stat_filepath = "#{weather_dir}/#{weather_file.sub('epw','stat')}"
|
480
|
-
else
|
481
|
-
raise("Could not find weather file #{weather_file}. Make sure file path is correct.")
|
482
|
-
end
|
483
|
-
|
484
|
-
# Ensure that epw, ddy, and stat file all exist
|
485
|
-
raise("Weather file #{@epw_filepath} not found.") unless File.exists?(@epw_filepath) && @epw_filepath.downcase.include?('.epw')
|
486
|
-
raise("Weather file ddy #{@ddy_filepath} not found.") unless File.exists?(@ddy_filepath) && @ddy_filepath.downcase.include?('.ddy')
|
487
|
-
raise("Weather file stat #{@stat_filepath} not found.") unless File.exists?(@stat_filepath) && @stat_filepath.downcase.include?('.stat')
|
488
|
-
|
489
|
-
#load file objects.
|
490
|
-
@epw_file = OpenStudio::EpwFile.new(OpenStudio::Path.new(@epw_filepath))
|
491
|
-
if OpenStudio::EnergyPlus.loadAndTranslateIdf(@ddy_filepath).empty?
|
492
|
-
raise ("Unable to load ddy idf file#{@ddy_filepath}.")
|
493
|
-
else
|
494
|
-
@ddy_file = OpenStudio::EnergyPlus.loadAndTranslateIdf(@ddy_filepath).get
|
495
|
-
end
|
496
|
-
@stat_file = StatFile.new( @stat_filepath )
|
497
|
-
|
498
|
-
#assign variables.
|
499
|
-
|
500
|
-
@latitude = @epw_file.latitude
|
501
|
-
@longitude = @epw_file.longitude
|
502
|
-
@elevation = @epw_file.elevation
|
503
|
-
@city = @epw_file.city
|
504
|
-
@state_province_region = @epw_file.stateProvinceRegion
|
505
|
-
@country = @epw_file.country
|
506
|
-
@hdd18 = @stat_file.hdd18
|
507
|
-
@cdd18 = @stat_file.cdd18
|
508
|
-
@hdd10 = @stat_file.hdd10
|
509
|
-
@cdd10 = @stat_file.cdd10
|
510
|
-
@monthly_dry_bulb = @stat_file.monthly_dry_bulb
|
511
|
-
@mean_dry_bulb = @stat_file.mean_dry_bulb
|
512
|
-
@delta_dry_bulb = @stat_file.delta_dry_bulb
|
513
|
-
@location_name = "#{@country}-#{@state_province_region}-#{@city}"
|
514
|
-
@energy_plus_location_name = "#{@city}_#{@state_province_region}_#{@country}"
|
515
|
-
@heating_design_info = @stat_file.heating_design_info
|
516
|
-
@cooling_design_info = @stat_file.cooling_design_info
|
517
|
-
@extremes_design_info = @stat_file.extremes_design_info
|
518
|
-
|
519
|
-
|
520
|
-
return self
|
521
|
-
end
|
522
|
-
|
523
|
-
#This method will set the weather file and returns a log string.
|
524
|
-
#@author phylroy.lopez@nrcan.gc.ca
|
525
|
-
#@param model [OpenStudio::model::Model] A model object
|
526
|
-
#@return [String] log
|
527
|
-
def set_weather_file(model, runner = nil)
|
528
|
-
BTAP::runner_register("Info", "BTAP::Environment::WeatherFile::set_weather",runner)
|
529
|
-
OpenStudio::Model::WeatherFile::setWeatherFile(model, @epw_file)
|
530
|
-
BTAP::runner_register("Info", "Set model \"#{model.building.get.name}\" to weather file #{model.weatherFile.get.path.get}.\n",runner)
|
531
|
-
|
532
|
-
# Add or update site data
|
533
|
-
site = model.getSite
|
534
|
-
site.setName("#{@epw_file.city}_#{@epw_file.stateProvinceRegion}_#{@epw_file.country}")
|
535
|
-
site.setLatitude(@epw_file.latitude)
|
536
|
-
site.setLongitude(@epw_file.longitude)
|
537
|
-
site.setTimeZone(@epw_file.timeZone)
|
538
|
-
site.setElevation(@epw_file.elevation)
|
539
|
-
|
540
|
-
BTAP::runner_register("Info","Setting water main temperatures via parsing of STAT file.", runner )
|
541
|
-
water_temp = model.getSiteWaterMainsTemperature
|
542
|
-
water_temp.setAnnualAverageOutdoorAirTemperature(@stat_file.mean_dry_bulb)
|
543
|
-
water_temp.setMaximumDifferenceInMonthlyAverageOutdoorAirTemperatures(@stat_file.delta_dry_bulb)
|
544
|
-
BTAP::runner_register("Info","SiteWaterMainsTemperature.AnnualAverageOutdoorAirTemperature = #{@stat_file.mean_dry_bulb}.", runner )
|
545
|
-
BTAP::runner_register("Info","SiteWaterMainsTemperature.MaximumDifferenceInMonthlyAverageOutdoorAirTemperatures = #{@stat_file.delta_dry_bulb}.", runner )
|
546
|
-
|
547
|
-
# Remove all the Design Day objects that are in the file
|
548
|
-
model.getObjectsByType("OS:SizingPeriod:DesignDay".to_IddObjectType).each { |d| d.remove }
|
549
|
-
|
550
|
-
# Load in the ddy file based on convention that it is in the same directory and has the same basename as the weather
|
551
|
-
@ddy_file.getObjectsByType("OS:SizingPeriod:DesignDay".to_IddObjectType).each do |d|
|
552
|
-
# grab only the ones that matter
|
553
|
-
ddy_list = /(Htg 99.6. Condns DB)|(Clg .4. Condns WB=>MDB)|(Clg .4% Condns DB=>MWB)/
|
554
|
-
if d.name.get =~ ddy_list
|
555
|
-
BTAP::runner_register("Info","Adding design day '#{d.name}'.",runner)
|
556
|
-
# add the object to the existing model
|
557
|
-
model.addObject(d.clone)
|
558
|
-
end
|
559
|
-
end
|
560
|
-
return true
|
561
|
-
end
|
562
|
-
|
563
|
-
#This method scans.
|
564
|
-
#@author phylroy.lopez@nrcan.gc.ca
|
565
|
-
def scan()
|
566
|
-
@filearray = Array.new()
|
567
|
-
file = File.new(@epw_filepath, "r")
|
568
|
-
while (line = file.gets)
|
569
|
-
@filearray.push(line.split(","))
|
570
|
-
end
|
571
|
-
file.close
|
572
|
-
end
|
573
|
-
|
574
|
-
#This method will sets column to a value.
|
575
|
-
#@author phylroy.lopez@nrcan.gc.ca
|
576
|
-
#@param column [String]
|
577
|
-
#@param value [Fixnum]
|
578
|
-
def setcolumntovalue(column,value)
|
579
|
-
@filearray.each do |line|
|
580
|
-
unless line.first =~ /\D(.*)/
|
581
|
-
line[column] = value
|
582
|
-
end
|
583
|
-
end
|
584
|
-
end
|
585
|
-
|
586
|
-
#This method will eliminate all radiation and returns self.
|
587
|
-
#@author phylroy.lopez@nrcan.gc.ca
|
588
|
-
#@return [String] self
|
589
|
-
def eliminate_all_radiation()
|
590
|
-
self.scan() if @filearray == nil
|
591
|
-
setcolumntovalue(Extraterrestrial_Horizontal_Radiation,"0")#not used
|
592
|
-
setcolumntovalue(Extraterrestrial_Direct_Normal_Radiation,"0")#not used
|
593
|
-
setcolumntovalue(Horizontal_Infrared_Radiation_Intensity,"315")
|
594
|
-
setcolumntovalue(Global_Horizontal_Radiation,"0")#not used
|
595
|
-
setcolumntovalue(Direct_Normal_Radiation,"0")
|
596
|
-
setcolumntovalue(Diffuse_Horizontal_Radiation,"0")
|
597
|
-
setcolumntovalue(Total_Sky_Cover,"10")#not used
|
598
|
-
setcolumntovalue(Opaque_Sky_Cover,"10")#not used
|
599
|
-
setcolumntovalue(Visibility,"0")#not used
|
600
|
-
setcolumntovalue(Ceiling_Height,"0")#not used
|
601
|
-
#lux values
|
602
|
-
setcolumntovalue(Global_Horizontal_Illuminance,"0")#not used
|
603
|
-
setcolumntovalue(Direct_Normal_Illuminance,"0")#not used
|
604
|
-
setcolumntovalue(Diffuse_Horizontal_Illuminance,"0")#not used
|
605
|
-
setcolumntovalue(Zenith_Luminance,"0")#not used
|
606
|
-
return self
|
607
|
-
end
|
608
|
-
|
609
|
-
#This method will eliminate solar radiation and returns self.
|
610
|
-
#@author phylroy.lopez@nrcan.gc.ca
|
611
|
-
#@return [String] self
|
612
|
-
def eliminate_only_solar_radiation()
|
613
|
-
self.scan() if @filearray == nil
|
614
|
-
setcolumntovalue(Global_Horizontal_Radiation,"0")#not used
|
615
|
-
setcolumntovalue(Direct_Normal_Radiation,"0")
|
616
|
-
setcolumntovalue(Diffuse_Horizontal_Radiation,"0")
|
617
|
-
return self
|
618
|
-
end
|
619
|
-
|
620
|
-
#This method will eliminate all radiation except solar and returns self.
|
621
|
-
#@author phylroy.lopez@nrcan.gc.ca
|
622
|
-
#@return [String] self
|
623
|
-
def eliminate_all_radiation_except_solar()
|
624
|
-
self.scan() if @filearray == nil
|
625
|
-
setcolumntovalue(Extraterrestrial_Horizontal_Radiation,"0")#not used
|
626
|
-
setcolumntovalue(Extraterrestrial_Direct_Normal_Radiation,"0")#not used
|
627
|
-
setcolumntovalue(Horizontal_Infrared_Radiation_Intensity,"315")
|
628
|
-
setcolumntovalue(Total_Sky_Cover,"10")#not used
|
629
|
-
setcolumntovalue(Opaque_Sky_Cover,"10")#not used
|
630
|
-
setcolumntovalue(Visibility,"0")#not used
|
631
|
-
setcolumntovalue(Ceiling_Height,"0")#not used
|
632
|
-
#lux values
|
633
|
-
setcolumntovalue(Global_Horizontal_Illuminance,"0")#not used
|
634
|
-
setcolumntovalue(Direct_Normal_Illuminance,"0")#not used
|
635
|
-
setcolumntovalue(Diffuse_Horizontal_Illuminance,"0")#not used
|
636
|
-
setcolumntovalue(Zenith_Luminance,"0")#not used
|
637
|
-
return self
|
638
|
-
end
|
639
|
-
|
640
|
-
#This method will eliminate percipitation and returns self.
|
641
|
-
#@author phylroy.lopez@nrcan.gc.ca
|
642
|
-
#@return [String] self
|
643
|
-
def eliminate_percipitation
|
644
|
-
self.scan() if @filearray == nil
|
645
|
-
setcolumntovalue(Present_Weather_Observation, "0")
|
646
|
-
setcolumntovalue(Present_Weather_Codes,"999999999") #no weather. Clear day.
|
647
|
-
setcolumntovalue(Snow_Depth,"0")
|
648
|
-
setcolumntovalue(Liquid_Precipitation_Depth,"0")
|
649
|
-
setcolumntovalue(Liquid_Precipitation_Quantity,"0")
|
650
|
-
return self
|
651
|
-
end
|
652
|
-
|
653
|
-
#This method eliminates wind and returns self.
|
654
|
-
#@author phylroy.lopez@nrcan.gc.ca
|
655
|
-
#@return [String] self
|
656
|
-
def eliminate_wind
|
657
|
-
self.scan() if @filearray == nil
|
658
|
-
setcolumntovalue(Wind_Direction,"0")
|
659
|
-
setcolumntovalue(Wind_Speed,"0")
|
660
|
-
return self
|
661
|
-
end
|
662
|
-
|
663
|
-
#This method sets Constant Dry and Dew Point Temperature Humidity And Pressure and returns self.
|
664
|
-
#@author phylroy.lopez@nrcan.gc.ca
|
665
|
-
#@param dbt [Float] dry bulb temperature
|
666
|
-
#@param dpt [Float] dew point temperature
|
667
|
-
#@param hum [Fixnum] humidity
|
668
|
-
#@param press [Fixnum] pressure
|
669
|
-
#@return [String] self
|
670
|
-
def setConstantDryandDewPointTemperatureHumidityAndPressure(dbt = "0.0",dpt="-1.1",hum="92",press="98500")
|
671
|
-
self.scan() if @filearray == nil
|
672
|
-
setcolumntovalue(Dry_Bulb_Temperature,dbt)
|
673
|
-
setcolumntovalue(Dew_Point_Temperature,dpt)
|
674
|
-
setcolumntovalue(Relative_Humidity,hum)
|
675
|
-
setcolumntovalue(Atmospheric_Station_Pressure,press)
|
676
|
-
return self
|
677
|
-
end
|
678
|
-
|
679
|
-
#This method writes to a file.
|
680
|
-
#@author phylroy.lopez@nrcan.gc.ca
|
681
|
-
#@param filename [String]
|
682
|
-
def writetofile(filename)
|
683
|
-
self.scan() if @filearray == nil
|
684
|
-
|
685
|
-
begin
|
686
|
-
FileUtils.mkdir_p(File.dirname(filename))
|
687
|
-
file = File.open(filename, "w")
|
688
|
-
@filearray.each do |line|
|
689
|
-
firstvalue = true
|
690
|
-
newline = ""
|
691
|
-
line.each do |value|
|
692
|
-
if firstvalue == true
|
693
|
-
firstvalue = false
|
694
|
-
else
|
695
|
-
newline = newline +","
|
696
|
-
end
|
697
|
-
newline = newline + value
|
698
|
-
end
|
699
|
-
file.puts(newline)
|
700
|
-
end
|
701
|
-
rescue IOError => e
|
702
|
-
#some error occur, dir not writable etc.
|
703
|
-
ensure
|
704
|
-
file.close unless file == nil
|
705
|
-
end
|
706
|
-
#copies original file
|
707
|
-
FileUtils.cp(@ddy_filepath, "#{File.dirname(filename)}/#{File.basename(filename,'.epw')}.ddy")
|
708
|
-
FileUtils.cp(@stat_filepath, "#{File.dirname(filename)}/#{File.basename(filename,'.epw')}.stat")
|
709
|
-
end
|
710
|
-
|
711
|
-
end #Environment
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
end
|
717
|
-
end
|
718
|
-
|