You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently grids and their properties are exported from RMS in the following way:
Define a list of properties to export
Export the grid
For every grid property in the defined list
i. Export the grid property with parent/geometry = the grid
Simplification
We can define a function that encapsulates this functionality and accepts strings indicating the properties to export with the grid.
defexport_static_grid_model(
project: Any,
grid_name: str,
porosity: str|None,
permeabilities: list[str] |None,
zone: str|None,
facies: list[str] |None,
regions: list[str] |None,
water_saturation: str|None,
gas_saturation: str|None,
oil_saturation: str|None,
co2_saturation: str|None,
net_to_gross: str|None,
# grid_model_type: GridModelType (static, dynamic, ...) ?config_path: str|Path="../../fmuconfig/output/global_variables.yml",
classification: str|None=None,
) ->ExportResult:
# @field_validator("porosity", mode="before")# @classmethod# def _validate_between_zero_and_one(cls, value: Optional[str]) -> Optional[str]:# """Validate the property value is in [0, 1]"""# if value is None:# return None# prop = xtgeo.gridproperty_from_roxar(PRJ, GNAME, value) # How to do this?# if not (0 <= prop.value <= 1):# raise ValueError("Porosity must be between 0 and 1, inclusive.")# return value# Validate saturation sums to 1
This will allow us to:
Ensure properties are linked to a grid/geometry
Allow for consumers to more easily filter properties based upon metadata (i.e., knowing ahead of time which property is the porosity/a permeability/etc of a grid so it doesn't need to be selected by the user)
Allow validation of these properties when applicable to enhance data quality (i.e. porosity is always 0-1, permeability always > 0, etc)
Unanswered questions
Should we allow exporting a grid without properties?
A: Sure
How do we allow saturations to be given?
A: Give each supported saturation as a separate option
Do we allow arbitrary properties not described in the ExportGridModelProperties class?
A: Not yet, maybe not ever. Prefer to received feedback and support it officially
Is ExportGridModelProperties the best way to take properties?
Decided not to use
Do we need the grid geometry to do the validations we want?
It will be given using only function call
How do we evaluate which properties can be accepted/exported?
Based upon feedback, case-by-case
Should all properties be optional? Should some be mandatory?
No to mandatory
How do we attach which type of grid model this is?
How do we define the types of grid models? Can they be standardized?
Usage mitigations
The text was updated successfully, but these errors were encountered:
Currently grids and their properties are exported from RMS in the following way:
i. Export the grid property with
parent
/geometry
= the gridSimplification
We can define a function that encapsulates this functionality and accepts strings indicating the properties to export with the grid.
This will allow us to:
Unanswered questions
ExportGridModelProperties
class?ExportGridModelProperties
the best way to take properties?Usage mitigations
The text was updated successfully, but these errors were encountered: