Skip to content

Commit

Permalink
Added example config files for discussion
Browse files Browse the repository at this point in the history
  • Loading branch information
oddvarlia committed Feb 6, 2025
1 parent 1b67c69 commit 083d1fe
Show file tree
Hide file tree
Showing 5 changed files with 357 additions and 0 deletions.
35 changes: 35 additions & 0 deletions src/fmu/tools/rms/localisation/example_dist_loc1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
localisation:
# Result file format (for summary observations) can be a csv file with columns:
# field_name ert-id xpos, ypos xrange yrange rotation tapering_function_name
result_file: params_dist_localisation.dat
rms_settings:
use_well_head_position: False
grid_model: "Geogrid_Valysar"
blocked_well_set: "BW"
trajectory: "Drilled trajectory"

input_files:
well_renaming_table: ../input/well_modelling/well_info/rms_eclipse.renaming_table
ert_summary_obs_file: ../../ert/input/observations/drogon_wbhp_rft_wct_gor_tracer_4d.obs
ert_general_obs_file: ../../ert/input/observations/drogon_wbhp_rft_wct_gor_tracer_4d.obs
rms_field_correlation_file: ../input/config/aps/correlation_ranges.txt # Not yet used
ert_config_field_param_file: ../../ert/input/config/ahm_field_aps.ert

# Simplest specification (all fields, all summary obs_types, all wells) use the same influence ellipse range and orientation
# If field_settings keyword is used, this will override the default settings for the fields specified in field_settings
default_field_settings:
ranges: [2000.0, 1000.0, 45.0] # (main_range, perpendicular_range, rotation)

# Alternative tapering functions (scaling by distance functions). Optional
tapering: "gauss"

# Alternative way to define one common settings
# The name: 'all' means the same as wildcard settings '*'
# In this case all combinations (field_name, ert_id) will get a range setting
# and no combination will get default value for range setting
field_settings:
- field_name: [all]
obs_type: [all]
well_names: [all]
ranges: [3000.0, 2500.0, 15.0] # (main_range, perpendicular_range, rotation)

48 changes: 48 additions & 0 deletions src/fmu/tools/rms/localisation/example_dist_loc2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
localisation:
# Result file format (for summary observations) can be a csv file with columns:
# field_name ert-id xpos, ypos xrange yrange rotation tapering_function_name
result_file: params_dist_localisation.dat
rms_settings:
use_well_head_position: True
grid_model: "Geogrid_Valysar"
blocked_well_set: "BW"
trajectory: "Drilled trajectory"
input_files:
well_renaming_table: ../input/well_modelling/well_info/rms_eclipse.renaming_table
ert_summary_obs_file: ../../ert/input/observations/drogon_wbhp_rft_wct_gor_tracer_4d_plt.obs
ert_general_obs_file: ../../ert/input/observations/drogon_wbhp_rft_wct_gor_tracer_4d_plt.obs
rms_field_correlation_file: ../input/config/aps/correlation_ranges.txt # Not yet used
ert_config_field_param_file: ../../ert/input/config/ahm_field_aps.ert

default_field_settings:
ranges: [2000.0, 1000.0, 45.0] # (main_range, perpendicular_range, rotation)

# Select scaling function (how scaling factor decreases from 1 to 0 as function of distance from position of observation)
tapering: "gauss"

# Individual settings per field that is explicitly specified,
# but common settings for all obs_types, all wells found in summary observations.
# For fields not specified, use default settings.
# These settings will override the default_field_settings.
field_settings:
- field_name: [aps_Valysar_GRF1]
obs_type: [all]
well_names: [all]
ranges: [1500.0, 1250.0, 45.0]
- field_name: [aps_Valysar_GRF2]
obs_type: [all]
well_names: [all]
ranges: [1000.0, 1000.0, 35.0]
- field_name: [aps_Valysar_GRF3]
obs_type: [all]
well_names: [all]
ranges: [2500.0, 1500.0, 145.0]









79 changes: 79 additions & 0 deletions src/fmu/tools/rms/localisation/example_dist_loc3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
localisation:
# Result file format (for summary observations) can be a csv file with columns:
# field_name ert-id xpos, ypos xrange yrange rotation tapering_function_name
result_file: params_dist_localisation.dat
rms_settings:
use_well_head_position: False
grid_model: "Geogrid_Valysar"
blocked_well_set: "BW"
trajectory: "Drilled trajectory"

input_files:
well_renaming_table: ../input/well_modelling/well_info/rms_eclipse.renaming_table
ert_summary_obs_file: ../../ert/input/observations/drogon_wbhp_rft_wct_gor_tracer_4d_plt.obs
ert_general_obs_file: ../../ert/input/observations/drogon_wbhp_rft_wct_gor_tracer_4d_plt.obs
rms_field_correlation_file: ../input/config/aps/correlation_ranges.txt # Not yet used
ert_config_field_param_file: ../../ert/input/config/ahm_field_aps.ert

default_field_settings:
ranges: [2000.0, 1000.0, 45.0] # (main_range, perpendicular_range, rotation)

tapering: "gauss"

# Individual settings per field that is explicitly specified,
# but common settings for all obs_types, all wells found in summary observations.
# For fields not specified, use default settings.
# These settings will override the default_field_settings.

#Example below specify the following:
# First item in the field_settings list: All field names, all obs_types and all wells matching the wildcard notation
# will be assigned one common set of range values.
# Second item in the field settings list: All field names, all obs_types and all wells matching the wildcard notation
# will be assigned one common set of range values if the have not already be assigned a range in the previous
# field settings item in the list.
# Third item in the field settings list: All field names, all obs_types and all wells matching the wildcard notation
# will be assigned one common set of range values if the have not already be assigned a range in the previous
# field settings item in the list.
#
# For all combinations of (field_parameter, ert_id) not assigned here, the default set of range paramters will be used.
#
#
# Wildcard notation is possible in field_settings for:
# - field_name
# - obs_type
# - well names
#
# NOTE: If there are overlapping specifications in keyword 'field_settings',
# the field settings items previously in the list of field settings will be used!!
# No warning or error message if overlapping
# Specification in keyword 'field_settings' will always overwrite default settings.
field_settings:
- field_name: [aps_*_GRF1]
obs_type: ["WO*",WWCT]
well_names: ["55*"]
ranges: [300.0, 300.0, 0.0]
- field_name: [aps_Valysar_GRF1]
obs_type: ["*O*"]
well_names: ["*-A-*"]
ranges: [3000.0, 3000.0, 0.0]
- field_name: [aps_V*_GRF1]
obs_type: [WGOR]
well_names: [55_33-A-4]
ranges: [1000.0, 1000.0, 0.0]
- field_name: [aps_Valysar_GRF2]
obs_type: [all]
well_names: [all]
ranges: [300.0, 400.0, 25.0]

individual_obs_settings:
- field_name: aps_Volon_GRF1
ert_obs_id: A1_WBHP_05_05_2019
ranges: [1200, 1500, 30]
- field_name: aps_Therys_GRF2
ert_obs_id: A1_WBHP_02_11_2019
ranges: [1200, 1700, 30]





40 changes: 40 additions & 0 deletions src/fmu/tools/rms/localisation/example_dist_loc4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
localisation:
# Result file format (for summary observations) can be a csv file with columns:
# field_name ert-id xpos, ypos xrange yrange rotation tapering_function_name
result_file: params_dist_localisation.dat

# RMS blocked wells used in calculating position
rms_settings:
use_well_head_position: True
grid_model: "Geogrid_Valysar"
blocked_well_set: "BW"
trajectory: "Drilled trajectory"

input_files:
well_renaming_table: ../input/well_modelling/well_info/rms_eclipse.renaming_table
ert_summary_obs_file: ../../ert/input/observations/drogon_wbhp_rft_wct_gor_tracer_4d_plt.obs
ert_general_obs_file: ../../ert/input/observations/drogon_wbhp_rft_wct_gor_tracer_4d_plt.obs
rms_field_correlation_file: ../input/config/aps/correlation_ranges.txt # NOt yet used
ert_config_field_param_file: ../../ert/input/config/ahm_field_aps.ert

default_field_settings:
ranges: [2000.0, 1000.0, 45.0] # (main_range, perpendicular_range, rotation)

# Individual settings per field that is explicitly specified,
# but common settings for all obs_types, all wells found in summary observations.
# For fields not specified, use default settings.
# These settings will override the default_field_settings.

# Example below specify that for two particular combinations (field_name, ert_id)
# an individual range setting different from the default is specified
individual_obs_settings:
- field_name: aps_Valysar_GRF1
ert_obs_id: A1_WBHP_05_05_2019
ranges: [1200, 1500, 30]
- field_name: aps_Valysar_GRF1
ert_obs_id: A1_WBHP_02_11_2019
ranges: [1200, 1700, 30]




