ert icon indicating copy to clipboard operation
ert copied to clipboard

Bring EnkfFs into python with pybind

Open oyvindeide opened this issue 2 years ago • 1 comments

This is mostly a holder of StateMap, TimeMap and assorted other pointers, we should refactor it with pybind https://github.com/equinor/ert/blob/ee376468564d6f223035bad61b3d7a6c7a8d8cc7/libres/lib/enkf/enkf_fs.cpp#L141, over time this should own an object which has: save_parameters and load_parameters in the first iteration with a signature something like: save_parameters("NAME_OF_PARAMETER", np.array([1,2,3,4]), mata_data={"prior": true, ....}) , and EnkfFs should own everything about the data that is stored.

One example of how we could interact with this is:

storage = ParameterStore(mount_point)
with storage("w") as out:
   out.save_parameter("NAME_OF_PARAMETER", np.array([1,2,3,4]))
class ParameterStore:
   def __init__(self, ...):
       ...
   def save_paramer(...):
        ...
   def load_paramer(...):
        ...
   def __exit__(self);
        self.current_case.fsync


class EnkfFs:
    def __init__(self, ....):
         self.time_map = ...
         self.state_map = ...

oyvindeide avatar Jul 01 '22 12:07 oyvindeide

What is this blocked by?

dafeda avatar Aug 29 '22 13:08 dafeda

Will close this issue as it is probably not the way we are planning to do this, we are more likely to replace the enkf_nodes one by one instead.

oyvindeide avatar Sep 27 '22 13:09 oyvindeide