def test_report_zlog_mismatch_perflog(): """Report zone log mismatch grid and well filter on PERF""" g1 = Grid() g1.from_file(GRIDFILE) zo = GridProperty() zo.from_file(ZONEFILE, name="Zone") w1 = Well(PWELL1) w1.dataframe.to_csv("TMP/testw1.csv") res = g1.report_zone_mismatch( well=w1, zonelogname="Zonelog", zoneprop=zo, zonelogrange=(1, 3), depthrange=[1580, 9999], perflogname="PERF", resultformat=2, ) mywell = res["WELLINTV"] logger.info("\n%s", mywell.dataframe.to_string()) mywell.to_file(join(TMPD, "w1_perf_report.rmswell")) assert res["MATCH2"] == pytest.approx(81, 1.5) assert res["TCOUNT2"] == 57 assert res["MCOUNT2"] == 46 w1 = Well(WELL1) # well is missing perflog; hence result shall be None res = g1.report_zone_mismatch( well=w1, zonelogname="Zonelog", zoneprop=zo, zonelogrange=(1, 3), depthrange=[1580, 9999], perflogname="PERF", resultformat=2, ) # ask for perflogname but no such present assert res is None
def test_report_zlog_mismatch(): """Report zone log mismatch grid and well.""" g1 = Grid() g1.from_file(GRIDFILE) zo = GridProperty() zo.from_file(ZONEFILE, name="Zone") w1 = Well(WELL1) w2 = Well(WELL2) w3 = Well(WELL3) w4 = Well(WELL4) w5 = Well(WELL5) w6 = Well(WELL6) w7 = Well(WELL7) wells = [w1, w2, w3, w4, w5, w6, w7] for wll in wells: response = g1.report_zone_mismatch( well=wll, zonelogname="Zonelog", zoneprop=zo, zonelogrange=(1, 3), depthrange=[1300, 9999], ) match = int(float("{0:.4f}".format(response[0]))) logger.info("Match for %s is %s", wll.wellname, match) assert match == MATCHD1[wll.name] # check also with resultformat=2 res = g1.report_zone_mismatch( well=wll, zonelogname="Zonelog", zoneprop=zo, zonelogrange=(1, 3), depthrange=[1300, 9999], resultformat=2, ) match = int(float("{0:.4f}".format(res["MATCH2"]))) logger.info("Match for %s is %s", wll.wellname, match) assert match == MATCHD2[wll.name]
def test_report_zlog_mismatch(): """Report zone log mismatch grid and well.""" logger.info("Name is {}".format(__name__)) g1 = Grid() g1.from_file(GRIDFILE) g2 = Grid() g2.from_file(GRIDFILE) g2.reduce_to_one_layer() g2.to_file(os.path.join(TDMP, "test.roff"), fformat="roff") z = GridProperty() z.from_file(ZONEFILE, name="Zone") w1 = Well(WELL1) w2 = Well(WELL2) w3 = Well(WELL3) w4 = Well(WELL4) w5 = Well(WELL5) w6 = Well(WELL6) w7 = Well(WELL7) wells = [w1, w2, w3, w4, w5, w6, w7] resultd = {} # matchd = {'WI_1': 69, 'WI_3': 70, 'OP_4': 74, 'OP_5': 75, 'OP_1': 75, # 'OP_2': 74, 'OP_3': 70} for w in wells: response = g1.report_zone_mismatch( well=w, zonelogname="Zonelog", zoneprop=z, onelayergrid=g2, zonelogrange=(1, 3), option=0, depthrange=[1300, 9999], ) if response is None: continue else: logger.info(response) match = int(float("{0:.4f}".format(response[0]))) logger.info(match) resultd[w.wellname] = match
def test_report_zlog_mismatch(): """Report zone log mismatch grid and well.""" logger.info('Name is {}'.format(__name__)) g1 = Grid() g1.from_file(gridfile) g2 = Grid() g2.from_file(gridfile) g2.reduce_to_one_layer() g2.to_file('/tmp/test.roff', fformat='roff') z = GridProperty() z.from_file(zonefile, name='Zone') w1 = Well(well1) w2 = Well(well2) w3 = Well(well3) w4 = Well(well4) w5 = Well(well5) w6 = Well(well6) w7 = Well(well7) wells = [w1, w2, w3, w4, w5, w6, w7] resultd = {} # matchd = {'WI_1': 69, 'WI_3': 70, 'OP_4': 74, 'OP_5': 75, 'OP_1': 75, # 'OP_2': 74, 'OP_3': 70} for w in wells: response = g1.report_zone_mismatch(well=w, zonelogname='Zonelog', zoneprop=z, onelayergrid=g2, zonelogrange=(1, 3), option=0, depthrange=[1300, 9999]) if response is None: continue else: logger.info(response) match = int(float("{0:.4f}".format(response[0]))) logger.info(match) resultd[w.wellname] = match
def test_report_zlog_mismatch_resultformat3(): """Report zone log mismatch grid and well, export updated wellsegment""" g1 = Grid() g1.from_file(GRIDFILE) zo = GridProperty() zo.from_file(ZONEFILE, name="Zone") w1 = Well(WELL1) res = g1.report_zone_mismatch( well=w1, zonelogname="Zonelog", zoneprop=zo, zonelogrange=(1, 3), depthrange=[1300, 9999], resultformat=3, ) mywell = res["WELLINTV"] logger.info("\n%s", mywell.dataframe.to_string()) mywell.to_file(join(TMPD, "w1_zlog_report.rmswell"))