Skip to content

Commit 3ac12d9

Browse files
committed
Add create_obs_with_localisation_attributes.py
add test_create_obs_with_localisation Add example config file
1 parent 23f2b9e commit 3ac12d9

13 files changed

+1846
-0
lines changed

src/fmu/tools/rms/localisation/__init__.py

Whitespace-only changes.

src/fmu/tools/rms/localisation/create_obs_with_localisation_attributes.py

Lines changed: 891 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
localisation:
2+
# Result file format (for summary observations) can be a csv file with columns:
3+
# field_name ert-id xpos, ypos xrange yrange rotation tapering_function_name
4+
result_file: params_dist_localisation.dat
5+
rms_settings:
6+
use_well_head_position: False
7+
grid_model: "Geogrid_Valysar"
8+
blocked_well_set: "BW"
9+
trajectory: "Drilled trajectory"
10+
11+
input_files:
12+
well_renaming_table: ../input/well_modelling/well_info/rms_eclipse.renaming_table
13+
ert_summary_obs_file: ../../ert/input/observations/drogon_wbhp_rft_wct_gor_tracer_4d.obs
14+
ert_general_obs_file: ../../ert/input/observations/drogon_wbhp_rft_wct_gor_tracer_4d.obs
15+
rms_field_correlation_file: ../input/config/aps/correlation_ranges.txt # Not yet used
16+
ert_config_field_param_file: ../../ert/input/config/ahm_field_aps.ert
17+
18+
# Simplest specification (all fields, all summary obs_types, all wells) use the same influence ellipse range and orientation
19+
# If field_settings keyword is used, this will override the default settings for the fields specified in field_settings
20+
default_field_settings:
21+
ranges: [2000.0, 1000.0, 45.0] # (main_range, perpendicular_range, rotation)
22+
23+
# Alternative tapering functions (scaling by distance functions). Optional
24+
tapering: "gauss"
25+
26+
# Alternative way to define one common settings
27+
# The name: 'all' means the same as wildcard settings '*'
28+
# In this case all combinations (field_name, ert_id) will get a range setting
29+
# and no combination will get default value for range setting
30+
field_settings:
31+
- field_name: [all]
32+
obs_type: [all]
33+
well_names: [all]
34+
ranges: [3000.0, 2500.0, 15.0] # (main_range, perpendicular_range, rotation)
35+
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
localisation:
2+
# Result file format (for summary observations) can be a csv file with columns:
3+
# field_name ert-id xpos, ypos xrange yrange rotation tapering_function_name
4+
result_file: params_dist_localisation.dat
5+
rms_settings:
6+
use_well_head_position: True
7+
grid_model: "Geogrid_Valysar"
8+
blocked_well_set: "BW"
9+
trajectory: "Drilled trajectory"
10+
input_files:
11+
well_renaming_table: ../input/well_modelling/well_info/rms_eclipse.renaming_table
12+
ert_summary_obs_file: ../../ert/input/observations/drogon_wbhp_rft_wct_gor_tracer_4d_plt.obs
13+
ert_general_obs_file: ../../ert/input/observations/drogon_wbhp_rft_wct_gor_tracer_4d_plt.obs
14+
rms_field_correlation_file: ../input/config/aps/correlation_ranges.txt # Not yet used
15+
ert_config_field_param_file: ../../ert/input/config/ahm_field_aps.ert
16+
17+
default_field_settings:
18+
ranges: [2000.0, 1000.0, 45.0] # (main_range, perpendicular_range, rotation)
19+
20+
# Select scaling function (how scaling factor decreases from 1 to 0 as function of distance from position of observation)
21+
tapering: "gauss"
22+
23+
# Individual settings per field that is explicitly specified,
24+
# but common settings for all obs_types, all wells found in summary observations.
25+
# For fields not specified, use default settings.
26+
# These settings will override the default_field_settings.
27+
field_settings:
28+
- field_name: [aps_Valysar_GRF1]
29+
obs_type: [all]
30+
well_names: [all]
31+
ranges: [1500.0, 1250.0, 45.0]
32+
- field_name: [aps_Valysar_GRF2]
33+
obs_type: [all]
34+
well_names: [all]
35+
ranges: [1000.0, 1000.0, 35.0]
36+
- field_name: [aps_Valysar_GRF3]
37+
obs_type: [all]
38+
well_names: [all]
39+
ranges: [2500.0, 1500.0, 145.0]
40+
41+
42+
43+
44+
45+
46+
47+
48+
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
localisation:
2+
# Result file format (for summary observations) can be a csv file with columns:
3+
# field_name ert-id xpos, ypos xrange yrange rotation tapering_function_name
4+
result_file: params_dist_localisation.dat
5+
rms_settings:
6+
use_well_head_position: False
7+
grid_model: "Geogrid_Valysar"
8+
blocked_well_set: "BW"
9+
trajectory: "Drilled trajectory"
10+
11+
input_files:
12+
well_renaming_table: ../input/well_modelling/well_info/rms_eclipse.renaming_table
13+
ert_summary_obs_file: ../../ert/input/observations/drogon_wbhp_rft_wct_gor_tracer_4d_plt.obs
14+
ert_general_obs_file: ../../ert/input/observations/drogon_wbhp_rft_wct_gor_tracer_4d_plt.obs
15+
rms_field_correlation_file: ../input/config/aps/correlation_ranges.txt # Not yet used
16+
ert_config_field_param_file: ../../ert/input/config/ahm_field_aps.ert
17+
18+
default_field_settings:
19+
ranges: [2000.0, 1000.0, 45.0] # (main_range, perpendicular_range, rotation)
20+
21+
tapering: "gauss"
22+
23+
# Individual settings per field that is explicitly specified,
24+
# but common settings for all obs_types, all wells found in summary observations.
25+
# For fields not specified, use default settings.
26+
# These settings will override the default_field_settings.
27+
28+
#Example below specify the following:
29+
# First item in the field_settings list: All field names, all obs_types and all wells matching the wildcard notation
30+
# will be assigned one common set of range values.
31+
# Second item in the field settings list: All field names, all obs_types and all wells matching the wildcard notation
32+
# will be assigned one common set of range values if the have not already be assigned a range in the previous
33+
# field settings item in the list.
34+
# Third item in the field settings list: All field names, all obs_types and all wells matching the wildcard notation
35+
# will be assigned one common set of range values if the have not already be assigned a range in the previous
36+
# field settings item in the list.
37+
#
38+
# For all combinations of (field_parameter, ert_id) not assigned here, the default set of range paramters will be used.
39+
#
40+
#
41+
# Wildcard notation is possible in field_settings for:
42+
# - field_name
43+
# - obs_type
44+
# - well names
45+
#
46+
# NOTE: If there are overlapping specifications in keyword 'field_settings',
47+
# the field settings items previously in the list of field settings will be used!!
48+
# No warning or error message if overlapping
49+
# Specification in keyword 'field_settings' will always overwrite default settings.
50+
field_settings:
51+
- field_name: [aps_*_GRF1]
52+
obs_type: ["WO*",WWCT]
53+
well_names: ["55*"]
54+
ranges: [300.0, 300.0, 0.0]
55+
- field_name: [aps_Valysar_GRF1]
56+
obs_type: ["*O*"]
57+
well_names: ["*-A-*"]
58+
ranges: [3000.0, 3000.0, 0.0]
59+
- field_name: [aps_V*_GRF1]
60+
obs_type: [WGOR]
61+
well_names: [55_33-A-4]
62+
ranges: [1000.0, 1000.0, 0.0]
63+
- field_name: [aps_Valysar_GRF2]
64+
obs_type: [all]
65+
well_names: [all]
66+
ranges: [300.0, 400.0, 25.0]
67+
68+
individual_obs_settings:
69+
- field_name: aps_Volon_GRF1
70+
ert_obs_id: A1_WBHP_05_05_2019
71+
ranges: [1200, 1500, 30]
72+
- field_name: aps_Therys_GRF2
73+
ert_obs_id: A1_WBHP_02_11_2019
74+
ranges: [1200, 1700, 30]
75+
76+
77+
78+
79+
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
localisation:
2+
# Result file format (for summary observations) can be a csv file with columns:
3+
# field_name ert-id xpos, ypos xrange yrange rotation tapering_function_name
4+
result_file: params_dist_localisation.dat
5+
6+
# RMS blocked wells used in calculating position
7+
rms_settings:
8+
use_well_head_position: True
9+
grid_model: "Geogrid_Valysar"
10+
blocked_well_set: "BW"
11+
trajectory: "Drilled trajectory"
12+
13+
input_files:
14+
well_renaming_table: ../input/well_modelling/well_info/rms_eclipse.renaming_table
15+
ert_summary_obs_file: ../../ert/input/observations/drogon_wbhp_rft_wct_gor_tracer_4d_plt.obs
16+
ert_general_obs_file: ../../ert/input/observations/drogon_wbhp_rft_wct_gor_tracer_4d_plt.obs
17+
rms_field_correlation_file: ../input/config/aps/correlation_ranges.txt # NOt yet used
18+
ert_config_field_param_file: ../../ert/input/config/ahm_field_aps.ert
19+
20+
default_field_settings:
21+
ranges: [2000.0, 1000.0, 45.0] # (main_range, perpendicular_range, rotation)
22+
23+
# Individual settings per field that is explicitly specified,
24+
# but common settings for all obs_types, all wells found in summary observations.
25+
# For fields not specified, use default settings.
26+
# These settings will override the default_field_settings.
27+
28+
# Example below specify that for two particular combinations (field_name, ert_id)
29+
# an individual range setting different from the default is specified
30+
individual_obs_settings:
31+
- field_name: aps_Valysar_GRF1
32+
ert_obs_id: A1_WBHP_05_05_2019
33+
ranges: [1200, 1500, 30]
34+
- field_name: aps_Valysar_GRF1
35+
ert_obs_id: A1_WBHP_02_11_2019
36+
ranges: [1200, 1700, 30]
37+
38+
39+
40+
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
summary_observation:
2+
- well_name:
3+
rms_name: "55_33-A-1"
4+
sim_name: A1
5+
position:
6+
xpos: 462588.5
7+
ypos: 5934081.0
8+
hwell_length: 0.0
9+
hwell_angle: 0.0
10+
influence:
11+
- type:
12+
- WGOR
13+
- WWCT
14+
xrange: 1500.0
15+
yrange: 1250.0
16+
angle: 45.0
17+
- type:
18+
- WBHP
19+
xrange: 100.0
20+
yrange: 150.0
21+
angle: 45.0
22+
obs:
23+
- id: WGOR_A1_0
24+
type: WGOR
25+
value: 138.32456970214844
26+
uncertainty: 50.0
27+
date: "2018-03-30"
28+
29+
- id: WGOR_A1_1
30+
type: WGOR
31+
value: 138.32456970214844
32+
uncertainty: 50.0
33+
date: "2018-06-30"
34+
- id: WGOR_A1_2
35+
type: WGOR
36+
value: 140.0
37+
uncertainty: 50.0
38+
date: "2018-09-30"
39+
- type: WWCT
40+
value: 0.035560693591833115
41+
uncertainty: 0.1
42+
date: "2018-03-30"
43+
- type: WBHP
44+
value: 248.1
45+
uncertainty: 1.0
46+
date: "2018-03-30"
47+
- type: WGOR
48+
value: 138.32456970214844
49+
uncertainty: 50.0
50+
date: "2018-03-30"
51+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
-----------------------------------------------------
2+
-- AHM - APS
3+
-----------------------------------------------------
4+
-- Use ert/updated field parameters if they exist
5+
-- Ert parameters are generated for the second iteration/posterior (i.e. after prior is finished)
6+
7+
GRID ../../../rms/output/aps/ERTBOX.EGRID -- Neccessary for AHM using field parameters
8+
9+
FIELD aps_Valysar_GRF1 PARAMETER aps_Valysar_GRF1.roff INIT_FILES:rms/output/aps/aps_Valysar_GRF1.roff MIN:-5.5 MAX:5.5 FORWARD_INIT:True
10+
FIELD aps_Valysar_GRF2 PARAMETER aps_Valysar_GRF2.roff INIT_FILES:rms/output/aps/aps_Valysar_GRF2.roff MIN:-5.5 MAX:5.5 FORWARD_INIT:True
11+
FIELD aps_Valysar_GRF3 PARAMETER aps_Valysar_GRF3.roff INIT_FILES:rms/output/aps/aps_Valysar_GRF3.roff MIN:-5.5 MAX:5.5 FORWARD_INIT:True
12+
FIELD aps_Therys_GRF1 PARAMETER aps_Therys_GRF1.roff INIT_FILES:rms/output/aps/aps_Therys_GRF1.roff MIN:-5.5 MAX:5.5 FORWARD_INIT:True
13+
FIELD aps_Therys_GRF2 PARAMETER aps_Therys_GRF2.roff INIT_FILES:rms/output/aps/aps_Therys_GRF2.roff MIN:-5.5 MAX:5.5 FORWARD_INIT:True
14+
FIELD aps_Therys_GRF3 PARAMETER aps_Therys_GRF3.roff INIT_FILES:rms/output/aps/aps_Therys_GRF3.roff MIN:-5.5 MAX:5.5 FORWARD_INIT:True
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
-- Seismic data
2+
GENERAL_OBSERVATION AMP_2020_2018_TOP { DATA = AMP_2020_2018_TOP ; RESTART=1; OBS_FILE=./seismic/topvolantis_amplitude_mean_20200701_20180101_1.txt; };
3+
--
4+
-- PLT data
5+
SUMMARY_OBSERVATION A3_WOPR_VALYSAR_01_08_2019 {VALUE = 266; ERROR = 100; DATE = 2019-08-01; KEY = WOPRL__1:A3;};
6+
7+
-- Tracer data
8+
GENERAL_OBSERVATION TRACER_OBS { DATA = TRACER_SIM ; RESTART=1; OBS_FILE=./tracer/drogon_tracer.obs; };
9+
--
10+
-- RFT data
11+
GENERAL_OBSERVATION R_A2_OBS { DATA = R_A2_SIM ; RESTART = 1; OBS_FILE =./rft/R_A2_1.obs; };
12+
13+
--
14+
-- BHP (shut-in) data
15+
SUMMARY_OBSERVATION A2_WBHP_05_05_2019 { VALUE = 266.8; ERROR = 10; DATE = 2019-05-05; KEY = WBHP:A2; };
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-- WWCT and WGOR data
2+
SUMMARY_OBSERVATION WWCT_A1_1{VALUE=2.9680345505767036e-06; ERROR=0.1; DATE=2018-06-22; KEY=WWCT:A1;};
3+
SUMMARY_OBSERVATION WGOR_A4_5{VALUE=134.9546356201172; ERROR=50; DATE=2020-02-08; KEY=WGOR:A4;};
4+

0 commit comments

Comments
 (0)