MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / TEST

Function TEST

src/utilities/filetypes/test/EpwFile_GTest.cpp:18–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16using namespace openstudio;
17
18TEST(Filetypes, EpwFile) {
19 // LOCATION,Climate Zone 1,CA,USA,CTZRV2,725945,40.80,-124.20,-8.0,13.0
20 // DESIGN CONDITIONS,1,Climate Design Data 2009 ASHRAE Handbook,,Heating,12,-0.6,0.6,-4.1,2.7,5.3,-2.2,3.2,3.8,11.1,12.3,9.7,11.3,2,90,Cooling,8,6.5,21.6,15.2,19.9,15.1,18.7,14.6,16.8,19.5,16.1,18.6,15.5,17.6,4.3,320,15.9,11.4,17.5,15.1,10.8,16.8,14.4,10.3,16.2,47.3,19.8,45,18.5,43.3,17.6,1804,Extremes,9,8.2,7.4,20.8,-2.5,28.3,1.7,2.2,-3.7,29.8,-4.6,31.1,-5.6,32.3,-6.8,33.9
21 // TYPICAL/EXTREME PERIODS,6,Summer - Week Nearest Max Temperature For Period,Extreme,7/ 8,7/14,Summer - Week Nearest Average Temperature For Period,Typical,8/12,8/18,Winter - Week Nearest Min Temperature For Period,Extreme,1/15,1/21,Winter - Week Nearest Average Temperature For Period,Typical,1/22,1/28,Autumn - Week Nearest Average Temperature For Period,Typical,11/26,12/ 2,Spring - Week Nearest Average Temperature For Period,Typical,5/27,6/ 2
22 // GROUND TEMPERATURES,3,.5,,,,9.66,10.10,10.96,11.78,13.32,14.13,14.35,13.94,12.99,11.81,10.64,9.87,2,,,,10.27,10.38,10.87,11.41,12.60,13.35,13.73,13.65,13.10,12.29,11.37,10.64,4,,,,10.90,10.82,11.04,11.35,12.13,12.72,13.10,13.19,12.95,12.47,11.85,11.28
23 // HOLIDAYS/DAYLIGHT SAVINGS,No,0,0,0
24 // COMMENTS 1,California Climate Zone 01 Version 2;
25 // COMMENTS 2, -- Ground temps produced with a standard soil diffusivity of 2.3225760E-03 {m**2/day}
26 // DATA PERIODS,1,1,Data,Sunday, 1/ 1,12/31
27 path p = resourcesPath() / toPath("utilities/Filetypes/USA_CO_Golden-NREL.724666_TMY3.epw");
28 EpwFile epwFile(p);
29 EXPECT_EQ(p, epwFile.path());
30 EXPECT_EQ("BDF687C1", epwFile.checksum());
31 EXPECT_EQ(openstudio::checksum(epwFile.path()), epwFile.checksum());
32 EXPECT_EQ("Denver Centennial Golden Nr", epwFile.city());
33 EXPECT_EQ("CO", epwFile.stateProvinceRegion());
34 EXPECT_EQ("USA", epwFile.country());
35 EXPECT_EQ("TMY3", epwFile.dataSource());
36 EXPECT_EQ("724666", epwFile.wmoNumber());
37 EXPECT_EQ(39.74, epwFile.latitude());
38 EXPECT_EQ(-105.18, epwFile.longitude());
39 EXPECT_EQ(-7, epwFile.timeZone());
40 EXPECT_EQ(1829, epwFile.elevation());
41 EXPECT_EQ(Time(0, 1, 0, 0), epwFile.timeStep());
42 EXPECT_EQ(DayOfWeek(DayOfWeek::Sunday), epwFile.startDayOfWeek());
43 EXPECT_EQ(Date(MonthOfYear::Jan, 1), epwFile.startDate());
44 EXPECT_EQ(Date(MonthOfYear::Dec, 31), epwFile.endDate());
45 EXPECT_FALSE(epwFile.isActual());
46}
47
48TEST(Filetypes, EpwFile_Data) {
49 path p = resourcesPath() / toPath("utilities/Filetypes/USA_CO_Golden-NREL.724666_TMY3.epw");

Callers

nothing calls this directly

Calls 15

monthOfYearFunction · 0.85
wmoNumberMethod · 0.80
timeStepMethod · 0.80
isActualMethod · 0.80
dateTimeMethod · 0.80
monthOfYearMethod · 0.80
hoursMethod · 0.80
minutesMethod · 0.80
secondsMethod · 0.80
dryBulbTemperatureMethod · 0.80
getFieldByNameMethod · 0.80

Tested by

no test coverage detected