def readDOE(serialize_output=True):
<EOL>refDOE   = [[[None]*<NUM_LIT:16> for k_ in range(<NUM_LIT:3>)] for j_ in range(<NUM_LIT:16>)]                <EOL>Schedule = [[[None]*<NUM_LIT:16> for k_ in range(<NUM_LIT:3>)] for j_ in range(<NUM_LIT:16>)]                <EOL>refBEM   = [[[None]*<NUM_LIT:16> for k_ in range(<NUM_LIT:3>)] for j_ in range(<NUM_LIT:16>)]                <EOL>for i in range(<NUM_LIT:16>):<EOL><INDENT>file_doe_name_bld = os.path.join("<STR_LIT:{}>".format(DIR_DOE_PATH), "<STR_LIT>".format(i+<NUM_LIT:1>),"<STR_LIT>".format(i+<NUM_LIT:1>))<EOL>list_doe1 = read_csv(file_doe_name_bld)<EOL>nFloor      = str2fl(list_doe1[<NUM_LIT:3>][<NUM_LIT:3>:<NUM_LIT:6>])      <EOL>glazing     = str2fl(list_doe1[<NUM_LIT:4>][<NUM_LIT:3>:<NUM_LIT:6>])      <EOL>hCeiling    = str2fl(list_doe1[<NUM_LIT:5>][<NUM_LIT:3>:<NUM_LIT:6>])      <EOL>ver2hor     = str2fl(list_doe1[<NUM_LIT:7>][<NUM_LIT:3>:<NUM_LIT:6>])      <EOL>AreaRoof    = str2fl(list_doe1[<NUM_LIT:8>][<NUM_LIT:3>:<NUM_LIT:6>])      <EOL>file_doe_name_zone = os.path.join("<STR_LIT:{}>".format(DIR_DOE_PATH), "<STR_LIT>".format(i+<NUM_LIT:1>),"<STR_LIT>".format(i+<NUM_LIT:1>))<EOL>list_doe2 = read_csv(file_doe_name_zone)<EOL>AreaFloor   = str2fl([list_doe2[<NUM_LIT:2>][<NUM_LIT:5>],list_doe2[<NUM_LIT:3>][<NUM_LIT:5>],list_doe2[<NUM_LIT:4>][<NUM_LIT:5>]])       <EOL>Volume      = str2fl([list_doe2[<NUM_LIT:2>][<NUM_LIT:6>],list_doe2[<NUM_LIT:3>][<NUM_LIT:6>],list_doe2[<NUM_LIT:4>][<NUM_LIT:6>]])       <EOL>AreaWall    = str2fl([list_doe2[<NUM_LIT:2>][<NUM_LIT:8>],list_doe2[<NUM_LIT:3>][<NUM_LIT:8>],list_doe2[<NUM_LIT:4>][<NUM_LIT:8>]])       <EOL>AreaWindow  = str2fl([list_doe2[<NUM_LIT:2>][<NUM_LIT:9>],list_doe2[<NUM_LIT:3>][<NUM_LIT:9>],list_doe2[<NUM_LIT:4>][<NUM_LIT:9>]])       <EOL>Occupant    = str2fl([list_doe2[<NUM_LIT:2>][<NUM_LIT:11>],list_doe2[<NUM_LIT:3>][<NUM_LIT:11>],list_doe2[<NUM_LIT:4>][<NUM_LIT:11>]])    <EOL>Light       = str2fl([list_doe2[<NUM_LIT:2>][<NUM_LIT:12>],list_doe2[<NUM_LIT:3>][<NUM_LIT:12>],list_doe2[<NUM_LIT:4>][<NUM_LIT:12>]])    <EOL>Elec        = str2fl([list_doe2[<NUM_LIT:2>][<NUM_LIT>],list_doe2[<NUM_LIT:3>][<NUM_LIT>],list_doe2[<NUM_LIT:4>][<NUM_LIT>]])    <EOL>Gas         = str2fl([list_doe2[<NUM_LIT:2>][<NUM_LIT>],list_doe2[<NUM_LIT:3>][<NUM_LIT>],list_doe2[<NUM_LIT:4>][<NUM_LIT>]])    <EOL>SHW         = str2fl([list_doe2[<NUM_LIT:2>][<NUM_LIT:15>],list_doe2[<NUM_LIT:3>][<NUM_LIT:15>],list_doe2[<NUM_LIT:4>][<NUM_LIT:15>]])    <EOL>Vent        = str2fl([list_doe2[<NUM_LIT:2>][<NUM_LIT>],list_doe2[<NUM_LIT:3>][<NUM_LIT>],list_doe2[<NUM_LIT:4>][<NUM_LIT>]])    <EOL>Infil       = str2fl([list_doe2[<NUM_LIT:2>][<NUM_LIT:20>],list_doe2[<NUM_LIT:3>][<NUM_LIT:20>],list_doe2[<NUM_LIT:4>][<NUM_LIT:20>]])    <EOL>file_doe_name_location = os.path.join("<STR_LIT:{}>".format(DIR_DOE_PATH), "<STR_LIT>".format(i+<NUM_LIT:1>),"<STR_LIT>".format(i+<NUM_LIT:1>))<EOL>list_doe3 = read_csv(file_doe_name_location)<EOL>TypeWall    = [list_doe3[<NUM_LIT:3>][<NUM_LIT:4>:<NUM_LIT:20>],list_doe3[<NUM_LIT>][<NUM_LIT:4>:<NUM_LIT:20>],list_doe3[<NUM_LIT>][<NUM_LIT:4>:<NUM_LIT:20>]]            <EOL>RvalWall    = str2fl([list_doe3[<NUM_LIT:4>][<NUM_LIT:4>:<NUM_LIT:20>],list_doe3[<NUM_LIT:15>][<NUM_LIT:4>:<NUM_LIT:20>],list_doe3[<NUM_LIT>][<NUM_LIT:4>:<NUM_LIT:20>]])     <EOL>TypeRoof    = [list_doe3[<NUM_LIT:5>][<NUM_LIT:4>:<NUM_LIT:20>],list_doe3[<NUM_LIT:16>][<NUM_LIT:4>:<NUM_LIT:20>],list_doe3[<NUM_LIT>][<NUM_LIT:4>:<NUM_LIT:20>]]            <EOL>RvalRoof    = str2fl([list_doe3[<NUM_LIT:6>][<NUM_LIT:4>:<NUM_LIT:20>],list_doe3[<NUM_LIT>][<NUM_LIT:4>:<NUM_LIT:20>],list_doe3[<NUM_LIT>][<NUM_LIT:4>:<NUM_LIT:20>]])     <EOL>Uwindow     = str2fl([list_doe3[<NUM_LIT:7>][<NUM_LIT:4>:<NUM_LIT:20>],list_doe3[<NUM_LIT>][<NUM_LIT:4>:<NUM_LIT:20>],list_doe3[<NUM_LIT>][<NUM_LIT:4>:<NUM_LIT:20>]])     <EOL>SHGC        = str2fl([list_doe3[<NUM_LIT:8>][<NUM_LIT:4>:<NUM_LIT:20>],list_doe3[<NUM_LIT>][<NUM_LIT:4>:<NUM_LIT:20>],list_doe3[<NUM_LIT:30>][<NUM_LIT:4>:<NUM_LIT:20>]])     <EOL>HVAC        = str2fl([list_doe3[<NUM_LIT:9>][<NUM_LIT:4>:<NUM_LIT:20>],list_doe3[<NUM_LIT:20>][<NUM_LIT:4>:<NUM_LIT:20>],list_doe3[<NUM_LIT>][<NUM_LIT:4>:<NUM_LIT:20>]])     <EOL>HEAT        = str2fl([list_doe3[<NUM_LIT:10>][<NUM_LIT:4>:<NUM_LIT:20>],list_doe3[<NUM_LIT>][<NUM_LIT:4>:<NUM_LIT:20>],list_doe3[<NUM_LIT:32>][<NUM_LIT:4>:<NUM_LIT:20>]])    <EOL>COP         = str2fl([list_doe3[<NUM_LIT:11>][<NUM_LIT:4>:<NUM_LIT:20>],list_doe3[<NUM_LIT>][<NUM_LIT:4>:<NUM_LIT:20>],list_doe3[<NUM_LIT>][<NUM_LIT:4>:<NUM_LIT:20>]])    <EOL>EffHeat     = str2fl([list_doe3[<NUM_LIT:12>][<NUM_LIT:4>:<NUM_LIT:20>],list_doe3[<NUM_LIT>][<NUM_LIT:4>:<NUM_LIT:20>],list_doe3[<NUM_LIT>][<NUM_LIT:4>:<NUM_LIT:20>]])    <EOL>FanFlow     = str2fl([list_doe3[<NUM_LIT>][<NUM_LIT:4>:<NUM_LIT:20>],list_doe3[<NUM_LIT>][<NUM_LIT:4>:<NUM_LIT:20>],list_doe3[<NUM_LIT>][<NUM_LIT:4>:<NUM_LIT:20>]])    <EOL>file_doe_name_schedules = os.path.join("<STR_LIT:{}>".format(DIR_DOE_PATH), "<STR_LIT>".format(i+<NUM_LIT:1>),"<STR_LIT>".format(i+<NUM_LIT:1>))<EOL>list_doe4 = read_csv(file_doe_name_schedules)<EOL>SchEquip    = str2fl([list_doe4[<NUM_LIT:1>][<NUM_LIT:6>:<NUM_LIT:30>],list_doe4[<NUM_LIT:2>][<NUM_LIT:6>:<NUM_LIT:30>],list_doe4[<NUM_LIT:3>][<NUM_LIT:6>:<NUM_LIT:30>]])      <EOL>SchLight    = str2fl([list_doe4[<NUM_LIT:4>][<NUM_LIT:6>:<NUM_LIT:30>],list_doe4[<NUM_LIT:5>][<NUM_LIT:6>:<NUM_LIT:30>],list_doe4[<NUM_LIT:6>][<NUM_LIT:6>:<NUM_LIT:30>]])      <EOL>SchOcc      = str2fl([list_doe4[<NUM_LIT:7>][<NUM_LIT:6>:<NUM_LIT:30>],list_doe4[<NUM_LIT:8>][<NUM_LIT:6>:<NUM_LIT:30>],list_doe4[<NUM_LIT:9>][<NUM_LIT:6>:<NUM_LIT:30>]])      <EOL>SetCool     = str2fl([list_doe4[<NUM_LIT:10>][<NUM_LIT:6>:<NUM_LIT:30>],list_doe4[<NUM_LIT:11>][<NUM_LIT:6>:<NUM_LIT:30>],list_doe4[<NUM_LIT:12>][<NUM_LIT:6>:<NUM_LIT:30>]])   <EOL>SetHeat     = str2fl([list_doe4[<NUM_LIT>][<NUM_LIT:6>:<NUM_LIT:30>],list_doe4[<NUM_LIT>][<NUM_LIT:6>:<NUM_LIT:30>],list_doe4[<NUM_LIT:15>][<NUM_LIT:6>:<NUM_LIT:30>]])   <EOL>SchGas      = str2fl([list_doe4[<NUM_LIT:16>][<NUM_LIT:6>:<NUM_LIT:30>],list_doe4[<NUM_LIT>][<NUM_LIT:6>:<NUM_LIT:30>],list_doe4[<NUM_LIT>][<NUM_LIT:6>:<NUM_LIT:30>]])   <EOL>SchSWH      = str2fl([list_doe4[<NUM_LIT>][<NUM_LIT:6>:<NUM_LIT:30>],list_doe4[<NUM_LIT:20>][<NUM_LIT:6>:<NUM_LIT:30>],list_doe4[<NUM_LIT>][<NUM_LIT:6>:<NUM_LIT:30>]])   <EOL>for j in range(<NUM_LIT:3>):<EOL><INDENT>for k in range(<NUM_LIT:16>):<EOL><INDENT>B = Building(<EOL>hCeiling[j],                        <EOL><NUM_LIT:1>,                                  <EOL><NUM_LIT:1>,                                  <EOL><NUM_LIT:0.1>,                                <EOL><NUM_LIT:0.1>,                                <EOL>Infil[j],                           <EOL>Vent[j]/<NUM_LIT>,                      <EOL>glazing[j],                         <EOL>Uwindow[j][k],                      <EOL>SHGC[j][k],                         <EOL>'<STR_LIT>',                              <EOL>COP[j][k],                          <EOL><NUM_LIT>,                                <EOL><NUM_LIT>,                                <EOL><NUM_LIT>,                                <EOL><NUM_LIT>,                                <EOL>(HVAC[j][k]*<NUM_LIT>)/AreaFloor[j],   <EOL>EffHeat[j][k],                      <EOL><NUM_LIT>)                                <EOL>B.heatCap = (HEAT[j][k]*<NUM_LIT>)/AreaFloor[j]         <EOL>B.Type = BLDTYPE[i]<EOL>B.Era = BUILTERA[j]<EOL>B.Zone = ZONETYPE[k]<EOL>refDOE[i][j][k] = B<EOL>Concrete = Material (<NUM_LIT>, <NUM_LIT> * <NUM_LIT>,"<STR_LIT>")<EOL>Insulation = Material (<NUM_LIT>, <NUM_LIT> * <NUM_LIT>, "<STR_LIT>")<EOL>Gypsum = Material (<NUM_LIT>, <NUM_LIT> * <NUM_LIT>, "<STR_LIT>")<EOL>Wood = Material (<NUM_LIT>, <NUM_LIT> * <NUM_LIT>, "<STR_LIT>")<EOL>Stucco = Material(<NUM_LIT>,  <NUM_LIT> * <NUM_LIT>, "<STR_LIT>")<EOL>if TypeWall[j][k] == "<STR_LIT>":<EOL><INDENT>Rbase = <NUM_LIT> <EOL>Rins = RvalWall[j][k] - Rbase <EOL>D_ins = Rins * Insulation.thermalCond <EOL>if D_ins > <NUM_LIT>:<EOL><INDENT>thickness = [<NUM_LIT>,<NUM_LIT>,<NUM_LIT>,<NUM_LIT>,<NUM_LIT>,D_ins,<NUM_LIT>]<EOL>layers = [Stucco,Concrete,Concrete,Concrete,Concrete,Insulation,Gypsum]<EOL><DEDENT>else:<EOL><INDENT>thickness = [<NUM_LIT>,<NUM_LIT>,<NUM_LIT>,<NUM_LIT>,<NUM_LIT>,<NUM_LIT>]<EOL>layers = [Stucco,Concrete,Concrete,Concrete,Concrete,Gypsum]<EOL><DEDENT>wall = Element(<NUM_LIT>,<NUM_LIT>,thickness,layers,<NUM_LIT:0.>,<NUM_LIT>,<NUM_LIT:0.>,"<STR_LIT>")<EOL>alb = <NUM_LIT><EOL>emis = <NUM_LIT><EOL>thickness = [<NUM_LIT>,<NUM_LIT>]<EOL>concrete = Material (<NUM_LIT>, <NUM_LIT>*<NUM_LIT>)<EOL>mass = Element(alb,emis,thickness,[concrete,concrete],<NUM_LIT:0>,<NUM_LIT>,<NUM_LIT:1>,"<STR_LIT>")<EOL><DEDENT>elif TypeWall[j][k] == "<STR_LIT>":<EOL><INDENT>Rbase = <NUM_LIT>    <EOL>Rins = RvalWall[j][k] - Rbase<EOL>D_ins = Rins * Insulation.thermalCond <EOL>if D_ins > <NUM_LIT>:<EOL><INDENT>thickness = [<NUM_LIT>,D_ins,<NUM_LIT>]<EOL>layers = [Wood,Insulation,Gypsum]<EOL><DEDENT>else:<EOL><INDENT>thickness = [<NUM_LIT>,<NUM_LIT>]<EOL>layers = [Wood,Gypsum]<EOL><DEDENT>wall = Element(<NUM_LIT>,<NUM_LIT>,thickness,layers,<NUM_LIT:0.>,<NUM_LIT>,<NUM_LIT:0.>,"<STR_LIT>")<EOL>alb = <NUM_LIT><EOL>emis = <NUM_LIT><EOL>thickness = [<NUM_LIT>,<NUM_LIT>]<EOL>wood = Material(<NUM_LIT>, <NUM_LIT>*<NUM_LIT>)<EOL>mass = Element(alb,emis,thickness,[wood,wood],<NUM_LIT:0.>,<NUM_LIT>,<NUM_LIT:1.>,"<STR_LIT>")<EOL><DEDENT>elif TypeWall[j][k] == "<STR_LIT>":<EOL><INDENT>Rbase = <NUM_LIT> <EOL>Rins = RvalWall[j][k] - Rbase<EOL>D_ins = Rins * Insulation.thermalCond<EOL>if D_ins > <NUM_LIT>:<EOL><INDENT>thickness = [<NUM_LIT>,<NUM_LIT>,<NUM_LIT>,<NUM_LIT>,<NUM_LIT>,D_ins,<NUM_LIT>]<EOL>layers = [Stucco,Concrete,Concrete,Concrete,Concrete,Insulation,Gypsum]<EOL><DEDENT>else:    <EOL><INDENT>thickness = [<NUM_LIT>,<NUM_LIT>,<NUM_LIT>,<NUM_LIT>,<NUM_LIT>,<NUM_LIT>]<EOL>layers = [Stucco,Concrete,Concrete,Concrete,Concrete,Gypsum]<EOL><DEDENT>wall = Element(<NUM_LIT>,<NUM_LIT>,thickness,layers,<NUM_LIT:0.>,<NUM_LIT>,<NUM_LIT:0.>,"<STR_LIT>")<EOL>alb = <NUM_LIT><EOL>emis = <NUM_LIT><EOL>thickness = [<NUM_LIT>,<NUM_LIT>]<EOL>mass = Element(alb,emis,thickness,[Concrete,Concrete],<NUM_LIT:0.>,<NUM_LIT>,<NUM_LIT:1.>,"<STR_LIT>")<EOL><DEDENT>elif TypeWall[j][k] == "<STR_LIT>":<EOL><INDENT>alb = <NUM_LIT><EOL>emis = <NUM_LIT><EOL>D_ins = max((RvalWall[j][k] * Insulation.thermalCond)/<NUM_LIT:2>, <NUM_LIT>) <EOL>thickness = [D_ins,D_ins,<NUM_LIT>]<EOL>materials = [Insulation,Insulation,Gypsum]<EOL>wall = Element(alb,emis,thickness,materials,<NUM_LIT:0>,<NUM_LIT>,<NUM_LIT:0>,"<STR_LIT>")<EOL>alb = <NUM_LIT><EOL>emis = <NUM_LIT><EOL>thickness = [<NUM_LIT>, <NUM_LIT>]<EOL>concrete = Material(<NUM_LIT>, <NUM_LIT>*<NUM_LIT>)<EOL>mass = Element(alb,emis,thickness,[concrete,concrete],<NUM_LIT:0.>,<NUM_LIT>,<NUM_LIT:1.>,"<STR_LIT>")<EOL><DEDENT>if TypeRoof[j][k] == "<STR_LIT>": <EOL><INDENT>alb = <NUM_LIT><EOL>emis = <NUM_LIT><EOL>D_ins = max(RvalRoof[j][k] * Insulation.thermalCond/<NUM_LIT>,<NUM_LIT>);<EOL>roof = Element(alb,emis,[D_ins,D_ins],[Insulation,Insulation],<NUM_LIT:0.>,<NUM_LIT>,<NUM_LIT:0.>,"<STR_LIT>")<EOL><DEDENT>elif TypeRoof[j][k] == "<STR_LIT>":<EOL><INDENT>alb = <NUM_LIT><EOL>emis = <NUM_LIT><EOL>D_ins = max(RvalRoof[j][k] * Insulation.thermalCond/<NUM_LIT>,<NUM_LIT>)<EOL>roof = Element(alb,emis,[D_ins,D_ins],[Insulation,Insulation],<NUM_LIT:0.>,<NUM_LIT>,<NUM_LIT:0.>,"<STR_LIT>")<EOL><DEDENT>elif TypeRoof[j][k] == "<STR_LIT>":<EOL><INDENT>alb = <NUM_LIT><EOL>emis = <NUM_LIT><EOL>D_ins = max(RvalRoof[j][k] * Insulation.thermalCond/<NUM_LIT>,<NUM_LIT>)<EOL>roof = Element(alb,emis,[D_ins,D_ins],[Insulation,Insulation],<NUM_LIT:0.>,<NUM_LIT>,<NUM_LIT:0.>,"<STR_LIT>")<EOL><DEDENT>refBEM[i][j][k] = BEMDef(B, mass, wall, roof, <NUM_LIT:0.0>)<EOL>refBEM[i][j][k].building.FanMax = FanFlow[j][k] <EOL>Schedule[i][j][k] = SchDef()<EOL>Schedule[i][j][k].Elec = SchEquip   <EOL>Schedule[i][j][k].Light = SchLight  <EOL>Schedule[i][j][k].Gas = SchGas      <EOL>Schedule[i][j][k].Occ = SchOcc      <EOL>Schedule[i][j][k].Cool = SetCool    <EOL>Schedule[i][j][k].Heat = SetHeat    <EOL>Schedule[i][j][k].SWH = SchSWH      <EOL>Schedule[i][j][k].Qelec = Elec[j]                   <EOL>Schedule[i][j][k].Qlight = Light[j]                 <EOL>Schedule[i][j][k].Nocc = Occupant[j]/AreaFloor[j]   <EOL>Schedule[i][j][k].Qgas = Gas[j]                     <EOL>Schedule[i][j][k].Vent = Vent[j]/<NUM_LIT>             <EOL>Schedule[i][j][k].Vswh = SHW[j]/AreaFloor[j]        <EOL><DEDENT><DEDENT><DEDENT>if serialize_output:<EOL><INDENT>pkl_file_path = os.path.join(DIR_CURR,'<STR_LIT>','<STR_LIT>')<EOL>pickle_readDOE = open(pkl_file_path, '<STR_LIT:wb>')<EOL>pickle.dump(refDOE, pickle_readDOE,<NUM_LIT:1>)<EOL>pickle.dump(refBEM, pickle_readDOE,<NUM_LIT:1>)<EOL>pickle.dump(Schedule, pickle_readDOE,<NUM_LIT:1>)<EOL>pickle_readDOE.close()<EOL><DEDENT>return refDOE, refBEM, Schedule<EOL>
Read csv files of DOE buildings
Sheet 1 = BuildingSummary
Sheet 2 = ZoneSummary
Sheet 3 = LocationSummary
Sheet 4 = Schedules
Note BLD8 & 10 = school


Then make matrix of ref data as nested nested lists [16, 3, 16]:
matrix refDOE = Building objs
matrix Schedule = SchDef objs
matrix refBEM (16,3,16) = BEMDef
where:
    [16,3,16] is Type = 1-16, Era = 1-3, climate zone = 1-16
    i.e.
    Type: FullServiceRestaurant, Era: Pre80, Zone: 6A Minneapolis
Nested tree:
[TYPE_1:
    ERA_1:
        CLIMATE_ZONE_1
        ...
        CLIMATE_ZONE_16
    ERA_2:
        CLIMATE_ZONE_1
        ...
        CLIMATE_ZONE_16
    ...
    ERA_3:
        CLIMATE_ZONE_1
        ...
        CLIMATE_ZONE_16]