155 changes: 155 additions & 0 deletions src/fmu/tools/rms/localisation/localisation_scaling.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
# Define a file format for ERT containing scaling factors for each
# pair of observations and field parameter value.
import json

scaling_factor_dict = {
"field": "aps_Valysar_GRF1",
"ert_id_list":
[
{
"ert_id_name": "WGOR_A4_2",
"scaling":
[
{
"index": (10, 55),
"value": 0.776,
},
{
"index": (11, 55),
"value": 0.7,
},
{
"index": (10, 56),
"value": 0.8,
},
{
"index": (11, 56),
"value": 0.6,
},
]
},
{
"ert_id_name": "WGOR_A4_1",
"scaling":
[
{
"index": (10, 55),
"value": 0.776,
},
{
"index": (11, 55),
"value": 0.7,
},
{
"index": (10, 56),
"value": 0.8,
},
{
"index": (11, 56),
"value": 0.6,
},
]
},
]
}

# Alternative where all combinations of (field_name, ert_id) specified has the same scaling factor
scaling_factor_group_dict = [
{
"fields": [ "aps_Valysar_GRF1","aps_Valysar_GRF2","aps_Valysar_GRF3"],
"ert_id_list": ["WGOR_A4_1", "WGOR_A4_2", "WGOR_A4_3"],
"scaling":
[
{
"index": (10, 55),
"value": 0.776,
},
{
"index": (11, 55),
"value": 0.7,
},
{
"index": (10, 56),
"value": 0.8,
},
{
"index": (11, 56),
"value": 0.6,
},
]
},
{
"fields": [ "aps_Therys_GRF1","aps_Therys_GRF2","aps_Therys_GRF3"],
"ert_id_list": ["WWCT_A4_1","WWCT_A4_2","WWCT_A4_3","WWCT_A4_4","WWCT_A4_5","WWCT_A4_6"],
"scaling":
[
{
"index": (10, 55),
"value": 0.5,
},
{
"index": (11, 55),
"value": 0.45,
},
{
"index": (10, 56),
"value": 0.55,
},
{
"index": (11, 56),
"value": 0.65,
},
]
},
]


# Alternative where all combinations of (field_name, ert_id) specified has the same scaling factor
# and the scaling factor is specified as a 2D map (matrix)
scaling_factor_maps_dict = [
{
"fields": [ "aps_Valysar_GRF1","aps_Valysar_GRF2","aps_Valysar_GRF3"],
"ert_id_list": ["WGOR_A4_1", "WGOR_A4_2", "WGOR_A4_3"],
"scaling_map": {
"nx": 7,
"ny": 5,
"index_order": "C", # j + i*ny
"map_values":
[
0, 0, 0, 0.01, 0.04,
0.1, 0.2, 0.3, 0.2, 0.1,
0.2, 0.3, 0.5, 0.3, 0.2,
0.3, 0.4, 0.7, 0.4, 0.3,
0.2, 0.8, 1.0, 0.8, 0.4,
0.1, 0.4, 0.7, 0.5, 0.3,
0.0, 0.2, 0.5, 0.3, 0.1,
]
}
},
{
"fields": [ "aps_Therys_GRF1","aps_Therys_GRF2","aps_Therys_GRF3"],
"ert_id_list": ["WWCT_A4_1","WWCT_A4_2","WWCT_A4_3","WWCT_A4_4","WWCT_A4_5","WWCT_A4_6"],
"scaling_map": {
"nx": 7,
"ny": 5,
"index_order": "C", # j + i*ny
"map_values":
[
0, 0, 0, 0.01, 0.04,
0.1, 0.2, 0.3, 0.2, 0.1,
0.2, 0.3, 0.5, 0.3, 0.2,
0.3, 0.4, 0.7, 0.4, 0.3,
0.2, 0.8, 1.0, 0.8, 0.4,
0.1, 0.4, 0.7, 0.5, 0.3,
0.0, 0.2, 0.5, 0.3, 0.1,
]
}
},
]

print(json.dumps(scaling_factor_dict, sort_keys=True, indent=3))
print()
print(json.dumps(scaling_factor_group_dict, sort_keys=True, indent=3))
print()
print(json.dumps(scaling_factor_maps_dict, sort_keys=True, indent=3))

0 comments on commit 083d1fe

Please sign in to comment.