public RSSPEC(string filename) { FileReader br = new FileReader(); br.OpenBinaryFile(filename); if (br.Length > 0) { while (br.Position < br.Length - 24) { br.ReadHeader(); if (br.header.keyword == "TIME") { br.ReadBytes(4); TIME.Add(br.ReadDouble()); br.ReadBytes(4); continue; } if (br.header.keyword == "ITIME") { int[] ITIME = br.ReadIntList(); REPORT.Add(ITIME[0]); TYPE_RESTART.Add(ITIME[5]); if (ITIME.Length > 10) { DATE.Add(new DateTime(ITIME[3], ITIME[2], ITIME[1], ITIME[10], ITIME[11], (int)(ITIME[12] * 1e6))); } else { DATE.Add(new DateTime(ITIME[3], ITIME[2], ITIME[1])); } continue; } if (br.header.keyword == "NAME") { NAME.Add(br.ReadStringList()); continue; } if (br.header.keyword == "TYPE") { TYPE.Add(br.ReadStringList()); continue; } if (br.header.keyword == "UNITS") { UNITS.Add(br.ReadStringList()); continue; } if (br.header.keyword == "NUMBER") { NUMBER.Add(br.ReadIntList()); continue; } if (br.header.keyword == "ARRAYMAX") { ARRAYMAX.Add(br.ReadFloatList(br.header.count)); continue; } if (br.header.keyword == "ARRAYMIN") { ARRAYMIN.Add(br.ReadFloatList(br.header.count)); continue; } if (br.header.keyword == "POINTER") { POINTER.Add(br.ReadIntList()); continue; } if (br.header.keyword == "POINTERB") { POINTERB.Add(br.ReadIntList()); continue; } br.SkipEclipseData(); } br.CloseBinaryFile(); } }