示例#1
0
def test_to_from_xtgeogrid_format2(xtggrid):
    xtggrid._xtgformat2()
    roff_grid = RoffGrid.from_xtgeo_grid(xtggrid)

    assert_allclose(roff_grid.xtgeo_actnum(), xtggrid._actnumsv, atol=0.02)
    assert_allclose(roff_grid.xtgeo_coord(), xtggrid._coordsv, atol=0.02)
    assert_allclose(roff_grid.xtgeo_zcorn(), xtggrid._zcornsv, atol=0.02)
    assert roff_grid.xtgeo_subgrids() == xtggrid._subgrids
示例#2
0
def test_to_from_roffgrid(roff_grid):
    xtggrid = Grid()
    xtggrid._actnumsv = roff_grid.xtgeo_actnum()
    xtggrid._coordsv = roff_grid.xtgeo_coord()
    xtggrid._zcornsv = roff_grid.xtgeo_zcorn()
    xtggrid._subgrids = roff_grid.xtgeo_subgrids()
    xtggrid._ncol = roff_grid.nx
    xtggrid._nrow = roff_grid.ny
    xtggrid._nlay = roff_grid.nz

    roffgrid2 = RoffGrid.from_xtgeo_grid(xtggrid)
    assert same_geometry(roffgrid2, roff_grid)
    assert np.array_equal(roffgrid2.subgrids, roff_grid.subgrids)