Skip to content

Commit

Permalink
Merge pull request #162 from joakim-hove/init-from-scratch
Browse files Browse the repository at this point in the history
Fix interactve init case from scratch
  • Loading branch information
joakim-hove authored Oct 23, 2018
2 parents 1764d56 + 453f0d9 commit 29687b0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion python/python/ert_gui/ertwidgets/models/ertmodel.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from res.analysis.analysis_module import AnalysisModule
from res.analysis.enums.analysis_module_options_enum import AnalysisModuleOptionsEnum
from res.enkf import RealizationStateEnum, EnkfVarType
from res.enkf import ErtRunContext
from res.job_queue import WorkflowRunner
from ecl.util.util import BoolVector, StringList
from ert_gui import ERT
Expand Down Expand Up @@ -88,10 +89,14 @@ def getCaseRealizationStates(case_name):
@showWaitCursorWhileWaiting
def initializeCurrentCaseFromScratch(parameters, members):
selected_parameters = StringList(parameters)
mask = BoolVector(initial_size = getRealizationCount(), default_value = False)
for member in members:
member = int(member.strip())
ERT.ert.getEnkfFsManager().initializeFromScratch(selected_parameters, member, member)
mask[member] = True

sim_fs = ERT.ert.getEnkfFsManager().getCurrentFileSystem()
run_context = ErtRunContext.case_init(sim_fs, mask)
ERT.ert.getEnkfFsManager().initializeFromScratch(selected_parameters, run_context)
ERT.emitErtChange()


Expand Down

0 comments on commit 29687b0

Please sign in to comment.