How to use the ecl.ecl.EclKW function in ecl

To help you get started, we’ve selected a few ecl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OPM / ResInsight / ThirdParty / Ert / python / python / ecl / ecl / ecl_grid_generator.py View on Github external
def construct_floatKW(name, values):
    kw = EclKW(name, len(values), EclDataType.ECL_FLOAT)
    for i, value in enumerate(values):
        kw[i] = value
    return kw
github OPM / ResInsight / ThirdParty / Ert / python / python / ecl / ecl / ecl_grid_generator.py View on Github external
def construct_floatKW(name, values):
            kw = EclKW(name, len(values), EclDataType.ECL_FLOAT)
            for i in range(len(values)):
                kw[i] = values[i]
            return kw
github OPM / ResInsight / ThirdParty / Ert / python / python / ecl / ecl / ecl_grid_generator.py View on Github external
new_nx, new_ny, new_nz = ux-lx+1, uy-ly+1, uz-lz+1

        cls.assert_actnum(nx, ny, nz, actnum)

        actnum = divide(divide(actnum, nx), ny)

        new_actnum = [
                        y_slice[lx:ux+1:]
                        for z_slice in actnum[lz:uz+1:]
                        for y_slice in z_slice[ly:uy+1:]
                    ]

        new_actnum = flatten(new_actnum)
        cls.assert_actnum(new_nx, new_ny, new_nz, new_actnum)

        actnumkw = EclKW("ACTNUM", len(new_actnum), EclDataType.ECL_INT)
        for i, value in enumerate(new_actnum):
            actnumkw[i] = value

        return actnumkw