-
Notifications
You must be signed in to change notification settings - Fork 14
Distance-based localiztion test script for testing full update workflow using ERT storage with ensemble experiments #230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
distance_based_on_real_case.py
Outdated
| groups = list(param_config_all.keys()) | ||
| realizations = ensemble.get_realization_list_with_responses() | ||
| group_number = 0 | ||
| for group_name in groups: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use enumerate to avoid having to increment group_number manually.
for group_number, group_name in enumerate(groups)
distance_based_on_real_case.py
Outdated
| smoother = DistanceESMDA( | ||
| covariance=C_D, observations=observations, alpha=alpha, seed=seed | ||
| ) | ||
| smoother.prepare_assimilation(Y, truncation=0.99) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can as part of the assimilate_batch function and only do the actual calculations if self.X3 and self.D` are not already set.
| # Turn on/off export of field parameters into 3D parameter files in ROFF format to be read by RMS. | ||
| WRITE_STATS_PARAMS = True | ||
|
|
||
| # Common definition of ERTBOX for all zones in Drogon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the grid file specified using the GRID keyword in the Drogon project contain all this information?
| OBS_FILE_PATH = ( | ||
| "/project/fmu/users/olia/drogon_20250623_11-50/resmod/ff/25.0.0/rms/model/" | ||
| ) | ||
| OBS_FILE = "summary_obs_with_localization_attributes.csv" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you push this file to the repo as well or is it perhaps too big?
distance_based_on_real_case.py
Outdated
| OBS_SUMMARY_WITH_LOCAL_ATTRIBUTES_FILE = OBS_FILE_PATH + OBS_FILE | ||
|
|
||
| # Hard-coded a classification of parameter groups into scalars, 2D or 3D field parameters | ||
| # NOTE: This should be available from ERT storage (ERT knows about the source the keyword FIELD, SURFACE GEN_KW) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's one way to get the parameter type:
with open_storage(storage_path, "r") as storage:
experiment = storage.get_experiment_by_name(experiment_name)
print(experiment.parameter_configuration["COND"].type)
# >> field
print(experiment.parameter_configuration["INIT_TEMP_SCALE"].type)
# >> gen_kw
distance_based_on_real_case.py
Outdated
| # (e.g for permeabilit or porosity) could be <zone_name>_<facies>_<petro_name> | ||
| # for petrophysical fields to be updated simultaneously with facies update from APS. | ||
| # For reservoir zones without facies modelling, the convention could be <zone_name>_<petro_name> | ||
| # NOTE: An additional parameter in FIELD keyword with zone name can solve the problem if naming convention |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An issue has been created on this that needs more information:
00e0f0e to
974fcfb
Compare
|
I suggest we generate .csv files that are comma delimited and not delimited by space. This can avoid potential bugs if for example a zone name has a space in its name. |
a5846f6 to
0b1f9a9
Compare
7505b9c to
14a73ba
Compare
6992e30 to
c7e0d02
Compare
…ning on a case from ERT storage
update distance_based_on_real_case.py
Added seismic obs and RFT obs Attempt to save update to ERT storage Added tracer obs Added tracer obs file Added ESMDA update to scalars Modified the path to where on scratch to find the ensemble Ensure that updated ensemble in storage has iteration greater than 0 Added new scaling function Changed seismic_range Update scalar parameters Updated document lines
41ecce3 to
3dc8862
Compare
The script is initially using Drogon case from this summer.
The distance-based localization depends on having position for observations (well prod observations and seismic points for 4D)
This is currently not available in ERT and storage directories created by ERT so the information must be taken from the FMU setup for seismic observations and the RMS forward model.
A script to extract position data from wells using RMS project is included
The plan is to get position data for the seismic observations as well by loading files with seismic data points including position from ERT project.
Main goal of this branch is to test and evaluate performance of distance-based localization before the method is implemented in ERT code.
This branch is built on the branch Distance-based localization per 15.08.2025