Line data Source code
1 : // EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois,
2 : // The Regents of the University of California, through Lawrence Berkeley National Laboratory
3 : // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge
4 : // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other
5 : // contributors. All rights reserved.
6 : //
7 : // NOTICE: This Software was developed under funding from the U.S. Department of Energy and the
8 : // U.S. Government consequently retains certain rights. As such, the U.S. Government has been
9 : // granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable,
10 : // worldwide license in the Software to reproduce, distribute copies to the public, prepare
11 : // derivative works, and perform publicly and display publicly, and to permit others to do so.
12 : //
13 : // Redistribution and use in source and binary forms, with or without modification, are permitted
14 : // provided that the following conditions are met:
15 : //
16 : // (1) Redistributions of source code must retain the above copyright notice, this list of
17 : // conditions and the following disclaimer.
18 : //
19 : // (2) Redistributions in binary form must reproduce the above copyright notice, this list of
20 : // conditions and the following disclaimer in the documentation and/or other materials
21 : // provided with the distribution.
22 : //
23 : // (3) Neither the name of the University of California, Lawrence Berkeley National Laboratory,
24 : // the University of Illinois, U.S. Dept. of Energy nor the names of its contributors may be
25 : // used to endorse or promote products derived from this software without specific prior
26 : // written permission.
27 : //
28 : // (4) Use of EnergyPlus(TM) Name. If Licensee (i) distributes the software in stand-alone form
29 : // without changes from the version obtained under this License, or (ii) Licensee makes a
30 : // reference solely to the software portion of its product, Licensee must refer to the
31 : // software as "EnergyPlus version X" software, where "X" is the version number Licensee
32 : // obtained under this License and may not use a different name for the software. Except as
33 : // specifically required in this Section (4), Licensee shall not use in a company name, a
34 : // product name, in advertising, publicity, or other promotional activities any name, trade
35 : // name, trademark, logo, or other designation of "EnergyPlus", "E+", "e+" or confusingly
36 : // similar designation, without the U.S. Department of Energy's prior written consent.
37 : //
38 : // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
39 : // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
40 : // AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
41 : // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
42 : // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
43 : // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
44 : // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
45 : // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
46 : // POSSIBILITY OF SUCH DAMAGE.
47 :
48 : #ifndef WeatherManager_hh_INCLUDED
49 : #define WeatherManager_hh_INCLUDED
50 :
51 : // C++ Headers
52 : #include <unordered_map>
53 : #include <vector>
54 :
55 : // ObjexxFCL Headers
56 : #include <ObjexxFCL/Array2D.hh>
57 : #include <ObjexxFCL/Array3D.hh>
58 : #include <ObjexxFCL/Optional.hh>
59 :
60 : // EnergyPlus Headers
61 : #include <EnergyPlus/Data/BaseData.hh>
62 : #include <EnergyPlus/DataGlobals.hh>
63 : #include <EnergyPlus/EPVector.hh>
64 : #include <EnergyPlus/EnergyPlus.hh>
65 : #include <EnergyPlus/ScheduleManager.hh>
66 :
67 : namespace EnergyPlus {
68 :
69 : // Forward declarations
70 : class BaseGroundTempsModel;
71 : struct EnergyPlusData;
72 :
73 : namespace WeatherManager {
74 :
75 : enum class EpwHeaderType
76 : {
77 : Invalid = -1,
78 : Location = 0, // epw Headers are assumed to be in this order
79 : DesignConditions,
80 : TypicalExtremePeriods,
81 : GroundTemperatures,
82 : HolidaysDST,
83 : Comments1,
84 : Comments2,
85 : DataPeriods,
86 : Num
87 : };
88 :
89 : // Following are Date Types read in from EPW file or IDF
90 : enum class DateType
91 : {
92 : Invalid = -1,
93 : MonthDay = 1,
94 : NthDayInMonth = 2,
95 : LastDayInMonth = 3,
96 : Num
97 : };
98 :
99 : // Water mains temperatures calculation methods
100 : enum class WaterMainsTempCalcMethod
101 : {
102 : Invalid = -1,
103 : Schedule,
104 : Correlation,
105 : CorrelationFromWeatherFile,
106 : FixedDefault,
107 : Num
108 : };
109 :
110 : enum class DesignDaySolarModel
111 : {
112 : Invalid = -1,
113 : ASHRAE_ClearSky, // Design Day solar model ASHRAE ClearSky (default)
114 : Zhang_Huang, // Design Day solar model Zhang Huang
115 : SolarModel_Schedule, // Design Day solar model (beam and diffuse) from user entered schedule
116 : ASHRAE_Tau, // Design Day solar model ASHRAE tau (per 2009 HOF)
117 : ASHRAE_Tau2017, // Design Day solar model ASHRAE tau (per 2013 and 2017 HOF)
118 : Num
119 : };
120 :
121 : // Design Day Humidity Indicating Type
122 : enum class DDHumIndType
123 : {
124 : Invalid = -1,
125 : WetBulb, // Wetbulb (default)
126 : DewPoint, // Dewpoint
127 : Enthalpy, // Enthalpy
128 : HumRatio, // Humidity Ratio
129 : RelHumSch, // relhum schedule
130 : WBProfDef, // Wetbulb default profile
131 : WBProfDif, // Wetbulb difference profile
132 : WBProfMul, // Wetbulb multiplier profile
133 : Num
134 : };
135 :
136 : // Design Day DryBulb Range Type
137 : enum class DDDBRangeType
138 : {
139 : Invalid = -1,
140 : Default, // Default Multipliers
141 : Multiplier, // Multiplier Schedule
142 : Difference, // Difference Schedule
143 : Profile, // Temperature Profile
144 : Num
145 : };
146 :
147 : enum class SkyTempCalcType
148 : {
149 : Invalid = -1,
150 : ClarkAllenModel, // Use Clark & Allen model for sky emissivity calculation
151 : ScheduleValue, // User entered Schedule value for Weather Property
152 : DryBulbDelta, // User entered DryBulb difference Schedule value for Weather Property
153 : DewPointDelta, // User entered Dewpoint difference Schedule value for Weather Property
154 : BruntModel, // Use Brunt model for sky emissivity calculation
155 : IdsoModel, // Use Isdo model for sky emissivity calculation
156 : BerdahlMartinModel, // Use Martin & Berdahl model for sky emissivity calculation
157 : Num
158 : };
159 :
160 6738 : struct EnvironmentData
161 : {
162 : // Members
163 : std::string Title; // Environment name
164 : std::string cKindOfEnvrn; // kind of environment
165 : DataGlobalConstants::KindOfSim KindOfEnvrn; // Type of environment (see Parameters for KindOfSim in DataGlobals)
166 : int DesignDayNum; // index in DesignDay structure and DesignDayInput
167 : int RunPeriodDesignNum; // for WeatherFileDays, index in RunPeriodDesign and RunPeriodDesignInput
168 : int SeedEnvrnNum; // for HVAC sizing sim, new environments are copies of original environments, this is the index for original
169 : int HVACSizingIterationNum; // environments for HVAC sizing simulations are associated with iteration
170 : int TotalDays; // Number of days in environment
171 : int StartJDay; // Day of year of first day of environment
172 : int StartMonth;
173 : int StartDay;
174 : int StartYear;
175 : int StartDate;
176 : int EndMonth;
177 : int EndDay;
178 : int EndJDay;
179 : int EndYear;
180 : int EndDate;
181 : int DayOfWeek; // Starting Day of Week for the (Weather) RunPeriod (User Input)
182 : bool UseDST; // True if DaylightSavingTime is used for this RunPeriod
183 : bool UseHolidays; // True if Holidays are used for this RunPeriod (from WeatherFile)
184 : bool ApplyWeekendRule; // True if "Weekend Rule" is to be applied to RunPeriod
185 : bool UseRain; // True if Rain from weather file should be used (set rain to true)
186 : bool UseSnow; // True if Snow from weather file should be used (set Snow to true)
187 : Array1D_int MonWeekDay;
188 : bool SetWeekDays; // true when weekdays will be reset (after first year or on repeat)
189 : int NumSimYears; // Total Number of times this period to be performed
190 : int CurrentCycle; // Current cycle through weather file in NumSimYears repeats
191 : int WP_Type1; // WeatherProperties SkyTemperature Pointer
192 : SkyTempCalcType SkyTempModel; // WeatherProperties SkyTemperature CalculationType
193 : bool UseWeatherFileHorizontalIR; // If false, horizontal IR and sky temperature are calculated with WP models
194 : int CurrentYear; // Current year
195 : bool IsLeapYear; // True if current year is leap year.
196 : bool RollDayTypeOnRepeat; // If repeating run period, increment day type on repeat.
197 : bool TreatYearsAsConsecutive; // When year rolls over, increment year and recalculate Leap Year
198 : bool MatchYear; // for actual weather will be true
199 : bool ActualWeather; // true when using actual weather data
200 : int RawSimDays; // number of basic sim days.
201 : bool firstHrInterpUseHr1; // true when using Hour 1 for first hour interpolations; false to use Hour 24
202 :
203 : Real64 maxCoolingOATSizing = -1000.0; // max outdoor dry-bulb for DesignDay or RunPeriodDesign type weather
204 : Real64 maxCoolingOADPSizing = -1000.0; // outdoor dew point at max outdoor dry-bulb for DesignDay or RunPeriodDesign type weather
205 : Real64 minHeatingOATSizing = 1000.0; // min outdoor dry-bulb for DesignDay or RunPeriodDesign type weather
206 : Real64 minHeatingOADPSizing = 1000.0; // outdoor dew point at min outdoor dry-bulb for DesignDay or RunPeriodDesign type weather
207 :
208 : // Default Constructor
209 804 : EnvironmentData()
210 804 : : KindOfEnvrn(DataGlobalConstants::KindOfSim::Invalid), DesignDayNum(0), RunPeriodDesignNum(0), SeedEnvrnNum(0),
211 : HVACSizingIterationNum(0), TotalDays(0), StartJDay(0), StartMonth(0), StartDay(0), StartYear(0), StartDate(0), EndMonth(0), EndDay(0),
212 : EndJDay(0), EndYear(0), EndDate(0), DayOfWeek(0), UseDST(false), UseHolidays(false), ApplyWeekendRule(false), UseRain(true),
213 : UseSnow(true), MonWeekDay(12, 0), SetWeekDays(false), NumSimYears(1), CurrentCycle(0), WP_Type1(0),
214 : SkyTempModel(SkyTempCalcType::ClarkAllenModel), UseWeatherFileHorizontalIR(true), CurrentYear(0), IsLeapYear(false),
215 : RollDayTypeOnRepeat(true), TreatYearsAsConsecutive(true), MatchYear(false), ActualWeather(false), RawSimDays(0),
216 804 : firstHrInterpUseHr1(false)
217 : {
218 804 : }
219 : };
220 :
221 3999 : struct DesignDayData
222 : {
223 : // Members
224 : std::string Title; // Environment name
225 : Real64 MaxDryBulb; // Maximum Dry-Bulb Temperature (C)
226 : Real64 DailyDBRange; // Daily Temperature Range (deltaC)
227 : Real64 HumIndValue; // Humidity Indicating Value at Max Dry-bulb Temperature
228 : DDHumIndType HumIndType; // Humidity Indicating type (see Parameters)
229 : Real64 PressBarom; // Atmospheric/Barometric Pressure (Pascals)
230 : Real64 WindSpeed; // Wind Speed (m/s)
231 : Real64 WindDir; // Wind Direction (degrees clockwise from North, N=0, E=90, S=180, W=270)
232 : Real64 SkyClear; // Sky Clearness (0 to 1)
233 : int RainInd; // Rain Indicator (1 = raining and surfaces are wet, else 0)
234 : int SnowInd; // Snow Indicator (1 = snow on ground, else 0)
235 : int DayOfMonth; // Day of Month ( 1 - 31 )
236 : int Month; // Month of Year ( 1 - 12 )
237 : int DayType; // Day Type Sunday = 1 - Saturday = 7
238 : int DSTIndicator; // Daylight Saving Time Period Indicator (1=yes, 0=no) for this DesignDay
239 : DesignDaySolarModel SolarModel; // Solar Model for creating solar values for design day.
240 : DDDBRangeType DBTempRangeType; // Drybulb Range Type (see Parameters)
241 : int TempRangeSchPtr; // Schedule pointer to a day schedule for dry-bulb temperature range multipliers
242 : int HumIndSchPtr; // Schedule pointer to a day schedule that specifies
243 : // relative humidity (%) or wet-bulb range multipliers per HumIndType
244 : int BeamSolarSchPtr; // Schedule pointer to a day schedule for beam solar
245 : int DiffuseSolarSchPtr; // Schedule pointer to a day schedule for diffuse solar
246 : Real64 TauB; // beam pseudo optical depth for ASHRAE tau model
247 : Real64 TauD; // diffuse pseudo optical depth for ASHRAE tau model
248 : Real64 DailyWBRange; // daily range of wetbulb (deltaC)
249 : bool PressureEntered; // true if a pressure was entered in design day data
250 : bool DewPointNeedsSet; // true if the Dewpoint humidicating value needs to be set (after location determined)
251 : int maxWarmupDays; // Maximum warmup days between sizing periods
252 : bool suppressBegEnvReset; // true if this design day should be run without thermal history being reset at begin environment
253 :
254 : // Default Constructor
255 2385 : DesignDayData()
256 2385 : : MaxDryBulb(0.0), DailyDBRange(0.0), HumIndValue(0.0), HumIndType(DDHumIndType::WetBulb), PressBarom(0.0), WindSpeed(0.0), WindDir(0.0),
257 : SkyClear(0.0), RainInd(0), SnowInd(0), DayOfMonth(0), Month(0), DayType(0), DSTIndicator(0),
258 : SolarModel(DesignDaySolarModel::ASHRAE_ClearSky), DBTempRangeType(DDDBRangeType::Default), TempRangeSchPtr(0), HumIndSchPtr(0),
259 : BeamSolarSchPtr(0), DiffuseSolarSchPtr(0), TauB(0.0), TauD(0.0), DailyWBRange(0.0), PressureEntered(false),
260 : DewPointNeedsSet(false), //**Trane:BEG: Sizing Speed Up
261 2385 : maxWarmupDays(-1), suppressBegEnvReset(false) //**Trane:END: Sizing Speed Up
262 : {
263 2385 : }
264 : };
265 :
266 56 : struct ReportPeriodData
267 : {
268 : std::string title;
269 : std::string reportName;
270 : int startYear;
271 : int startMonth;
272 : int startDay;
273 : int startHour;
274 : int startJulianDate;
275 : int endYear;
276 : int endMonth;
277 : int endDay;
278 : int endHour;
279 : int endJulianDate;
280 : Real64 totalElectricityUse;
281 :
282 : // Default Constructor
283 16 : ReportPeriodData()
284 16 : : startYear(2017), startMonth(1), startDay(1), startHour(1), startJulianDate(2457755), endYear(2017), endMonth(12), endDay(31),
285 16 : endHour(24), endJulianDate(2458119), totalElectricityUse(0.0)
286 : {
287 16 : }
288 : };
289 :
290 3826 : struct RunPeriodData
291 : {
292 : // Members
293 : std::string title;
294 : std::string periodType;
295 : int totalDays = 365; // total number of days in requested period
296 : int startMonth = 1;
297 : int startDay = 1;
298 : int startJulianDate = 2457755; // Calculated start date (Julian or ordinal) for a weather file run period
299 : int startYear = 2017; // entered in "consecutive"/real runperiod object
300 : int endMonth = 12;
301 : int endDay = 31;
302 : int endJulianDate = 2458119; // Calculated end date (Julian or ordinal) for a weather file run period
303 : int endYear = 2017; // entered in "consecutive"/real runperiod object
304 : int dayOfWeek = 1; // Day of Week that the RunPeriod will start on (User Input)
305 : ScheduleManager::DayType startWeekDay = ScheduleManager::DayType::Sunday; // Day of the week that the RunPeriod will start on (User Input)
306 : bool useDST = false; // True if DaylightSavingTime is used for this RunPeriod
307 : bool useHolidays = false; // True if Holidays are used for this RunPeriod (from WeatherFile)
308 : bool applyWeekendRule = false; // True if "Weekend Rule" is to be applied to RunPeriod
309 : bool useRain = true; // True if Rain from weather file should be used (set rain to true)
310 : bool useSnow = true; // True if Snow from weather file should be used (set Snow to true)
311 : Array1D_int monWeekDay = {1, 4, 4, 7, 2, 5, 7, 3, 6, 1, 4, 6}; // Weekday for first day of each month
312 : int numSimYears = 1; // Total Number of years of simulation to be performed
313 : bool isLeapYear = false; // True if Begin Year is leap year.
314 : bool RollDayTypeOnRepeat = true; // If repeating run period, increment day type on repeat.
315 : bool TreatYearsAsConsecutive = true; // When year rolls over, increment year and recalculate Leap Year
316 : bool actualWeather = false; // true when using actual weather data
317 : bool firstHrInterpUsingHr1 = false; // true for using Hour 1 for first hour interpolate; false for using Hour 24
318 : };
319 :
320 : struct DayWeatherVariables // Derived Type for Storing Weather "Header" Data
321 : {
322 : // Members
323 : int DayOfYear; // Day of year for weather data
324 : int DayOfYear_Schedule; // Day of year in schedule
325 : int Year; // Year of weather data
326 : int Month; // Month of weather data
327 : int DayOfMonth; // Day of month for weather data
328 : int DayOfWeek; // Day of week for weather data
329 : int DaylightSavingIndex; // Daylight Saving Time Period indicator (0=no,1=yes)
330 : int HolidayIndex; // Holiday indicator (0=no holiday, non-zero=holiday type)
331 : Real64 SinSolarDeclinAngle; // Sine of the solar declination angle
332 : Real64 CosSolarDeclinAngle; // Cosine of the solar declination angle
333 : Real64 EquationOfTime; // Value of the equation of time formula
334 :
335 : // Default Constructor
336 3927 : DayWeatherVariables()
337 3927 : : DayOfYear(0), DayOfYear_Schedule(0), Year(0), Month(0), DayOfMonth(0), DayOfWeek(0), DaylightSavingIndex(0), HolidayIndex(0),
338 3927 : SinSolarDeclinAngle(0.0), CosSolarDeclinAngle(0.0), EquationOfTime(0.0)
339 : {
340 3927 : }
341 : };
342 :
343 3309 : struct SpecialDayData
344 : {
345 : // Members
346 : std::string Name; // Name
347 : WeatherManager::DateType DateType; // Date type as read in from IDF
348 : int Month; // Start Month
349 : int Day; // Start Day of month or Count for DateTypes=NthDayOfMonth
350 : int WeekDay; // For Date types=NthDayOfMonth and LastDayOfMonth
351 : int CompDate; // Start Date in "compressed date" format, only if Month/Day
352 : bool WthrFile; // True if this Special Day came from weather file (EPW)
353 : int Duration; // Number of days this special Day is used for
354 : int DayType; // Day Type desigation for this Special Day period
355 : int ActStMon;
356 : int ActStDay;
357 : bool Used; // Set to true in a run period after use (NthDayOfMonth and LastDayOfMonth only)
358 :
359 : // Default Constructor
360 2040 : SpecialDayData()
361 2040 : : DateType(DateType::Invalid), Month(0), Day(0), WeekDay(0), CompDate(0), WthrFile(false), Duration(0), DayType(0), ActStMon(0),
362 2040 : ActStDay(0), Used(false)
363 : {
364 2040 : }
365 : };
366 :
367 2283 : struct DataPeriodData
368 : {
369 : // Members
370 : std::string Name; // DataPeriod Title
371 : std::string DayOfWeek; // Start Day of Week for DataPeriod
372 : int NumYearsData; // Number of years for which data is present in EPW.
373 : int WeekDay;
374 : int StMon;
375 : int StDay;
376 : int StYear;
377 : int EnMon;
378 : int EnDay;
379 : int EnYear;
380 : int NumDays;
381 : Array1D_int MonWeekDay;
382 : int DataStJDay;
383 : int DataEnJDay;
384 : bool HasYearData;
385 :
386 : // Default Constructor
387 1522 : DataPeriodData()
388 1522 : : NumYearsData(1), WeekDay(0), StMon(0), StDay(0), StYear(0), EnMon(0), EnDay(0), EnYear(0), NumDays(0), MonWeekDay(12, 0), DataStJDay(0),
389 1522 : DataEnJDay(0), HasYearData(false)
390 : {
391 1522 : }
392 : };
393 :
394 : struct DaylightSavingPeriodData
395 : {
396 : // Members
397 : DateType StDateType; // Start Date type as from EPW or IDF
398 : int StWeekDay; // For DateTypes=NthDayOfMonth or LastDayOfMonth
399 : int StMon; // DaylightSavingTime (DST) Start Month
400 : int StDay; // DaylightSavingTime (DST) Start Day
401 : DateType EnDateType; // End Date type as from EPW or IDF
402 : int EnMon; // DaylightSavingTime (DST) End Month
403 : int EnDay; // DaylightSavingTime (DST) End Day
404 : int EnWeekDay; // For DateTypes=NthDayOfMonth or LastDayOfMonth
405 :
406 : // Default Constructor
407 2313 : DaylightSavingPeriodData()
408 2313 : : StDateType(DateType::Invalid), StWeekDay(0), StMon(0), StDay(0), EnDateType(DateType::Invalid), EnMon(0), EnDay(0), EnWeekDay(0)
409 : {
410 2313 : }
411 : };
412 :
413 : // This struct carries the default missing data for those data elements that would be best replaced with the previous hour's data for missing
414 : // data.
415 : struct MissingData
416 : {
417 : // Members
418 : Real64 DryBulb; // Dry Bulb Temperature (C)
419 : Real64 DewPoint; // Dew Point Temperature (C)
420 : int RelHumid; // Relative Humidity (%)
421 : Real64 StnPres; // Atmospheric Pressure (Pa)
422 : int WindDir; // Wind Direction (deg)
423 : Real64 WindSpd; // Wind Speed/Velocity (m/s)
424 : int TotSkyCvr; // Total Sky Cover (tenths)
425 : int OpaqSkyCvr; // Opaque Sky Cover (tenths)
426 : Real64 Visibility; // Visibility (km)
427 : int Ceiling; // Ceiling Height (m)
428 : int PrecipWater; // Precipitable Water (mm)
429 : Real64 AerOptDepth; // Aerosol Optical Depth
430 : int SnowDepth; // Snow Depth (cm)
431 : int DaysLastSnow; // Number of Days since last snow
432 : Real64 Albedo; // Albedo
433 : Real64 LiquidPrecip; // Rain/Liquid Precipitation (mm)
434 :
435 : // Default Constructor
436 771 : MissingData()
437 771 : : DryBulb(0.0), DewPoint(0.0), RelHumid(0), StnPres(0.0), WindDir(0), WindSpd(0.0), TotSkyCvr(0), OpaqSkyCvr(0), Visibility(0.0),
438 771 : Ceiling(0), PrecipWater(0), AerOptDepth(0.0), SnowDepth(0), DaysLastSnow(0), Albedo(0.0), LiquidPrecip(0.0)
439 : {
440 771 : }
441 : };
442 :
443 : // This Derived type carries the counts of missing data items in the weather reading process. It will count only items that are on the source file
444 : // -- not those that are derived from data on the source file.
445 : struct MissingDataCounts
446 : {
447 : // Members
448 : // Comments below illustrate the data that is being counted:
449 : int DryBulb; // Dry Bulb Temperature (C)
450 : int DewPoint; // Dew Point Temperature (C)
451 : int RelHumid; // Relative Humidity (%)
452 : int StnPres; // Atmospheric Pressure (Pa)
453 : int WindDir; // Wind Direction (deg)
454 : int WindSpd; // Wind Speed/Velocity (m/s)
455 : int DirectRad; // Direct Radiation (wh/m2)
456 : int DiffuseRad; // Diffuse Radiation (wh/m2)
457 : int TotSkyCvr; // Total Sky Cover (tenths)
458 : int OpaqSkyCvr; // Opaque Sky Cover (tenths)
459 : int Visibility; // Visibility (km)
460 : int Ceiling; // Ceiling Height (m)
461 : int PrecipWater; // Precipitable Water (mm)
462 : int AerOptDepth; // Aerosol Optical Depth
463 : int SnowDepth; // Snow Depth (cm)
464 : int DaysLastSnow; // Number of Days since last snow
465 : int WeathCodes; // Weather codes invalid
466 : int Albedo; // Albedo
467 : int LiquidPrecip; // Liquid Precip Depth
468 :
469 : // Default Constructor
470 771 : MissingDataCounts()
471 771 : : DryBulb(0), DewPoint(0), RelHumid(0), StnPres(0), WindDir(0), WindSpd(0), DirectRad(0), DiffuseRad(0), TotSkyCvr(0), OpaqSkyCvr(0),
472 771 : Visibility(0), Ceiling(0), PrecipWater(0), AerOptDepth(0), SnowDepth(0), DaysLastSnow(0), WeathCodes(0), Albedo(0), LiquidPrecip(0)
473 : {
474 771 : }
475 : };
476 :
477 : // This Derived type carries the counts of out of range items in the weather reading process. It will count only items that are on the source file
478 : // -- not those that are derived from data on the source file.
479 : struct RangeDataCounts
480 : {
481 : // Members
482 : // Comments below illustrate the data that is being counted:
483 : int DryBulb; // Dry Bulb Temperature (C)
484 : int DewPoint; // Dew Point Temperature (C)
485 : int RelHumid; // Relative Humidity (%)
486 : int StnPres; // Atmospheric Pressure (Pa)
487 : int WindDir; // Wind Direction (deg)
488 : int WindSpd; // Wind Speed/Velocity (m/s)
489 : int DirectRad; // Direct Radiation (wh/m2)
490 : int DiffuseRad; // Diffuse Radiation (wh/m2)
491 :
492 : // Default Constructor
493 771 : RangeDataCounts() : DryBulb(0), DewPoint(0), RelHumid(0), StnPres(0), WindDir(0), WindSpd(0), DirectRad(0), DiffuseRad(0)
494 : {
495 771 : }
496 : };
497 :
498 9635 : struct TypicalExtremeData
499 : {
500 : // Members
501 : std::string Title; // Environment name
502 : std::string ShortTitle; // Environment name
503 : std::string MatchValue; // String to be matched for input/running these periods for design.
504 : std::string MatchValue1; // String to be also matched (synonym)
505 : std::string MatchValue2; // String to be also matched (synonym)
506 : std::string TEType; // Typical or Extreme
507 : int TotalDays; // Number of days in environment
508 : int StartJDay; // Day of year of first day of environment
509 : int StartMonth;
510 : int StartDay;
511 : int EndMonth;
512 : int EndDay;
513 : int EndJDay;
514 :
515 : // Default Constructor
516 5198 : TypicalExtremeData() : TotalDays(0), StartJDay(0), StartMonth(0), StartDay(0), EndMonth(0), EndDay(0), EndJDay(0)
517 : {
518 5198 : }
519 : };
520 :
521 775 : struct WeatherProperties
522 : {
523 : // Members
524 : std::string Name; // Reference Name
525 : std::string ScheduleName; // Schedule Name or Algorithm Name
526 : bool IsSchedule; // Default is using Schedule
527 : SkyTempCalcType CalculationType;
528 : int SchedulePtr; // pointer to schedule when used
529 : bool UsedForEnvrn;
530 : bool UseWeatherFileHorizontalIR; // If false, horizontal IR and sky temperature are calculated with WP models
531 :
532 : // Default Constructor
533 773 : WeatherProperties()
534 773 : : IsSchedule(true), CalculationType(SkyTempCalcType::ClarkAllenModel), SchedulePtr(0), UsedForEnvrn(false),
535 773 : UseWeatherFileHorizontalIR(true)
536 : {
537 773 : }
538 : };
539 :
540 1 : struct UnderwaterBoundary
541 : {
542 : std::string Name;
543 : Real64 distanceFromLeadingEdge;
544 : int OSCMIndex;
545 : int WaterTempScheduleIndex;
546 : int VelocityScheduleIndex;
547 1 : UnderwaterBoundary() : Name(""), distanceFromLeadingEdge(0.0), OSCMIndex(0), WaterTempScheduleIndex(0), VelocityScheduleIndex(0)
548 : {
549 1 : }
550 : };
551 :
552 : // Functions
553 : void ManageWeather(EnergyPlusData &state);
554 :
555 : void ResetEnvironmentCounter(EnergyPlusData &state);
556 :
557 : bool GetNextEnvironment(EnergyPlusData &state, bool &Available, bool &ErrorsFound);
558 :
559 : void AddDesignSetToEnvironmentStruct(
560 : EnergyPlusData &state, int HVACSizingIterCount // Counter for number of times HVAC Sizing Simulation of Design Period set is being rerun
561 : );
562 :
563 : bool CheckIfAnyUnderwaterBoundaries(EnergyPlusData &state);
564 :
565 : Real64 calculateWaterBoundaryConvectionCoefficient(Real64 curWaterTemp, Real64 curWaterVelocity, Real64 distanceFromLeadingEdge);
566 :
567 : void UpdateUnderwaterBoundaries(EnergyPlusData &state);
568 :
569 : void ReadVariableLocationOrientation(EnergyPlusData &state);
570 :
571 : void UpdateLocationAndOrientation(EnergyPlusData &state);
572 :
573 : void SetupWeekDaysByMonth(EnergyPlusData &state, int StMon, int StDay, int StWeekDay, Array1D_int &WeekDays);
574 :
575 : void ResetWeekDaysByMonth(EnergyPlusData &state,
576 : Array1D_int &WeekDays,
577 : int AddLeapYear,
578 : int StartMonth,
579 : int StartMonthDay,
580 : int EndMonth,
581 : int EndMonthDay,
582 : bool Rollover,
583 : bool MidSimReset = false);
584 :
585 : void SetDSTDateRanges(EnergyPlusData &state,
586 : Array1D_int const &MonWeekDay, // Weekday of each day 1 of month
587 : Array1D_int &DSTIdx, // DST Index for each julian day (1:366)
588 : Optional_int DSTActStMon = _,
589 : Optional_int DSTActStDay = _,
590 : Optional_int DSTActEnMon = _,
591 : Optional_int DSTActEnDay = _);
592 :
593 : void SetSpecialDayDates(EnergyPlusData &state, Array1D_int const &MonWeekDay); // Weekday of each day 1 of month
594 :
595 : void InitializeWeather(EnergyPlusData &state, bool &printEnvrnStamp); // Set to true when the environment header should be printed
596 :
597 : void UpdateWeatherData(EnergyPlusData &state);
598 :
599 : void SetCurrentWeather(EnergyPlusData &state);
600 :
601 : void ReadWeatherForDay(EnergyPlusData &state,
602 : int DayToRead, // =1 when starting out, otherwise signifies next day
603 : int Environ, // Environment being simulated
604 : bool BackSpaceAfterRead // True if weather file is to be backspaced after read
605 : );
606 :
607 : void ReadEPlusWeatherForDay(EnergyPlusData &state,
608 : int DayToRead, // =1 when starting out, otherwise signifies next day
609 : int Environ, // Environment being simulated
610 : bool BackSpaceAfterRead // True if weather file is to be backspaced after read
611 : );
612 :
613 : Real64 interpolateWindDirection(Real64 prevHrWindDir, Real64 curHrWindDir, Real64 curHrWeight);
614 :
615 : void SetDayOfWeekInitialValues(int EnvironDayOfWeek, // Starting Day of Week for the (Weather) RunPeriod (User Input)
616 : int ¤tDayOfWeek // Current Day of Week
617 : );
618 :
619 : void ErrorInterpretWeatherDataLine(
620 : EnergyPlusData &state, int WYear, int WMonth, int WDay, int WHour, int WMinute, std::string_view SaveLine, std::string_view Line);
621 :
622 : void InterpretWeatherDataLine(EnergyPlusData &state,
623 : std::string_view Line,
624 : bool &ErrorFound, // True if an error is found, false otherwise
625 : int &WYear,
626 : int &WMonth,
627 : int &WDay,
628 : int &WHour,
629 : int &WMinute,
630 : Real64 &DryBulb, // DryBulb
631 : Real64 &DewPoint, // DewPoint
632 : Real64 &RelHum, // RelHum
633 : Real64 &AtmPress, // AtmPress
634 : Real64 Ðoriz, // ETHoriz
635 : Real64 &ETDirect, // ETDirect
636 : Real64 &IRHoriz, // IRHoriz
637 : Real64 &GLBHoriz, // GLBHoriz
638 : Real64 &DirectRad, // DirectRad
639 : Real64 &DiffuseRad, // DiffuseRad
640 : Real64 &GLBHorizIllum, // GLBHorizIllum
641 : Real64 &DirectNrmIllum, // DirectNrmIllum
642 : Real64 &DiffuseHorizIllum, // DiffuseHorizIllum
643 : Real64 &ZenLum, // ZenLum
644 : Real64 &WindDir, // WindDir
645 : Real64 &WindSpeed, // WindSpeed
646 : Real64 &TotalSkyCover, // TotalSkyCover
647 : Real64 &OpaqueSkyCover, // OpaqueSkyCover
648 : Real64 &Visibility, // Visibility
649 : Real64 &CeilHeight, // CeilHeight
650 : int &WObs, // PresWeathObs
651 : Array1D_int &WCodesArr, // PresWeathConds
652 : Real64 &PrecipWater, // PrecipWater
653 : Real64 &AerosolOptDepth, // AerosolOptDepth
654 : Real64 &SnowDepth, // SnowDepth
655 : Real64 &DaysSinceLastSnow, // DaysSinceLastSnow
656 : Real64 &Albedo, // Albedo
657 : Real64 &LiquidPrecip // LiquidPrecip
658 : );
659 :
660 : void SetUpDesignDay(EnergyPlusData &state, int EnvrnNum); // Environment number passed into the routine
661 :
662 : Real64 AirMass(Real64 CosZen); // COS( solar zenith), 0 - 1
663 :
664 : // Calculate sky temperature from weather data
665 : Real64 CalcSkyEmissivity(EnergyPlusData &state, SkyTempCalcType ESkyCalcType, Real64 OSky, Real64 DryBulb, Real64 DewPoint, Real64 RelHum);
666 :
667 : void ASHRAETauModel([[maybe_unused]] EnergyPlusData &state,
668 : DesignDaySolarModel TauModelType, // ASHRAETau solar model type ASHRAE_Tau or ASHRAE_Tau2017
669 : Real64 ETR, // extraterrestrial normal irradiance, W/m2
670 : Real64 CosZen, // COS( solar zenith angle), 0 - 1
671 : Real64 TauB, // beam tau factor
672 : Real64 TauD, // dif tau factor
673 : Real64 &IDirN, // returned: direct (beam) irradiance on normal surface, W/m2
674 : Real64 &IDifH, // returned: diffuse irradiance on horiz surface, W/m2
675 : Real64 &IGlbH // returned: global irradiance on horiz surface, W/m2
676 : );
677 :
678 : void AllocateWeatherData(EnergyPlusData &state);
679 :
680 : void CalculateDailySolarCoeffs(EnergyPlusData &state,
681 : int DayOfYear, // Day of year (1 - 366)
682 : Real64 &A, // ASHRAE "A" - Apparent solar irradiation at air mass = 0 [W/M**2]
683 : Real64 &B, // ASHRAE "B" - Atmospheric extinction coefficient
684 : Real64 &C, // ASHRAE "C" - Diffuse radiation factor
685 : Real64 &AnnVarSolConstant, // Annual variation in the solar constant
686 : Real64 &EquationOfTime, // Equation of Time
687 : Real64 &SineSolarDeclination, // Sine of Solar Declination
688 : Real64 &CosineSolarDeclination // Cosine of Solar Declination
689 : );
690 :
691 : void CalculateSunDirectionCosines(EnergyPlusData &state,
692 : Real64 TimeValue, // Current Time of Day
693 : Real64 EqOfTime, // Equation of Time
694 : Real64 SinSolDeclin, // Sine of Solar Declination
695 : Real64 CosSolDeclin, // Cosine of Solar Declination
696 : Array1D<Real64> &SUNCOS);
697 :
698 : void DetermineSunUpDown(EnergyPlusData &state, Array1D<Real64> &SunDirectionCosines);
699 :
700 : void OpenWeatherFile(EnergyPlusData &state, bool &ErrorsFound);
701 :
702 : void OpenEPlusWeatherFile(EnergyPlusData &state,
703 : bool &ErrorsFound, // Will be set to true if errors found
704 : bool ProcessHeader // Set to true when headers should be processed (rather than just read)
705 : );
706 :
707 : void CloseWeatherFile(EnergyPlusData &state);
708 :
709 : void ResolveLocationInformation(EnergyPlusData &state, bool &ErrorsFound); // Set to true if no location evident
710 :
711 : void CheckLocationValidity(EnergyPlusData &state);
712 :
713 : void CheckWeatherFileValidity(EnergyPlusData &state);
714 :
715 : void ReportOutputFileHeaders(EnergyPlusData &state);
716 :
717 : void ReportWeatherAndTimeInformation(EnergyPlusData &state,
718 : bool &printEnvrnStamp); // Set to true when the environment header should be printed
719 :
720 : void ReadUserWeatherInput(EnergyPlusData &state);
721 :
722 : // copy report period data from source to target
723 : void CopyReportPeriodObject(const Array1D<WeatherManager::ReportPeriodData> &source,
724 : const int sourceIdx,
725 : Array1D<WeatherManager::ReportPeriodData> &target,
726 : const int targetIdx);
727 :
728 : void GroupReportPeriodByType(EnergyPlusData &state, const int nReportPeriods);
729 :
730 : void GetReportPeriodData(EnergyPlusData &state,
731 : int &nReportPeriods, // Total number of Report Periods requested
732 : bool &ErrorsFound);
733 :
734 : void GetRunPeriodData(EnergyPlusData &state,
735 : int &nRunPeriods, // Total number of Run Periods requested
736 : bool &ErrorsFound);
737 :
738 : void GetRunPeriodDesignData(EnergyPlusData &state, bool &ErrorsFound);
739 :
740 : void GetSpecialDayPeriodData(EnergyPlusData &state, bool &ErrorsFound); // will be set to true if severe errors are found in inputs
741 :
742 : void CalcSpecialDayTypes(EnergyPlusData &state);
743 :
744 : void GetDSTData(EnergyPlusData &state, bool &ErrorsFound); // will be set to true if severe errors are found in inputs
745 :
746 : void GetDesignDayData(EnergyPlusData &state,
747 : int &TotDesDays, // Total number of Design days to Setup
748 : bool &ErrorsFound);
749 :
750 : void GetLocationInfo(EnergyPlusData &state, bool &ErrorsFound);
751 :
752 : void GetWeatherProperties(EnergyPlusData &state, bool &ErrorsFound);
753 :
754 : void GetGroundTemps(EnergyPlusData &state);
755 :
756 : void GetGroundReflectances(EnergyPlusData &state, bool &ErrorsFound);
757 :
758 : void GetSnowGroundRefModifiers(EnergyPlusData &state, bool &ErrorsFound);
759 :
760 : void GetWaterMainsTemperatures(EnergyPlusData &state, bool &ErrorsFound);
761 :
762 : void CalcWaterMainsTemp(EnergyPlusData &state);
763 :
764 : Real64 WaterMainsTempFromCorrelation(EnergyPlusData &state,
765 : Real64 AnnualOAAvgDryBulbTemp, // annual average OA drybulb temperature
766 : Real64 MonthlyOAAvgDryBulbTempMaxDiff // monthly daily average OA drybulb temperature maximum difference
767 : );
768 :
769 : void GetWeatherStation(EnergyPlusData &state, bool &ErrorsFound);
770 :
771 : void DayltgCurrentExtHorizIllum(EnergyPlusData &state);
772 :
773 : void DayltgLuminousEfficacy(EnergyPlusData &state,
774 : Real64 &DiffLumEff, // Luminous efficacy of sky diffuse solar radiation (lum/W)
775 : Real64 &DirLumEff // Luminous efficacy of beam solar radiation (lum/W)
776 : );
777 :
778 : Real64 GetSTM(Real64 Longitude); // Longitude from user input
779 :
780 : void ProcessEPWHeader(EnergyPlusData &state, EpwHeaderType const headerType, std::string &Line, bool &ErrorsFound);
781 :
782 : void SkipEPlusWFHeader(EnergyPlusData &state);
783 :
784 : void ReportMissing_RangeData(EnergyPlusData &state);
785 :
786 : void SetupInterpolationValues(EnergyPlusData &state);
787 :
788 : void SetupEnvironmentTypes(EnergyPlusData &state);
789 :
790 : bool isLeapYear(int Year);
791 :
792 : struct GregorianDate
793 : {
794 : int year;
795 : int month;
796 : int day;
797 :
798 0 : GregorianDate(int year, int month, int day) : year(year), month(month), day(day)
799 : {
800 0 : }
801 : };
802 :
803 : int computeJulianDate(int gyyyy, int gmm, int gdd);
804 :
805 : int computeJulianDate(GregorianDate gdate);
806 :
807 : GregorianDate computeGregorianDate(int jdate);
808 :
809 : ScheduleManager::DayType calculateDayOfWeek(EnergyPlusData &state, int year, int month, int day);
810 :
811 : int calculateDayOfYear(int Month, int Day, bool leapYear = false);
812 :
813 : bool validMonthDay(int month, int day, int leapYearAdd = 0);
814 :
815 : // derived type for processing and storing Dry-bulb weather or stat file
816 771 : struct AnnualMonthlyDryBulbWeatherData
817 : {
818 : // Members
819 : bool OADryBulbWeatherDataProcessed; // if false stat or weather file OA Dry-bulb temp is not processed yet
820 : Real64 AnnualAvgOADryBulbTemp; // annual average outdoor air temperature (C)
821 : Real64 MonthlyAvgOADryBulbTempMaxDiff; // monthly daily average OA drybulb temperature maximum difference (deltaC)
822 : Array1D<Real64> MonthlyDailyAverageDryBulbTemp; // monthly-daily average outdoor air temperatures (C)
823 :
824 : // Default Constructor
825 771 : AnnualMonthlyDryBulbWeatherData()
826 771 : : OADryBulbWeatherDataProcessed(false), AnnualAvgOADryBulbTemp(0.0), MonthlyAvgOADryBulbTempMaxDiff(0.0),
827 771 : MonthlyDailyAverageDryBulbTemp(12, 0.0)
828 : {
829 771 : }
830 : void CalcAnnualAndMonthlyDryBulbTemp(EnergyPlusData &state); // true if this is CorrelationFromWeatherFile
831 : };
832 :
833 : void ReportWaterMainsTempParameters(EnergyPlusData &state);
834 : void calcSky(EnergyPlusData &state,
835 : Real64 &TmrHorizIRSky,
836 : Real64 &TmrSkyTemp,
837 : Real64 OpaqueSkyCover,
838 : Real64 DryBulb,
839 : Real64 DewPoint,
840 : Real64 RelHum,
841 : Real64 IRHoriz);
842 :
843 : } // namespace WeatherManager
844 :
845 771 : struct WeatherManagerData : BaseGlobalStruct
846 : {
847 :
848 : // These were static variables within different functions. They were pulled out into the namespace
849 : // to facilitate easier unit testing of those functions.
850 : // These are purposefully not in the header file as an extern variable. No one outside of this should
851 : // use these. They are cleared by clear_state() for use by unit tests, but normal simulations should be unaffected.
852 : // This is purposefully in an anonymous namespace so nothing outside this implementation file can use it.
853 : bool GetBranchInputOneTimeFlag;
854 : bool GetEnvironmentFirstCall;
855 : bool PrntEnvHeaders;
856 : bool FirstCall; // Some things should only be done once
857 : bool WaterMainsParameterReport; // should only be done once
858 : bool PrintEnvrnStamp; // Set to true when the environment header should be printed
859 : bool PrintDDHeader;
860 :
861 : Real64 const Sigma; // Stefan-Boltzmann constant
862 :
863 : int YearOfSim; // The Present year of Simulation.
864 : int const NumDaysInYear;
865 : int EnvironmentReportNbr; // Report number for the environment stamp
866 : std::string EnvironmentReportChr; // Report number for the environment stamp (character -- for printing)
867 : bool WeatherFileExists; // Set to true if a weather file exists
868 : std::string LocationTitle; // Location Title from input File
869 : bool LocationGathered; // flag to show if Location exists on Input File (we assume one is there and correct on weather file)
870 :
871 : Real64 WeatherFileLatitude;
872 : Real64 WeatherFileLongitude;
873 : Real64 WeatherFileTimeZone;
874 : Real64 WeatherFileElevation;
875 : Array1D<Real64> GroundTempsFCFromEPWHeader; // F or C factor method NOLINT(cert-err58-cpp)
876 : Array1D<Real64> GroundReflectances; // User Specified Ground Reflectances !EPTeam: Using DP causes big diffs NOLINT(cert-err58-cpp)
877 : Real64 SnowGndRefModifier; // Modifier to ground reflectance during snow
878 : Real64 SnowGndRefModifierForDayltg; // Modifier to ground reflectance during snow for daylighting
879 : WeatherManager::WaterMainsTempCalcMethod WaterMainsTempsMethod; // Water mains temperature calculation method
880 : int WaterMainsTempsSchedule; // Water mains temperature schedule
881 : Real64 WaterMainsTempsAnnualAvgAirTemp; // Annual average outdoor air temperature (C)
882 : Real64 WaterMainsTempsMaxDiffAirTemp; // Maximum difference in monthly average outdoor air temperatures (deltaC)
883 : std::string WaterMainsTempsScheduleName; // water mains tempeature schedule name
884 : bool wthFCGroundTemps;
885 :
886 : int TotRunPers; // Total number of Run Periods (Weather data) to Setup
887 : int TotRunDesPers; // Total number of Run Design Periods (Weather data) to Setup
888 : int TotReportPers; // Total number of reporting periods
889 : int TotThermalReportPers; // Total number of thermal reporting periods
890 : int TotCO2ReportPers; // Total number of CO2 reporting periods
891 : int TotVisualReportPers; // Total number of visual reporting periods
892 :
893 : int NumSpecialDays;
894 : Array1D_int SpecialDayTypes; // To hold holiday types given in input file NOLINT(cert-err58-cpp)
895 : Array1D_int WeekDayTypes; // To hold Week day types using specified first day NOLINT(cert-err58-cpp)
896 : Array1D_int DSTIndex; // To hold DST Index based on weather file or input NOLINT(cert-err58-cpp)
897 :
898 : int NumDataPeriods;
899 :
900 : int NumIntervalsPerHour;
901 :
902 : bool UseDaylightSaving; // True if user says to use Weather File specified DaylightSaving Period
903 : bool UseSpecialDays; // True if user says to use Weather File specified Special Days for current RunPeriod
904 : bool UseRainValues; // True if rain values from weather file are to be used
905 : bool UseSnowValues; // True if snow values from weather file are to be used
906 : bool EPWDaylightSaving; // True if a DaylightSaving Time Period is input (EPW files)
907 : bool IDFDaylightSaving; // True if a DaylightSaving Time Period is input (IDF files)
908 : bool DaylightSavingIsActive; // True if a DaylightSavingPeriod should be used for Environment
909 : bool WFAllowsLeapYears; // True if the Weather File (WF) header has "Yes" for Leap Years
910 : int curSimDayForEndOfRunPeriod; // normal=number days in sim, but different when repeating runperiods or multi-year files
911 : int Envrn; // Counter for environments
912 : int NumOfEnvrn; // Number of environments to be simulated
913 : int NumEPWTypExtSets; // Number of Typical/Extreme on weather file.
914 : int NumWPSkyTemperatures; // Number of WeatherProperty:SkyTemperature items in input file
915 :
916 : Array2D_bool TodayIsRain; // Rain indicator, true=rain NOLINT(cert-err58-cpp)
917 : Array2D_bool TodayIsSnow; // Snow indicator, true=snow NOLINT(cert-err58-cpp)
918 : Array2D<Real64> TodayOutDryBulbTemp; // Dry bulb temperature of outside air NOLINT(cert-err58-cpp)
919 : Array2D<Real64> TodayOutDewPointTemp; // Dew Point Temperature of outside air NOLINT(cert-err58-cpp)
920 : Array2D<Real64> TodayOutBaroPress; // Barometric pressure of outside air NOLINT(cert-err58-cpp)
921 : Array2D<Real64> TodayOutRelHum; // Relative Humidity of outside air NOLINT(cert-err58-cpp)
922 : Array2D<Real64> TodayWindSpeed; // Wind speed of outside air NOLINT(cert-err58-cpp)
923 : Array2D<Real64> TodayWindDir; // Wind direction of outside air NOLINT(cert-err58-cpp)
924 : Array2D<Real64> TodaySkyTemp; // Sky temperature NOLINT(cert-err58-cpp)
925 : Array2D<Real64> TodayHorizIRSky; // Horizontal IR from Sky NOLINT(cert-err58-cpp)
926 : Array2D<Real64> TodayBeamSolarRad; // Direct normal solar irradiance NOLINT(cert-err58-cpp)
927 : Array2D<Real64> TodayDifSolarRad; // Sky diffuse horizontal solar irradiance NOLINT(cert-err58-cpp)
928 : Array2D<Real64> TodayAlbedo; // Albedo NOLINT(cert-err58-cpp)
929 : Array2D<Real64> TodayLiquidPrecip; // Liquid Precipitation Depth (mm) NOLINT(cert-err58-cpp)
930 : Array2D<Real64> TodayTotalSkyCover; // Total Sky Cover(cert-err58-cpp)
931 : Array2D<Real64> TodayOpaqueSkyCover; // Opaque Sky Cover(cert-err58-cpp)
932 :
933 : Array2D_bool TomorrowIsRain; // Rain indicator, true=rain NOLINT(cert-err58-cpp)
934 : Array2D_bool TomorrowIsSnow; // Snow indicator, true=snow NOLINT(cert-err58-cpp)
935 : Array2D<Real64> TomorrowOutDryBulbTemp; // Dry bulb temperature of outside air NOLINT(cert-err58-cpp)
936 : Array2D<Real64> TomorrowOutDewPointTemp; // Dew Point Temperature of outside air NOLINT(cert-err58-cpp)
937 : Array2D<Real64> TomorrowOutBaroPress; // Barometric pressure of outside air NOLINT(cert-err58-cpp)
938 : Array2D<Real64> TomorrowOutRelHum; // Relative Humidity of outside air NOLINT(cert-err58-cpp)
939 : Array2D<Real64> TomorrowWindSpeed; // Wind speed of outside air NOLINT(cert-err58-cpp)
940 : Array2D<Real64> TomorrowWindDir; // Wind direction of outside air NOLINT(cert-err58-cpp)
941 : Array2D<Real64> TomorrowSkyTemp; // Sky temperature NOLINT(cert-err58-cpp)
942 : Array2D<Real64> TomorrowHorizIRSky; // Horizontal IR from Sky NOLINT(cert-err58-cpp)
943 : Array2D<Real64> TomorrowBeamSolarRad; // Direct normal solar irradiance NOLINT(cert-err58-cpp)
944 : Array2D<Real64> TomorrowDifSolarRad; // Sky diffuse horizontal solar irradiance NOLINT(cert-err58-cpp)
945 : Array2D<Real64> TomorrowAlbedo; // Albedo NOLINT(cert-err58-cpp)
946 : Array2D<Real64> TomorrowLiquidPrecip; // Liquid Precipitation Depth NOLINT(cert-err58-cpp)
947 : Array2D<Real64> TomorrowTotalSkyCover; // Total Sky Cover {tenth of sky}(cert-err58-cpp)
948 : Array2D<Real64> TomorrowOpaqueSkyCover; // Opaque Sky Cover {tenth of sky}(cert-err58-cpp)
949 :
950 : Array3D<Real64> DDDBRngModifier; // Design Day Dry-bulb Temperature Range Modifier NOLINT(cert-err58-cpp)
951 : Array3D<Real64> DDHumIndModifier; // Design Day relative humidity values or wet-bulb modifiers (per HumIndType) NOLINT(cert-err58-cpp)
952 : Array3D<Real64> DDBeamSolarValues; // Design Day Beam Solar Values NOLINT(cert-err58-cpp)
953 : Array3D<Real64> DDDiffuseSolarValues; // Design Day Relative Humidity Values NOLINT(cert-err58-cpp)
954 :
955 : Array3D<Real64> DDSkyTempScheduleValues; // Sky temperature - DesignDay input NOLINT(cert-err58-cpp)
956 :
957 : int RptIsRain; // Rain Report Value
958 : int RptIsSnow; // Snow Report Value
959 : int RptDayType; // DayType Report Value
960 :
961 : Real64 HrAngle; // Current Hour Angle
962 : Real64 SolarAltitudeAngle; // Angle of Solar Altitude (degrees)
963 : Real64 SolarAzimuthAngle; // Angle of Solar Azimuth (degrees)
964 : Real64 HorizIRSky; // Horizontal Infrared Radiation Intensity (W/m2)
965 : Real64 TimeStepFraction; // Fraction of hour each time step represents
966 : Array1D<Real64> SPSiteDryBulbRangeModScheduleValue; // reporting Drybulb Temperature Range Modifier Schedule Value NOLINT(cert-err58-cpp)
967 : Array1D<Real64> SPSiteHumidityConditionScheduleValue; // reporting Humidity Condition Schedule Value NOLINT(cert-err58-cpp)
968 : Array1D<Real64> SPSiteBeamSolarScheduleValue; // reporting Beam Solar Schedule Value NOLINT(cert-err58-cpp)
969 : Array1D<Real64> SPSiteDiffuseSolarScheduleValue; // reporting Diffuse Solar Schedule Value NOLINT(cert-err58-cpp)
970 : Array1D<Real64> SPSiteSkyTemperatureScheduleValue; // reporting SkyTemperature Modifier Schedule Value NOLINT(cert-err58-cpp)
971 : Array1D_int SPSiteScheduleNamePtr; // SP Site Schedule Name Ptrs NOLINT(cert-err58-cpp)
972 : Array1D_string SPSiteScheduleUnits; // SP Site Schedule Units NOLINT(cert-err58-cpp)
973 : int NumSPSiteScheduleNamePtrs; // Number of SP Site Schedules (DesignDay only)
974 : // Number of hours of missing data
975 : Array1D<Real64> Interpolation; // Interpolation values based on Number of Time Steps in Hour NOLINT(cert-err58-cpp)
976 : Array1D<Real64> SolarInterpolation; // Solar Interpolation values based on Number of Time Steps in Hour NOLINT(cert-err58-cpp)
977 : Array1D_int EndDayOfMonth; // NOLINT(cert-err58-cpp)
978 : int LeapYearAdd; // Set during environment if leap year is active (adds 1 to number days in Feb)
979 : bool DatesShouldBeReset; // True when weekdays should be reset
980 : bool StartDatesCycleShouldBeReset; // True when start dates on repeat should be reset
981 : bool Jan1DatesShouldBeReset; // True if Jan 1 should signal reset of dates
982 : bool RPReadAllWeatherData; // True if need to read all weather data prior to simulation
983 :
984 : // Object Data
985 : // NOLINTNEXTLINE(cert-err58-cpp)
986 : WeatherManager::DayWeatherVariables
987 : TodayVariables; // Today's daily weather variables | Derived Type for Storing Weather "Header" Data | Day of year for weather
988 : // data | Year of weather data | Month of weather data | Day of month for weather data | Day of week for
989 : // weather data | Daylight Saving Time Period indicator (0=no,1=yes) | Holiday indicator (0=no holiday,
990 : // non-zero=holiday type) | Sine of the solar declination angle | Cosine of the solar declination angle |
991 : // Value of the equation of time formula
992 : // NOLINTNEXTLINE(cert-err58-cpp)
993 : WeatherManager::DayWeatherVariables
994 : TomorrowVariables; // Tomorrow's daily weather variables | Derived Type for Storing Weather "Header" Data | Day of year for
995 : // weather data | Year of weather data | Month of weather data | Day of month for weather data | Day of
996 : // week for weather data | Daylight Saving Time Period indicator (0=no,1=yes) | Holiday indicator (0=no
997 : // holiday, non-zero=holiday type) | Sine of the solar declination angle | Cosine of the solar declination
998 : // angle | Value of the equation of time formula
999 : // NOLINTNEXTLINE(cert-err58-cpp)
1000 : EPVector<WeatherManager::DayWeatherVariables> DesignDay; // Design day environments
1001 : // NOLINTNEXTLINE(cert-err58-cpp)
1002 : WeatherManager::MissingData Missing; // Dry Bulb Temperature (C) | Dew Point Temperature (C) | Relative Humidity (%) | Atmospheric Pressure (Pa) |
1003 : // Wind Direction (deg) | Wind Speed/Velocity (m/s) | Total Sky Cover (tenths) | Opaque Sky Cover (tenths) |
1004 : // Visibility (km) | Ceiling Height (m) | Precipitable Water (mm) | Aerosol Optical Depth | Snow Depth (cm) |
1005 : // Number of Days since last snow | Albedo | Rain/Liquid Precipitation (mm)
1006 : WeatherManager::MissingDataCounts Missed; // NOLINT(cert-err58-cpp)
1007 : WeatherManager::RangeDataCounts OutOfRange; // NOLINT(cert-err58-cpp)
1008 : EPVector<WeatherManager::DesignDayData> DesDayInput; // Design day Input Data NOLINT(cert-err58-cpp)
1009 : Array1D<WeatherManager::EnvironmentData> Environment; // Environment data NOLINT(cert-err58-cpp)
1010 : Array1D<WeatherManager::RunPeriodData> RunPeriodInput; // NOLINT(cert-err58-cpp)
1011 : std::unordered_map<std::string, std::string> RunPeriodInputUniqueNames;
1012 : EPVector<WeatherManager::RunPeriodData> RunPeriodDesignInput; // NOLINT(cert-err58-cpp)
1013 : std::unordered_map<std::string, std::string> RunPeriodDesignInputUniqueNames;
1014 : Array1D<WeatherManager::ReportPeriodData> ReportPeriodInput;
1015 : Array1D<WeatherManager::ReportPeriodData> ThermalReportPeriodInput;
1016 : Array1D<WeatherManager::ReportPeriodData> CO2ReportPeriodInput;
1017 : Array1D<WeatherManager::ReportPeriodData> VisualReportPeriodInput;
1018 : std::unordered_map<std::string, std::string> ReportPeriodInputUniqueNames;
1019 : EPVector<WeatherManager::TypicalExtremeData> TypicalExtremePeriods; // NOLINT(cert-err58-cpp)
1020 : WeatherManager::DaylightSavingPeriodData EPWDST; // Daylight Saving Period Data from EPW file NOLINT(cert-err58-cpp)
1021 : WeatherManager::DaylightSavingPeriodData IDFDST; // Daylight Saving Period Data from IDF file NOLINT(cert-err58-cpp)
1022 : WeatherManager::DaylightSavingPeriodData DST; // Daylight Saving Period Data, if active NOLINT(cert-err58-cpp)
1023 : EPVector<WeatherManager::WeatherProperties> WPSkyTemperature; // NOLINT(cert-err58-cpp)
1024 : EPVector<WeatherManager::SpecialDayData> SpecialDays; // NOLINT(cert-err58-cpp)
1025 : EPVector<WeatherManager::DataPeriodData> DataPeriods; // NOLINT(cert-err58-cpp)
1026 :
1027 : std::shared_ptr<BaseGroundTempsModel> siteShallowGroundTempsPtr;
1028 : std::shared_ptr<BaseGroundTempsModel> siteBuildingSurfaceGroundTempsPtr;
1029 : std::shared_ptr<BaseGroundTempsModel> siteFCFactorMethodGroundTempsPtr;
1030 : std::shared_ptr<BaseGroundTempsModel> siteDeepGroundTempsPtr;
1031 :
1032 : std::vector<WeatherManager::UnderwaterBoundary> underwaterBoundaries;
1033 : WeatherManager::AnnualMonthlyDryBulbWeatherData OADryBulbAverage; // processes outside air drybulb temperature
1034 :
1035 : // SetCurrentWeather static vars
1036 : int NextHour;
1037 :
1038 : // ReadEPlusWeatherForDay static vars
1039 : int CurDayOfWeek;
1040 : Real64 ReadEPlusWeatherCurTime;
1041 : bool LastHourSet;
1042 : Real64 LastHrOutDryBulbTemp;
1043 : Real64 LastHrOutDewPointTemp;
1044 : Real64 LastHrOutBaroPress;
1045 : Real64 LastHrOutRelHum;
1046 : Real64 LastHrWindSpeed;
1047 : Real64 LastHrWindDir;
1048 : Real64 LastHrSkyTemp;
1049 : Real64 LastHrHorizIRSky;
1050 : Real64 LastHrBeamSolarRad;
1051 : Real64 LastHrDifSolarRad;
1052 : Real64 LastHrAlbedo;
1053 : Real64 LastHrLiquidPrecip;
1054 : Real64 LastHrTotalSkyCover;
1055 : Real64 LastHrOpaqueSkyCover;
1056 : Real64 NextHrBeamSolarRad;
1057 : Real64 NextHrDifSolarRad;
1058 : Real64 NextHrLiquidPrecip;
1059 : Real64 IsRainThreshold; // precipitation threshold (m) for a rainy day
1060 :
1061 : // ProcessEPWHeader static vars
1062 : std::string EPWHeaderTitle;
1063 :
1064 0 : void clear_state() override
1065 : {
1066 0 : this->YearOfSim = 1; // The Present year of Simulation.
1067 0 : this->EnvironmentReportNbr = 0; // Report number for the environment stamp
1068 0 : this->EnvironmentReportChr = ""; // Report number for the environment stamp (character -- for printing)
1069 0 : this->WeatherFileExists = false; // Set to true if a weather file exists
1070 0 : this->LocationTitle = ""; // Location Title from input File
1071 0 : this->LocationGathered = false; // flag to show if Location exists on Input File (we assume one is
1072 :
1073 0 : this->GetBranchInputOneTimeFlag = true;
1074 0 : this->GetEnvironmentFirstCall = true;
1075 0 : this->PrntEnvHeaders = true;
1076 0 : this->WeatherFileLatitude = 0.0;
1077 0 : this->WeatherFileLongitude = 0.0;
1078 0 : this->WeatherFileTimeZone = 0.0;
1079 0 : this->WeatherFileElevation = 0.0;
1080 0 : this->siteShallowGroundTempsPtr.reset();
1081 0 : this->siteBuildingSurfaceGroundTempsPtr.reset();
1082 0 : this->siteFCFactorMethodGroundTempsPtr.reset();
1083 0 : this->siteDeepGroundTempsPtr.reset();
1084 0 : this->GroundTempsFCFromEPWHeader = Array1D<Real64>(12, 0.0);
1085 0 : this->GroundReflectances = Array1D<Real64>(12, 0.2);
1086 :
1087 0 : this->SnowGndRefModifier = 1.0; // Modifier to ground reflectance during snow
1088 0 : this->SnowGndRefModifierForDayltg = 1.0; // Modifier to ground reflectance during snow for daylighting
1089 0 : this->WaterMainsTempsMethod = WeatherManager::WaterMainsTempCalcMethod::FixedDefault;
1090 0 : this->WaterMainsTempsSchedule = 0; // Water mains temperature schedule
1091 0 : this->WaterMainsTempsAnnualAvgAirTemp = 0.0; // Annual average outdoor air temperature (C)
1092 0 : this->WaterMainsTempsMaxDiffAirTemp = 0.0; // Maximum difference in monthly average outdoor air temperatures (deltaC)
1093 0 : this->WaterMainsTempsScheduleName = ""; // water mains tempeature schedule name
1094 0 : this->wthFCGroundTemps = false;
1095 0 : this->TotRunPers = 0; // Total number of Run Periods (Weather data) to Setup
1096 0 : this->TotRunDesPers = 0; // Total number of Run Design Periods (Weather data) to Setup
1097 0 : this->TotReportPers = 0; // Total number of reporting periods
1098 0 : this->TotThermalReportPers = 0; // Total number of thermal reporting periods
1099 0 : this->TotCO2ReportPers = 0; // Total number of CO2 reporting periods
1100 0 : this->TotVisualReportPers = 0; // Total number of visual reporting periods
1101 0 : this->NumSpecialDays = 0;
1102 :
1103 0 : this->SpecialDayTypes = Array1D<int>(366, 0);
1104 0 : this->WeekDayTypes = Array1D<int>(366, 0);
1105 0 : this->DSTIndex = Array1D<int>(366, 0);
1106 :
1107 0 : this->NumDataPeriods = 0;
1108 0 : this->NumIntervalsPerHour = 1;
1109 0 : this->UseDaylightSaving = true; // True if user says to use Weather File specified DaylightSaving Period
1110 0 : this->UseSpecialDays = true; // True if user says to use Weather File specified Special Days for current RunPeriod
1111 0 : this->UseRainValues = true; // True if rain values from weather file are to be used
1112 0 : this->UseSnowValues = true; // True if snow values from weather file are to be used
1113 0 : this->EPWDaylightSaving = false; // True if a DaylightSaving Time Period is input (EPW files)
1114 0 : this->IDFDaylightSaving = false; // True if a DaylightSaving Time Period is input (IDF files)
1115 0 : this->DaylightSavingIsActive = false; // True if a DaylightSavingPeriod should be used for Environment
1116 0 : this->WFAllowsLeapYears = false; // True if the Weather File (WF) header has "Yes" for Leap Years
1117 0 : this->curSimDayForEndOfRunPeriod = 0; // normal=number days in sim, but different when repeating runperiods or multi-year files
1118 0 : this->Envrn = 0; // Counter for environments
1119 0 : this->NumOfEnvrn = 0; // Number of environments to be simulated
1120 0 : this->NumEPWTypExtSets = 0; // Number of Typical/Extreme on weather file.
1121 0 : this->NumWPSkyTemperatures = 0; // Number of WeatherProperty:SkyTemperature items in input file
1122 0 : this->TodayIsRain.deallocate(); // Rain indicator, true=rain
1123 0 : this->TodayIsSnow.deallocate(); // Snow indicator, true=snow
1124 0 : this->TodayOutDryBulbTemp.deallocate(); // Dry bulb temperature of outside air
1125 0 : this->TodayOutDewPointTemp.deallocate(); // Dew Point Temperature of outside air
1126 0 : this->TodayOutBaroPress.deallocate(); // Barometric pressure of outside air
1127 0 : this->TodayOutRelHum.deallocate(); // Relative Humidity of outside air
1128 0 : this->TodayWindSpeed.deallocate(); // Wind speed of outside air
1129 0 : this->TodayWindDir.deallocate(); // Wind direction of outside air
1130 0 : this->TodaySkyTemp.deallocate(); // Sky temperature
1131 0 : this->TodayHorizIRSky.deallocate(); // Horizontal IR from Sky
1132 0 : this->TodayBeamSolarRad.deallocate(); // Direct normal solar irradiance
1133 0 : this->TodayDifSolarRad.deallocate(); // Sky diffuse horizontal solar irradiance
1134 0 : this->TodayAlbedo.deallocate(); // Albedo
1135 0 : this->TodayLiquidPrecip.deallocate(); // Liquid Precipitation Depth (mm)
1136 0 : this->TodayTotalSkyCover.deallocate(); // Total Sky Cover
1137 0 : this->TomorrowOpaqueSkyCover.deallocate(); // Opaque Sky Cover {tenth of sky}
1138 0 : this->TomorrowIsRain.deallocate(); // Rain indicator, true=rain
1139 0 : this->TomorrowIsSnow.deallocate(); // Snow indicator, true=snow
1140 0 : this->TomorrowOutDryBulbTemp.deallocate(); // Dry bulb temperature of outside air
1141 0 : this->TomorrowOutDewPointTemp.deallocate(); // Dew Point Temperature of outside air
1142 0 : this->TomorrowOutBaroPress.deallocate(); // Barometric pressure of outside air
1143 0 : this->TomorrowOutRelHum.deallocate(); // Relative Humidity of outside air
1144 0 : this->TomorrowWindSpeed.deallocate(); // Wind speed of outside air
1145 0 : this->TomorrowWindDir.deallocate(); // Wind direction of outside air
1146 0 : this->TomorrowSkyTemp.deallocate(); // Sky temperature
1147 0 : this->TomorrowHorizIRSky.deallocate(); // Horizontal IR from Sky
1148 0 : this->TomorrowBeamSolarRad.deallocate(); // Direct normal solar irradiance
1149 0 : this->TomorrowDifSolarRad.deallocate(); // Sky diffuse horizontal solar irradiance
1150 0 : this->TomorrowAlbedo.deallocate(); // Albedo
1151 0 : this->TomorrowLiquidPrecip.deallocate(); // Liquid Precipitation Depth
1152 0 : this->TomorrowTotalSkyCover.deallocate(); // Total Sky Cover {tenth of sky}
1153 0 : this->TomorrowOpaqueSkyCover.deallocate(); // Opaque Sky Cover {tenth of sky}
1154 0 : this->DDDBRngModifier.deallocate(); // Design Day Dry-bulb Temperature Range Modifier
1155 0 : this->DDHumIndModifier.deallocate(); // Design Day relative humidity values
1156 0 : this->DDBeamSolarValues.deallocate(); // Design Day Beam Solar Values
1157 0 : this->DDDiffuseSolarValues.deallocate(); // Design Day Relative Humidity Values
1158 0 : this->DDSkyTempScheduleValues.deallocate(); // Sky temperature - DesignDay input
1159 0 : this->RptIsRain = 0; // Rain Report Value
1160 0 : this->RptIsSnow = 0; // Snow Report Value
1161 0 : this->RptDayType = 0; // DayType Report Value
1162 :
1163 0 : this->HrAngle = 0.0; // Current Hour Angle
1164 0 : this->SolarAltitudeAngle = 0.0; // Angle of Solar Altitude (degrees)
1165 0 : this->SolarAzimuthAngle = 0.0; // Angle of Solar Azimuth (degrees)
1166 0 : this->HorizIRSky = 0.0; // Horizontal Infrared Radiation Intensity (W/m2)
1167 0 : this->TimeStepFraction = 0.0; // Fraction of hour each time step represents
1168 0 : this->SPSiteDryBulbRangeModScheduleValue.deallocate(); // reporting Drybulb Temperature Range Modifier Schedule Value
1169 0 : this->SPSiteHumidityConditionScheduleValue.deallocate(); // reporting Humidity Condition Schedule Value
1170 0 : this->SPSiteBeamSolarScheduleValue.deallocate(); // reporting Beam Solar Schedule Value
1171 0 : this->SPSiteDiffuseSolarScheduleValue.deallocate(); // reporting Diffuse Solar Schedule Value
1172 0 : this->SPSiteSkyTemperatureScheduleValue.deallocate(); // reporting SkyTemperature Modifier Schedule Value
1173 0 : this->SPSiteScheduleNamePtr.deallocate(); // SP Site Schedule Name Ptrs
1174 0 : this->SPSiteScheduleUnits.deallocate(); // SP Site Schedule Units
1175 0 : this->NumSPSiteScheduleNamePtrs = 0; // Number of SP Site Schedules (DesignDay only)
1176 0 : this->Interpolation.deallocate(); // Interpolation values based on Number of Time Steps in Hour
1177 0 : this->SolarInterpolation.deallocate(); // Solar Interpolation values based on
1178 :
1179 0 : this->LeapYearAdd = 0;
1180 0 : this->DatesShouldBeReset = false;
1181 0 : this->StartDatesCycleShouldBeReset = false; // True when start dates on repeat should be reset
1182 0 : this->Jan1DatesShouldBeReset = false; // True if Jan 1 should signal reset of dates
1183 0 : this->TodayVariables = WeatherManager::DayWeatherVariables();
1184 0 : this->TomorrowVariables = WeatherManager::DayWeatherVariables();
1185 0 : this->DesignDay.deallocate();
1186 0 : this->Missing = WeatherManager::MissingData();
1187 0 : this->Missed = WeatherManager::MissingDataCounts();
1188 0 : this->OutOfRange = WeatherManager::RangeDataCounts();
1189 0 : this->DesDayInput.deallocate(); // Design day Input Data
1190 0 : this->Environment.deallocate(); // Environment data
1191 0 : this->RunPeriodInput.deallocate();
1192 0 : this->RunPeriodInputUniqueNames.clear();
1193 0 : this->RunPeriodDesignInput.deallocate();
1194 0 : this->RunPeriodDesignInputUniqueNames.clear();
1195 0 : this->ReportPeriodInput.deallocate();
1196 0 : this->ThermalReportPeriodInput.deallocate();
1197 0 : this->CO2ReportPeriodInput.deallocate();
1198 0 : this->VisualReportPeriodInput.deallocate();
1199 0 : this->ReportPeriodInputUniqueNames.clear();
1200 0 : this->TypicalExtremePeriods.deallocate();
1201 :
1202 0 : this->EPWDST.StDateType = WeatherManager::DateType::Invalid;
1203 0 : this->EPWDST.StWeekDay = 0;
1204 0 : this->EPWDST.StMon = 0;
1205 0 : this->EPWDST.StDay = 0;
1206 0 : this->EPWDST.EnDateType = WeatherManager::DateType::Invalid;
1207 0 : this->EPWDST.EnMon = 0;
1208 0 : this->EPWDST.EnDay = 0;
1209 0 : this->EPWDST.EnWeekDay = 0;
1210 :
1211 0 : this->IDFDST.StDateType = WeatherManager::DateType::Invalid;
1212 0 : this->IDFDST.StWeekDay = 0;
1213 0 : this->IDFDST.StMon = 0;
1214 0 : this->IDFDST.StDay = 0;
1215 0 : this->IDFDST.EnDateType = WeatherManager::DateType::Invalid;
1216 0 : this->IDFDST.EnMon = 0;
1217 0 : this->IDFDST.EnDay = 0;
1218 0 : this->IDFDST.EnWeekDay = 0;
1219 :
1220 0 : this->DST.StDateType = WeatherManager::DateType::Invalid;
1221 0 : this->DST.StWeekDay = 0;
1222 0 : this->DST.StMon = 0;
1223 0 : this->DST.StDay = 0;
1224 0 : this->DST.EnDateType = WeatherManager::DateType::Invalid;
1225 0 : this->DST.EnMon = 0;
1226 0 : this->DST.EnDay = 0;
1227 0 : this->DST.EnWeekDay = 0;
1228 0 : this->WPSkyTemperature.deallocate();
1229 0 : this->SpecialDays.deallocate();
1230 0 : this->DataPeriods.deallocate();
1231 :
1232 0 : this->underwaterBoundaries.clear();
1233 :
1234 : // ManageWeather static vars
1235 0 : this->PrintEnvrnStamp = false;
1236 :
1237 : // InitializeWeather static vars
1238 0 : this->FirstCall = true;
1239 0 : this->WaterMainsParameterReport = true;
1240 :
1241 : // SetCurrentWeather static vars
1242 0 : this->NextHour = 1;
1243 :
1244 : // ReadEPlusWeatherForDay static vars
1245 0 : this->CurDayOfWeek = 1;
1246 0 : this->ReadEPlusWeatherCurTime = 1.0;
1247 0 : this->LastHourSet = false;
1248 :
1249 : // SetUpDesignDay static vars
1250 0 : this->PrintDDHeader = true;
1251 :
1252 0 : this->LastHrOutDryBulbTemp = 0.0;
1253 0 : this->LastHrOutDewPointTemp = 0.0;
1254 0 : this->LastHrOutBaroPress = 0.0;
1255 0 : this->LastHrOutRelHum = 0.0;
1256 0 : this->LastHrWindSpeed = 0.0;
1257 0 : this->LastHrWindDir = 0.0;
1258 0 : this->LastHrSkyTemp = 0.0;
1259 0 : this->LastHrHorizIRSky = 0.0;
1260 0 : this->LastHrBeamSolarRad = 0.0;
1261 0 : this->LastHrDifSolarRad = 0.0;
1262 0 : this->LastHrAlbedo = 0.0;
1263 0 : this->LastHrLiquidPrecip = 0.0;
1264 0 : this->LastHrTotalSkyCover = 0.0;
1265 0 : this->LastHrOpaqueSkyCover = 0.0;
1266 0 : this->NextHrBeamSolarRad = 0.0;
1267 0 : this->NextHrDifSolarRad = 0.0;
1268 0 : this->NextHrLiquidPrecip = 0.0;
1269 :
1270 : // ProcessEPWHeader static vars
1271 0 : this->EPWHeaderTitle = "";
1272 0 : }
1273 :
1274 : // Default Constructor
1275 771 : WeatherManagerData()
1276 771 : : GetBranchInputOneTimeFlag(true), GetEnvironmentFirstCall(true), PrntEnvHeaders(true), FirstCall(true), WaterMainsParameterReport(true),
1277 : PrintEnvrnStamp(false), Sigma(5.6697e-8), YearOfSim(1), NumDaysInYear(365), EnvironmentReportNbr(0), EnvironmentReportChr(""),
1278 : WeatherFileExists(false), LocationGathered(false), WeatherFileLatitude(0.0), WeatherFileLongitude(0.0), WeatherFileTimeZone(0.0),
1279 : WeatherFileElevation(0.0), GroundTempsFCFromEPWHeader(12, 0.0), GroundReflectances(12, 0.2), SnowGndRefModifier(1.0),
1280 : SnowGndRefModifierForDayltg(1.0), WaterMainsTempsMethod{WeatherManager::WaterMainsTempCalcMethod::FixedDefault}, WaterMainsTempsSchedule(0),
1281 : WaterMainsTempsAnnualAvgAirTemp(0.0), WaterMainsTempsMaxDiffAirTemp(0.0), WaterMainsTempsScheduleName(""), wthFCGroundTemps(false),
1282 : TotRunPers(0), TotRunDesPers(0), TotReportPers(0), TotThermalReportPers(0), TotCO2ReportPers(0), TotVisualReportPers(0), NumSpecialDays(0),
1283 : SpecialDayTypes(366, 0), WeekDayTypes(366, 0), DSTIndex(366, 0), NumDataPeriods(0), NumIntervalsPerHour(1), UseDaylightSaving(true),
1284 : UseSpecialDays(true), UseRainValues(true), UseSnowValues(true), EPWDaylightSaving(false), IDFDaylightSaving(false),
1285 : DaylightSavingIsActive(false), WFAllowsLeapYears(false), curSimDayForEndOfRunPeriod(0), Envrn(0), NumOfEnvrn(0), NumEPWTypExtSets(0),
1286 : NumWPSkyTemperatures(0), RptIsRain(0), RptIsSnow(0), RptDayType(0), HrAngle(0.0), SolarAltitudeAngle(0.0), SolarAzimuthAngle(0.0),
1287 : HorizIRSky(0.0), TimeStepFraction(0.0), NumSPSiteScheduleNamePtrs(0), EndDayOfMonth(12, {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}),
1288 771 : LeapYearAdd(0), DatesShouldBeReset(false), StartDatesCycleShouldBeReset(false), Jan1DatesShouldBeReset(false), RPReadAllWeatherData(false)
1289 : {
1290 771 : }
1291 : };
1292 : } // namespace EnergyPlus
1293 :
1294 : #endif
|