Exemplo n.º 1
0
    def test_total_and_rate(self):
        self.assertTrue( EclSum.is_total("FOPT"))
        self.assertTrue( EclSum.is_total("WWPT:OP_3"))
        self.assertFalse( EclSum.is_total("RPR:2"))

        self.assertTrue( EclSum.is_rate("WOPR:OP_4"))
        self.assertFalse( EclSum.is_rate("BPR:123"))
        self.assertTrue(EclSum.is_rate("FWIR"))
Exemplo n.º 2
0
    def test_total_and_rate(self):
        self.assertTrue(EclSum.is_total("FOPT"))
        self.assertTrue(EclSum.is_total("WWPT:OP_3"))
        self.assertFalse(EclSum.is_total("RPR:2"))

        self.assertTrue(EclSum.is_rate("WOPR:OP_4"))
        self.assertFalse(EclSum.is_rate("BPR:123"))
        self.assertTrue(EclSum.is_rate("FWIR"))
Exemplo n.º 3
0
def _create_smry_meta_dict(eclsum: EclSum,
                           column_names: Iterable[str]) -> Dict[str, dict]:
    """Builds dictionary containing metadata for all the specified summary columns"""
    smry_meta = {}

    for col_name in column_names:
        col_meta = {}
        col_meta["unit"] = eclsum.unit(col_name)
        col_meta["is_total"] = eclsum.is_total(col_name)
        col_meta["is_rate"] = eclsum.is_rate(col_name)
        col_meta["is_historical"] = eclsum.smspec_node(
            col_name).is_historical()
        col_meta["keyword"] = eclsum.smspec_node(col_name).keyword
        col_meta["wgname"] = eclsum.smspec_node(col_name).wgname

        num = eclsum.smspec_node(col_name).get_num()
        if num is not None:
            col_meta["get_num"] = num

        smry_meta[col_name] = col_meta

    return smry_meta