This repository has been archived by the owner on Jul 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply row_scaling in the smoother update
- Loading branch information
1 parent
c1cc5f5
commit 77c3e45
Showing
17 changed files
with
540 additions
and
48 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
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
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
Binary file not shown.
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,11 @@ | ||
NUM_REALIZATIONS 10 | ||
GRID CASE.EGRID | ||
FIELD PORO PARAMETER poro.grdecl INIT_FILES:fields/poro%d.grdecl | ||
SUMMARY WBHP | ||
OBS_CONFIG observations.txt | ||
|
||
|
||
LOAD_WORKFLOW_JOB workflows/ROW_SCALING_JOB1 | ||
LOAD_WORKFLOW workflows/ROW_SCALING_WORKFLOW1 | ||
|
||
TIME_MAP timemap.txt |
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,6 @@ | ||
SUMMARY_OBSERVATION WBHP0 { | ||
VALUE = 125; | ||
ERROR = 25; | ||
RESTART = 1; | ||
KEY = WBHP; | ||
}; |
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,2 @@ | ||
01/01/2020 | ||
01/02/2020 |
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 @@ | ||
SCRIPT script/row_scaling1.py |
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,2 @@ | ||
INTERNAL True | ||
SCRIPT scripts/row_scaling_job1.py |
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 @@ | ||
ROW_SCALING_JOB1 |
49 changes: 49 additions & 0 deletions
49
test-data/local/row_scaling/workflows/scripts/row_scaling_job1.py
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,49 @@ | ||
from res.enkf import ErtScript | ||
from functools import partial | ||
import math | ||
|
||
def gaussian_decay(obs_pos, length_scale, grid, data_index): | ||
x,y,z = grid.get_xyz( active_index = data_index) | ||
dx = (obs_pos[0] - x)/length_scale[0] | ||
dy = (obs_pos[1] - y)/length_scale[1] | ||
dz = (obs_pos[2] - z)/length_scale[2] | ||
|
||
exp_arg = -0.5* (dx*dx + dy*dy + dz*dz) | ||
return math.exp( exp_arg ) | ||
|
||
|
||
|
||
|
||
class RowScalingJob1(ErtScript): | ||
|
||
def run(self): | ||
main = self.ert() | ||
local_config = main.getLocalConfig() | ||
local_config.clear() | ||
|
||
|
||
local_data = local_config.createDataset("LOCAL") | ||
local_data.addNode("PORO") | ||
row_scaling = local_data.row_scaling("PORO") | ||
|
||
ens_config = main.ensembleConfig() | ||
poro_config = ens_config["PORO"] | ||
field_config = poro_config.getFieldModelConfig() | ||
|
||
#------------------------------------------------------------------------------------- | ||
grid = main.eclConfig().getGrid() | ||
obs_pos = grid.get_xyz( ijk=(5,5,1) ) | ||
length_scale = (2, 1, 0.50) | ||
gaussian = partial( gaussian_decay, obs_pos, length_scale, grid) | ||
row_scaling.assign( field_config.get_data_size(), gaussian) | ||
#------------------------------------------------------------------------------------- | ||
|
||
|
||
obs = local_config.createObsdata("OBSSET_LOCAL") | ||
obs.addNode("WBHP0") | ||
ministep = local_config.createMinistep("MINISTEP_LOCAL") | ||
ministep.attachDataset(local_data) | ||
ministep.attachObsset(obs) | ||
updatestep = local_config.getUpdatestep() | ||
updatestep.attachMinistep(ministep) | ||
|
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
Oops, something went wrong.