forked from equinor/semeio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test case for non-adaptive localisation
Add option to specify alternative settings for the test case using a yml file Replaced gaussianfft as python module for simulation of gaussian fields with gstools. write scaling factor in same file format as input fields Add config file for test example Add example case with ROFF and GRDECL file Add cases with RMS grid index origin Add case with actnum
- Loading branch information
Showing
35 changed files
with
2,643 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ pytest-httpserver | |
pytest-snapshot | ||
rstcheck-core<=1.0.3 | ||
xlwt | ||
gstools |
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,43 @@ | ||
## Directory for Test Case for Non-Adaptive Localisation (`LOCALISATION_JOB`) | ||
| ||
### Main Components: | ||
| ||
- **ERT config file:** `sim_field.ert` | ||
| ||
The ERT model depends on: | ||
- `scripts/sim_fields.py` | ||
- `scripts/common_functions.py` | ||
| ||
| ||
- **ERT Keyword Input:** | ||
- **GRID:** Input grid is made by `scripts/init_test_case.py` | ||
- **OBS_CONFIG:** Observations are extracted from an upscaled realization made by `scripts/init_test_case.py` | ||
- **GEN_DATA:** Prediction of observables made by forward model `SIM_FIELD` which runs `scripts/sim_fields.py` | ||
- **FIELD:** Prior realizations of field made by forward model `SIM_FIELD` which runs `scripts/sim_fields.py` | ||
| ||
- **Other ERT Input Files:** | ||
- `time_map.txt` | ||
- `localisation.wf` | ||
| ||
- **Other Files:** | ||
- `randomseeds.txt`: Not used by ERT, but by `sim_fields.py`. This file can be generated by `scripts/init_test_case.py` | ||
- `UpscaledGrid.EGRID`: Not used by ERT, but by `sim_fields.py`. This file can be generated by `scripts/init_test_case.py` | ||
| ||
### Typical Workflow: | ||
| ||
1. **Preparation:** Prepare ERT config input by running `scripts/init_test_case.py`. | ||
2. Directories for observations are created automatically according to the default settings. | ||
3. Activate or deactivate localisation in ERT config file (`HOOK_WORKFLOW LOAD_WORKFLOW` for localisation). | ||
4. Now ready to run ERT. | ||
| ||
### What the Script `sim_fields.py` Does: | ||
| ||
1. Get iteration and realisation number from ERT using ERT environment variables `_ERT_ITERATION_NUMBER` and `_ERT_REALIZATION_NUMBER`. If running with an old Komodo version, the script will require iteration and realisation_number as command line input. | ||
2. If iteration = 0, then: | ||
- Simulate field and export to file to be used in `FIELD` keyword in ERT config file. | ||
- Upscale field and optionally export to file for QC purpose. | ||
Else: | ||
- Import updated field from ERT. | ||
- Upscale field and optionally export file for QC purpose. | ||
3. Extract predicted values of observables from upscaled field (values for selected grid cells related to the upscaled grid) and write `GEN_DATA` files. | ||
4. Optionally write some files for QC purpose.Directory for test case for non-adaptive localisation (LOCALISATION_JOB) |
53 changes: 53 additions & 0 deletions
53
tests/jobs/localisation/example_case/example_test_config_A.yml
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,53 @@ | ||
# ROFF format standard Eclipse origo | ||
settings: | ||
grid_size: | ||
xsize: 7500.0 | ||
ysize: 12500.0 | ||
zsize: 50.0 | ||
use_eclipse_grid_index_origo: True | ||
|
||
field: | ||
name: "FIELDPAR" | ||
algorithm: "gstools" | ||
file_format: "ROFF" | ||
initial_file_name: "init_files/FieldParam" | ||
updated_file_name: "FieldParam" | ||
seed_file: "randomseeds.txt" | ||
variogram: "gaussian" | ||
correlation_range: [3000.0, 2000.0, 2.0] | ||
correlation_azimuth: 45.0 | ||
correlation_dip: 0.0 | ||
correlation_exponent: 1.9 | ||
trend_use: False | ||
trend_params: [ 1.0, -1.0 ] | ||
trend_relstd: 0.15 | ||
grid_dimension: [150, 250, 1] | ||
grid_file_name: "GRID_ECLIPSE_STANDARD_GRID_INDEX_ORIGO.EGRID" | ||
|
||
response: | ||
name: "UPSCALED" | ||
grid_dimension: [15, 25, 1] | ||
upscaled_file_name: "Upscaled" | ||
grid_file_name: "UpscaleGrid.EGRID" | ||
file_format: "ROFF" | ||
write_upscaled_field: True | ||
response_function: "average" | ||
gen_data_file_name: "UpscaledField_0.txt" | ||
|
||
observation: | ||
directory: "observations" | ||
file_name: "observations.obs" | ||
data_dir: "obs_data" | ||
reference_param_file: "init_files/ObsField" | ||
reference_field_name: "ObsField" | ||
rel_error: 0.10 | ||
min_abs_error: 0.01 | ||
# selected_grid_cells: | ||
# - [5, 10, 1] | ||
# - [10, 5, 1] | ||
|
||
localisation: | ||
method: "gaussian" | ||
|
||
optional: | ||
write_obs_pred_diff_field_file: True |
54 changes: 54 additions & 0 deletions
54
tests/jobs/localisation/example_case/example_test_config_A_with_actnum.yml
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,54 @@ | ||
# ROFF format standard Eclipse origo | ||
settings: | ||
grid_size: | ||
xsize: 7500.0 | ||
ysize: 12500.0 | ||
zsize: 50.0 | ||
use_eclipse_grid_index_origo: True | ||
polygon_file: "Polygons.txt" | ||
|
||
field: | ||
name: "FIELDPAR" | ||
algorithm: "gstools" | ||
file_format: "ROFF" | ||
initial_file_name: "init_files/FieldParam" | ||
updated_file_name: "FieldParam" | ||
seed_file: "randomseeds.txt" | ||
variogram: "gaussian" | ||
correlation_range: [3000.0, 2000.0, 2.0] | ||
correlation_azimuth: 45.0 | ||
correlation_dip: 0.0 | ||
correlation_exponent: 1.9 | ||
trend_use: False | ||
trend_params: [ 1.0, -1.0 ] | ||
trend_relstd: 0.15 | ||
grid_dimension: [150, 250, 1] | ||
grid_file_name: "GRID_WITH_ACTNUM.EGRID" | ||
|
||
response: | ||
name: "UPSCALED" | ||
grid_dimension: [15, 25, 1] | ||
upscaled_file_name: "Upscaled" | ||
grid_file_name: "UpscaleGrid.EGRID" | ||
file_format: "ROFF" | ||
write_upscaled_field: True | ||
response_function: "average" | ||
gen_data_file_name: "UpscaledField_0.txt" | ||
|
||
observation: | ||
directory: "observations" | ||
file_name: "observations.obs" | ||
data_dir: "obs_data" | ||
reference_param_file: "init_files/ObsField" | ||
reference_field_name: "ObsField" | ||
rel_error: 0.10 | ||
min_abs_error: 0.01 | ||
# selected_grid_cells: | ||
# - [5, 10, 1] | ||
# - [10, 5, 1] | ||
|
||
localisation: | ||
method: "gaussian" | ||
|
||
optional: | ||
write_obs_pred_diff_field_file: True |
53 changes: 53 additions & 0 deletions
53
tests/jobs/localisation/example_case/example_test_config_B.yml
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,53 @@ | ||
# GRDECL format standard Eclipse origo | ||
settings: | ||
grid_size: | ||
xsize: 7500.0 | ||
ysize: 12500.0 | ||
zsize: 50.0 | ||
use_eclipse_grid_index_origo: True | ||
|
||
field: | ||
name: "FIELDPAR" | ||
algorithm: "gstools" | ||
file_format: "GRDECL" | ||
initial_file_name: "init_files/FieldParam" | ||
updated_file_name: "FieldParam" | ||
seed_file: "randomseeds.txt" | ||
variogram: "gaussian" | ||
correlation_range: [3000.0, 2000.0, 2.0] | ||
correlation_azimuth: 45.0 | ||
correlation_dip: 0.0 | ||
correlation_exponent: 1.9 | ||
trend_use: False | ||
trend_params: [ 1.0, -1.0 ] | ||
trend_relstd: 0.15 | ||
grid_dimension: [150, 250, 1] | ||
grid_file_name: "GRID_ECLIPSE_STANDARD_GRID_INDEX_ORIGO.EGRID" | ||
|
||
response: | ||
name: "UPSCALED" | ||
grid_dimension: [15, 25, 1] | ||
upscaled_file_name: "Upscaled" | ||
grid_file_name: "UpscaleGrid.EGRID" | ||
file_format: "GRDECL" | ||
write_upscaled_field: True | ||
response_function: "average" | ||
gen_data_file_name: "UpscaledField_0.txt" | ||
|
||
observation: | ||
directory: "observations" | ||
file_name: "observations.obs" | ||
data_dir: "obs_data" | ||
reference_param_file: "init_files/ObsField" | ||
reference_field_name: "ObsField" | ||
rel_error: 0.10 | ||
min_abs_error: 0.01 | ||
# selected_grid_cells: | ||
# - [5, 10, 1] | ||
# - [10, 5, 1] | ||
|
||
localisation: | ||
method: "gaussian" | ||
|
||
optional: | ||
write_obs_pred_diff_field_file: True |
53 changes: 53 additions & 0 deletions
53
tests/jobs/localisation/example_case/example_test_config_C.yml
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,53 @@ | ||
# ROFF format standard RMS origo | ||
settings: | ||
grid_size: | ||
xsize: 7500.0 | ||
ysize: 12500.0 | ||
zsize: 50.0 | ||
use_eclipse_grid_index_origo: False | ||
|
||
field: | ||
name: "FIELDPAR" | ||
algorithm: "gstools" | ||
file_format: "ROFF" | ||
initial_file_name: "init_files/FieldParam" | ||
updated_file_name: "FieldParam" | ||
seed_file: "randomseeds.txt" | ||
variogram: "gaussian" | ||
correlation_range: [3000.0, 2000.0, 2.0] | ||
correlation_azimuth: 45.0 | ||
correlation_dip: 0.0 | ||
correlation_exponent: 1.9 | ||
trend_use: False | ||
trend_params: [ 1.0, -1.0 ] | ||
trend_relstd: 0.15 | ||
grid_dimension: [150, 250, 1] | ||
grid_file_name: "GRID_RMS_STANDARD_GRID_INDEX_ORIGO.EGRID" | ||
|
||
response: | ||
name: "UPSCALED" | ||
grid_dimension: [15, 25, 1] | ||
upscaled_file_name: "Upscaled" | ||
grid_file_name: "UpscaleGrid.EGRID" | ||
file_format: "ROFF" | ||
write_upscaled_field: True | ||
response_function: "average" | ||
gen_data_file_name: "UpscaledField_0.txt" | ||
|
||
observation: | ||
directory: "observations" | ||
file_name: "observations.obs" | ||
data_dir: "obs_data" | ||
reference_param_file: "init_files/ObsField" | ||
reference_field_name: "ObsField" | ||
rel_error: 0.10 | ||
min_abs_error: 0.01 | ||
# selected_grid_cells: | ||
# - [5, 10, 1] | ||
# - [10, 5, 1] | ||
|
||
localisation: | ||
method: "gaussian" | ||
|
||
optional: | ||
write_obs_pred_diff_field_file: True |
Oops, something went wrong.