Exemple #1
0
def test_eclgrid_import3(tmp_path):
    """Eclipse GRDECL import and translate."""
    grd = Grid(BRILGRDECL, fformat="grdecl")

    mylist = grd.get_geometrics()

    xori1 = mylist[0]

    # translate the coordinates
    grd.translate_coordinates(translate=(100, 100, 10), flip=(1, 1, 1))

    mylist = grd.get_geometrics()

    xori2 = mylist[0]

    # check if origin is translated 100m in X
    tsetup.assert_equal(xori1 + 100, xori2, txt="Translate X distance")

    grd.to_file(tmp_path / "g1_translate.roff", fformat="roff_binary")

    grd.to_file(tmp_path / "g1_translate.bgrdecl", fformat="bgrdecl")