Class: EnergyPlus::StatFile
- Inherits:
-
Object
- Object
- EnergyPlus::StatFile
- Defined in:
- lib/openstudio-standards/weather/Weather.stat_file.rb
Instance Attribute Summary collapse
-
#cdd10 ⇒ Object
Returns the value of attribute cdd10.
-
#cdd18 ⇒ Object
Returns the value of attribute cdd18.
-
#elevation ⇒ Object
Returns the value of attribute elevation.
-
#gmt ⇒ Object
Returns the value of attribute gmt.
-
#hdd10 ⇒ Object
Returns the value of attribute hdd10.
-
#hdd18 ⇒ Object
Returns the value of attribute hdd18.
-
#lat ⇒ Object
Returns the value of attribute lat.
-
#lon ⇒ Object
Returns the value of attribute lon.
-
#monthlyDB ⇒ Object
Returns the value of attribute monthlyDB.
-
#path ⇒ Object
Returns the value of attribute path.
-
#valid ⇒ Object
Returns the value of attribute valid.
Instance Method Summary collapse
-
#delta_dry_bulb ⇒ Object
max - min of the mean monthly dry bulbs.
-
#initialize(path) ⇒ StatFile
constructor
A new instance of StatFile.
-
#mean_dry_bulb ⇒ Object
the mean of the mean monthly dry bulbs.
- #valid? ⇒ Boolean
Constructor Details
#initialize(path) ⇒ StatFile
Returns a new instance of StatFile.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 36 def initialize(path) @path = Pathname.new(path) @valid = false @lat = [] @lon = [] @gmt = [] @elevation = [] @hdd18 = [] @cdd18 = [] @hdd10 = [] @cdd10 = [] @monthly_dry_bulb = [] @delta_dry_bulb = [] init end |
Instance Attribute Details
#cdd10 ⇒ Object
Returns the value of attribute cdd10.
34 35 36 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 34 def cdd10 @cdd10 end |
#cdd18 ⇒ Object
Returns the value of attribute cdd18.
32 33 34 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 32 def cdd18 @cdd18 end |
#elevation ⇒ Object
Returns the value of attribute elevation.
28 29 30 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 28 def elevation @elevation end |
#gmt ⇒ Object
Returns the value of attribute gmt.
29 30 31 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 29 def gmt @gmt end |
#hdd10 ⇒ Object
Returns the value of attribute hdd10.
33 34 35 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 33 def hdd10 @hdd10 end |
#hdd18 ⇒ Object
Returns the value of attribute hdd18.
31 32 33 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 31 def hdd18 @hdd18 end |
#lat ⇒ Object
Returns the value of attribute lat.
26 27 28 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 26 def lat @lat end |
#lon ⇒ Object
Returns the value of attribute lon.
27 28 29 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 27 def lon @lon end |
#monthlyDB ⇒ Object
Returns the value of attribute monthlyDB.
30 31 32 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 30 def monthlyDB @monthlyDB end |
#path ⇒ Object
Returns the value of attribute path.
24 25 26 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 24 def path @path end |
#valid ⇒ Object
Returns the value of attribute valid.
25 26 27 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 25 def valid @valid end |
Instance Method Details
#delta_dry_bulb ⇒ Object
max - min of the mean monthly dry bulbs
70 71 72 73 74 75 76 77 78 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 70 def delta_dry_bulb if not @monthly_dry_bulb.empty? then delta_t = @monthly_dry_bulb.max-@monthly_dry_bulb.min else delta_t = '' end delta_t end |
#mean_dry_bulb ⇒ Object
the mean of the mean monthly dry bulbs
57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 57 def mean_dry_bulb if not @monthly_dry_bulb.empty? then sum = 0 @monthly_dry_bulb.each { |db| sum += db } mean = sum/@monthly_dry_bulb.size else mean = '' end mean end |
#valid? ⇒ Boolean
52 53 54 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 52 def valid? return @valid end |