-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Port forward model steps to extend ForwardModelStep
- Loading branch information
Yngve S. Kristiansen
committed
May 23, 2024
1 parent
a15ae2c
commit 15fae3c
Showing
13 changed files
with
180 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
# class notation | ||
from ert.config.forward_model_step import ForwardModelStepJSON, ForwardModelStep | ||
|
||
|
||
class Design2Params(ForwardModelStep): | ||
def __init__(self): | ||
super().__init__( | ||
name="DESIGN2PARAMS", | ||
executable="design2params", | ||
arglist=["<IENS>", "<xls_filename>", "<designsheet>", "<defaultssheet>"], | ||
min_arg=3, | ||
max_arg=4, | ||
arg_types=[ | ||
"INT", | ||
"STRING", | ||
"STRING", | ||
"STRING", | ||
], | ||
) | ||
|
||
def validate_pre_realization_run( | ||
self, fm_step_json: ForwardModelStepJSON | ||
) -> ForwardModelStepJSON: | ||
return fm_step_json | ||
|
||
def validate_pre_experiment(self) -> None: | ||
pass | ||
|
||
|
||
class DesignKW(ForwardModelStep): | ||
def __init__(self): | ||
super().__init__( | ||
name="DESIGN_KW", | ||
executable="design_kw", | ||
arglist=["<template_file>", "<result_file>"], | ||
min_arg=2, | ||
max_arg=2, | ||
arg_types=[ | ||
"STRING", | ||
"STRING", | ||
], | ||
) | ||
|
||
def validate_pre_realization_run( | ||
self, fm_step_json: ForwardModelStepJSON | ||
) -> ForwardModelStepJSON: | ||
print("hey") | ||
return fm_step_json | ||
|
||
def validate_pre_experiment(self) -> None: | ||
print("yoyo") | ||
|
||
|
||
class GenDataRFT(ForwardModelStep): | ||
def __init__(self): | ||
super().__init__( | ||
name="GENDATA_RFT", | ||
executable="gendata_rft", | ||
default_mapping={ | ||
"<ZONEMAP>": "ZONEMAP_NOT_PROVIDED", | ||
"<CSVFILE>": "gendata_rft.csv", | ||
"<OUTPUTDIRECTORY>": ".", | ||
}, | ||
arglist=[ | ||
"-e", | ||
"<ECL_BASE>", | ||
"-t", | ||
"<PATH_TO_TRAJECTORY_FILES>", | ||
"-w", | ||
"<WELL_AND_TIME_FILE>", | ||
"-z", | ||
"<ZONEMAP>", | ||
"-c", | ||
"<CSVFILE>", | ||
"-o", | ||
"<OUTPUTDIRECTORY>", | ||
], | ||
min_arg=3, | ||
max_arg=5, | ||
arg_types=[ | ||
"STRING", | ||
"STRING", | ||
"STRING", | ||
"STRING", | ||
"STRING", | ||
], | ||
) | ||
|
||
|
||
class OTS(ForwardModelStep): | ||
def __init__(self): | ||
super().__init__( | ||
name="OTS", | ||
executable="overburden_timeshift", | ||
arglist=["-c", "<CONFIG>"], | ||
arg_types=["STRING"], | ||
) | ||
|
||
|
||
class Pyscal(ForwardModelStep): | ||
def __init__(self): | ||
super().__init__( | ||
name="PYSCAL", | ||
executable="fm_pyscal", | ||
default_mapping={ | ||
"<RESULT_FILE>": "relperm.inc", | ||
"<SHEET_NAME>": "__NONE__", | ||
"<INT_PARAM_WO_NAME>": "__NONE__", | ||
"<INT_PARAM_GO_NAME>": "__NONE__", | ||
"<SLGOF>": "SGOF", | ||
"<FAMILY>": "1", | ||
}, | ||
arglist=[ | ||
"<PARAMETER_FILE>", | ||
"<RESULT_FILE>", | ||
"<SHEET_NAME>", | ||
"<INT_PARAM_WO_NAME>", | ||
"<INT_PARAM_GO_NAME>", | ||
"<SLGOF>", | ||
"<FAMILY>", | ||
], | ||
min_arg=1, | ||
max_arg=6, | ||
) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,8 @@ | |
|
||
import pandas as pd | ||
|
||
from ert.config import ForwardModelStep | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters