Class: EnergyPlus::StatFile
- Inherits:
-
Object
- Object
- EnergyPlus::StatFile
- Defined in:
- lib/openstudio-standards/weather/Weather.stat_file.rb
Instance Attribute Summary collapse
-
#autumn_months ⇒ Object
Returns the value of attribute autumn_months.
-
#cdd10 ⇒ Object
Returns the value of attribute cdd10.
-
#cdd18 ⇒ Object
Returns the value of attribute cdd18.
-
#climate_zone ⇒ Object
Returns the value of attribute climate_zone.
-
#cooling_design_info ⇒ Object
Returns the value of attribute cooling_design_info.
-
#delta_dry_bulb ⇒ Object
max - min of the mean monthly dry bulbs.
-
#elevation ⇒ Object
Returns the value of attribute elevation.
-
#extremes_design_info ⇒ Object
Returns the value of attribute extremes_design_info.
-
#gmt ⇒ Object
Returns the value of attribute gmt.
-
#hdd10 ⇒ Object
Returns the value of attribute hdd10.
-
#hdd18 ⇒ Object
Returns the value of attribute hdd18.
-
#heating_design_info ⇒ Object
Returns the value of attribute heating_design_info.
-
#lat ⇒ Object
Returns the value of attribute lat.
-
#lon ⇒ Object
Returns the value of attribute lon.
-
#monthly_dry_bulb ⇒ Object
Returns the value of attribute monthly_dry_bulb.
-
#path ⇒ Object
Returns the value of attribute path.
-
#spring_months ⇒ Object
Returns the value of attribute spring_months.
-
#standard ⇒ Object
Returns the value of attribute standard.
-
#summer_wet_months ⇒ Object
Returns the value of attribute summer_wet_months.
-
#typical_autumn_week ⇒ Object
Returns the value of attribute typical_autumn_week.
-
#typical_spring_week ⇒ Object
Returns the value of attribute typical_spring_week.
-
#typical_summer_wet_week ⇒ Object
Returns the value of attribute typical_summer_wet_week.
-
#typical_winter_dry_week ⇒ Object
Returns the value of attribute typical_winter_dry_week.
-
#valid ⇒ Object
Returns the value of attribute valid.
-
#winter_dry_months ⇒ Object
Returns the value of attribute winter_dry_months.
Instance Method Summary collapse
-
#initialize(path) ⇒ StatFile
constructor
A new instance of StatFile.
-
#mean_dry_bulb ⇒ Object
the mean of the mean monthly dry bulbs.
-
#output ⇒ Object
Output for debugging stat routines.
- #valid? ⇒ Boolean
Constructor Details
#initialize(path) ⇒ StatFile
Returns a new instance of StatFile.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 50 def initialize(path) @path = Pathname.new(path) @valid = false @lat = [] @lon = [] @gmt = [] @elevation = [] @hdd18 = [] @cdd18 = [] @hdd10 = [] @cdd10 = [] @monthly_dry_bulb = [] @delta_dry_bulb = [] @heating_design_info = [] @cooling_design_info = [] @extremes_design_info = [] @climate_zone = [] @standard = [] @summer_wet_months = [] @winter_dry_months = [] @autumn_months = [] @spring_months = [] @typical_summer_wet_week = [] @typical_winter_dry_week = [] @typical_autumn_week = [] @typical_spring_week = [] @data = [] init end |
Instance Attribute Details
#autumn_months ⇒ Object
Returns the value of attribute autumn_months.
43 44 45 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 43 def autumn_months @autumn_months end |
#cdd10 ⇒ Object
Returns the value of attribute cdd10.
35 36 37 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 35 def cdd10 @cdd10 end |
#cdd18 ⇒ Object
Returns the value of attribute cdd18.
33 34 35 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 33 def cdd18 @cdd18 end |
#climate_zone ⇒ Object
Returns the value of attribute climate_zone.
39 40 41 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 39 def climate_zone @climate_zone end |
#cooling_design_info ⇒ Object
Returns the value of attribute cooling_design_info.
37 38 39 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 37 def cooling_design_info @cooling_design_info end |
#delta_dry_bulb ⇒ Object
max - min of the mean monthly dry bulbs
120 121 122 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 120 def delta_dry_bulb @delta_dry_bulb 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 |
#extremes_design_info ⇒ Object
Returns the value of attribute extremes_design_info.
38 39 40 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 38 def extremes_design_info @extremes_design_info 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.
34 35 36 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 34 def hdd10 @hdd10 end |
#hdd18 ⇒ Object
Returns the value of attribute hdd18.
32 33 34 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 32 def hdd18 @hdd18 end |
#heating_design_info ⇒ Object
Returns the value of attribute heating_design_info.
36 37 38 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 36 def heating_design_info @heating_design_info 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 |
#monthly_dry_bulb ⇒ Object
Returns the value of attribute monthly_dry_bulb.
30 31 32 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 30 def monthly_dry_bulb @monthly_dry_bulb 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 |
#spring_months ⇒ Object
Returns the value of attribute spring_months.
44 45 46 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 44 def spring_months @spring_months end |
#standard ⇒ Object
Returns the value of attribute standard.
40 41 42 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 40 def standard @standard end |
#summer_wet_months ⇒ Object
Returns the value of attribute summer_wet_months.
41 42 43 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 41 def summer_wet_months @summer_wet_months end |
#typical_autumn_week ⇒ Object
Returns the value of attribute typical_autumn_week.
47 48 49 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 47 def typical_autumn_week @typical_autumn_week end |
#typical_spring_week ⇒ Object
Returns the value of attribute typical_spring_week.
48 49 50 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 48 def typical_spring_week @typical_spring_week end |
#typical_summer_wet_week ⇒ Object
Returns the value of attribute typical_summer_wet_week.
45 46 47 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 45 def typical_summer_wet_week @typical_summer_wet_week end |
#typical_winter_dry_week ⇒ Object
Returns the value of attribute typical_winter_dry_week.
46 47 48 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 46 def typical_winter_dry_week @typical_winter_dry_week 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 |
#winter_dry_months ⇒ Object
Returns the value of attribute winter_dry_months.
42 43 44 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 42 def winter_dry_months @winter_dry_months end |
Instance Method Details
#mean_dry_bulb ⇒ Object
the mean of the mean monthly dry bulbs
107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 107 def mean_dry_bulb if !@monthly_dry_bulb.empty? sum = 0 @monthly_dry_bulb.each { |db| sum += db } mean = sum / @monthly_dry_bulb.size else mean = '' end mean end |
#output ⇒ Object
Output for debugging stat routines.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 81 def output line = '' line << "#{@path} , " line << "#{@lat} ," line << "#{@lon} ," line << "#{@gmt} ," line << "#{@elevation} ," line << "#{@hdd18} ," line << "#{@cdd18} ," line << "#{@hdd10} ," line << "#{@cdd10} ," line << "#{mean_dry_bulb} ," line << "#{delta_dry_bulb} ," line << "#{@heating_design_info} ," line << "#{@cooling_design_info} ," line << "#{@extremes_design_info} ," line << "#{@climate_zone} ," line << "#{@standard} ," line << "#{@valid} ," end |
#valid? ⇒ Boolean
102 103 104 |
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 102 def valid? return @valid end |