Skip to content

Commit

Permalink
Update_after_review
Browse files Browse the repository at this point in the history
  • Loading branch information
oddvarlia committed Dec 10, 2024
1 parent 797bd43 commit 875fed1
Show file tree
Hide file tree
Showing 9 changed files with 297 additions and 218 deletions.
97 changes: 49 additions & 48 deletions docs/generate_petro_jobs_for_field_update.rst
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
rms.generate_petro_jobs_for_field_update
=========================================
rms.generate_petro_jobs
===========================

When running FMU project where field parameters for both facies and
petrophysical properties is updated in ERT simultaneously,
some adjustments are needed in the RMS project to support this type
of workflow. It is necessary to have one petrosim job per facies.
To simplify the work with the RMS project,
the script *generate_petro_jobs_for_field_update* can be imported into
RMS as a python job. It requires a small configuration file and will then
To simplify the work with the RMS project, the function
*generate_petro_jobs* from *fmu.tools*
can be used in a python job in RMS.
It requires a small configuration file and will then
read an existing petrosim job from the RMS project and generate one new
petrosim job per facies. The new jobs are ready to be used
(put into the RMS workflow) and they will use the same model parameters
for the petrophysical properties as the original (existing) job,
but only for one facies.

This script will modify your RMS project when run from your RMS project
The function *generate_petro_jobs* will modify
your RMS project when run from your RMS project
by adding new petrosim jobs, one per facies as specified in the
configuration file for the script. The configuration file is a yaml format
file defining which grid model and which facies 3D parameter to use and the
Expand All @@ -25,67 +27,66 @@ petrosim jobs that are generated.

Usage
^^^^^
Load the script *generate_petro_jobs_for_field_update* into a python job.
Specify a configuration file and specify the name of this configuration file in the
python job.
* Import the function *generate_petro_jobs* into a python job in RMS.
Specify a configuration file and specify the name of this configuration
file in the python job.

Run the python job in RMS to generate the new petrosim jobs and
finally update the workflowin RMS by using the generated jobs.
* Run the python job in RMS to generate the new petrosim jobs.

* Finally, update the workflowin RMS by using the generated jobs.

Example of python script in RMS

.. code-block:: python
from fmu.tools.rms.generate_petro_jobs_for_field_update import main
from fmu.tools.rms import generate_petro_jobs
CONFIG_FILE = "generate_petro_jobs.yml"
if __name__ == "__main__":
main(CONFIG_FILE)
generate_petro_jobs(CONFIG_FILE)
Example of configuration file for multi zone grid in RMS

.. code-block:: yaml
# Name of grid model for the petrophysics jobs
grid_name: "MultiZoneBox"
# Name of grid model for the petrophysics jobs
grid_name: MultiZoneBox
# Name of original petro job using facies realization as input
original_job_name: "original_multi_zone"
# Name of original petro job using facies realization as input
original_job_name: original_multi_zone
# Use empty string as zone name for single zone grids and zone name
# for multizone grids.
# For each zone, specify facies and for each facies specify
# petro variables to be used as field parameters in ERT update
# Use empty string as zone name for single zone grids and zone name
# for multizone grids.
# For each zone, specify facies and for each facies specify
# petro variables to be used as field parameters in ERT update
# Example for a multizone grid with three zones:
used_petro_var:
Zone1:
F1: ["P1", "P2"]
F2: ["P1", "P2"]
F3: ["P1", "P2"]
Zone2:
F1: ["P1", "P2"]
F2: ["P1", "P2"]
F3: ["P1", "P2"]
# Example for a multizone grid with three zones:
used_petro_var:
Zone1:
F1: [P1, P2]
F2: [P1, P2]
F3: [P1, P2]
Zone2:
F1: [P1, P2]
F2: [P1, P2]
F3: [P1, P2]
Example of configuration file for single zone grid in RMS

.. code-block:: yaml
# Name of grid model for the petrophysics jobs
grid_name: "SingleZoneBox"
# Name of original petro job using facies realization as input
original_job_name: "original_single_zone"
# Use empty string as zone name for single zone grids and zone name
# for multizone grids.
# For each zone, specify facies and for each facies specify
# petro variables to be used as field parameters in ERT update
used_petro_var:
"":
F1: ["P1", "P2"]
F2: ["P1", "P2"]
F3: ["P1", "P2"]
# Name of grid model for the petrophysics jobs
grid_name: SingleZoneBox
# Name of original petro job using facies realization as input
original_job_name: original_single_zone
# Use empty string as zone name for single zone grids and zone name
# for multizone grids.
# For each zone, specify facies and for each facies specify
# petro variables to be used as field parameters in ERT update
used_petro_var:
default:
F1: [P1, P2]
F2: [P1, P2]
F3: [P1, P2]
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ ensemble_well_props = "fmu.tools.ensembles.ensemble_well_props:main"
rename_rms_scripts = "fmu.tools.rms.rename_rms_scripts:main"
rmsvolumetrics2csv = "fmu.tools.rms.volumetrics:rmsvolumetrics2csv_main"


[tool.ruff]
line-length = 88

Expand Down
9 changes: 8 additions & 1 deletion src/fmu/tools/rms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
Processing of volumetrics from RMS
"""

from .generate_petro_jobs_for_field_update import (
main as generate_petro_jobs,
)
from .import_localmodules import import_localmodule
from .volumetrics import rmsvolumetrics_txt2df

__all__ = ["rmsvolumetrics_txt2df", "import_localmodule"]
__all__ = [
"rmsvolumetrics_txt2df",
"import_localmodule",
"generate_petro_jobs",
]
Loading

0 comments on commit 875fed1

Please sign in to comment.