本文整理汇总了Python中ecl.summary.EclSum.smspec_node方法的典型用法代码示例。如果您正苦于以下问题:Python EclSum.smspec_node方法的具体用法?Python EclSum.smspec_node怎么用?Python EclSum.smspec_node使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ecl.summary.EclSum
的用法示例。
在下文中一共展示了EclSum.smspec_node方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_ix_case
# 需要导入模块: from ecl.summary import EclSum [as 别名]
# 或者: from ecl.summary.EclSum import smspec_node [as 别名]
def test_ix_case(self):
intersect_summary = EclSum(self.createTestPath("Statoil/ECLIPSE/ix/summary/CREATE_REGION_AROUND_WELL"))
self.assertIsNotNone(intersect_summary)
self.assertTrue(
"HWELL_PROD" in
[intersect_summary.smspec_node(key).wgname for key in intersect_summary.keys()]
)
eclipse_summary = EclSum(self.createTestPath("Statoil/ECLIPSE/ix/summary/ECL100/E100_CREATE_REGION_AROUND_WELL"))
self.assertIsNotNone(eclipse_summary)
hwell_padder = lambda key : key if key.split(":")[-1] != "HWELL_PR" else key + "OD"
self.assertEqual(
intersect_summary.keys("WWCT*"),
list(map(hwell_padder, eclipse_summary.keys("WWCT*")))
)
示例2: test_restart_mapping
# 需要导入模块: from ecl.summary import EclSum [as 别名]
# 或者: from ecl.summary.EclSum import smspec_node [as 别名]
def test_restart_mapping(self):
history = EclSum( self.createTestPath( "Statoil/ECLIPSE/SummaryRestart/iter-1/NOR-2013A_R007-0") )
total = EclSum( self.createTestPath( "Statoil/ECLIPSE/SummaryRestart/Prediction/NOR-2013A_R007_PRED-0") , include_restart = True)
history_dates = history.get_dates( )
total_dates = total.get_dates( )
for i in range(len(history_dates)):
self.assertEqual( history_dates[i] , total_dates[i] )
keys = history.keys( pattern = "W*")
for key in keys:
if key in total:
self.assertEqual( history.iget( key , 5 ) , total.iget( key , 5 ))
self.assertFalse( "WGPR:NOT_21_D" in history )
self.assertTrue( "WGPR:NOT_21_D" in total )
node = total.smspec_node("WGPR:NOT_21_D")
self.assertEqual( total.iget( "WGPR:NOT_21_D", 5) , node.default)