equinor / fmu-dataio

FMU data standard and data export with rich metadata in the FMU context
https://fmu-dataio.readthedocs.io/en/latest/
Apache License 2.0
10 stars 15 forks source link

Add `export_field_outlines()` one liner export #765

Open mferrera opened 3 months ago

mferrera commented 3 months ago

Currently field outlines are exported from RMS projects in the following way:

  1. Define horizon and contacts, folder locations, polygon vertices limits
  2. Convert horizon to xtgeo.Surface
  3. For each contact 3.1. Convert contact to xtgeo.Surface 3.2 Process, mask, store to RMS project (QC step, optional) 3.3 Get boundary polygons, xtgeo.Polygons 3.4 Filter polygons with vertices < vertices limit 3.5 Export xtgeo.Polygons

Simplification

We could explore grouping everything from step 2 into a single function and hide some details. A discussion of the arity of this function is still ongoing

export_field_outline(
    project: Any,
    rms_path: list[str]  # TODO: list or string? [..., 'General 2D Data', 'field_outline']),
    contact_name: str,

    config_path: str | Path = "../../fmuconfig/output/global_variables.yml", 
    classification: str | None = None, # Actual default from config
)

Unanswered questions

Summary discussion 9/9/2024

tnatt commented 3 months ago

Also we should discuss if we actually want to keep all of this functionality of creating the field_outlines inside this function, or if it should be more a pure export of pre-created field outlines.

The name of the function would indicate to users that this is a pure export, and it will be confusing atm. In addition these field outlines are often made in various ways

Also not everyone have contact surfaces easily available, they are often created from averaging FWL/GOC parameters in the grid.. but several models do not have these contact parameters but rather read contacts directly from global_variables into various scripts to update contacts in volumetrics/sw job etc.

mferrera commented 3 months ago

Do we and assets have a shared definition of a field outline?

Country outlines are a function of:

The first argument may generate many permutations of the the same planet.

Field outlines are a function of:

My understanding as a layman (i.e., ignorant) is that in Drogon at least, this is defined primarily by the second point. That said, Drogon is the first input to this function.

ErichSuter commented 3 months ago

@tnatt, as field outlines are made in various ways, is it recorded (e.g. as metadata) how they were made? And possibly why? I assume it would be nice to have this info directly in the geomodel, to make it easier to record for posterity and share between different users.

mferrera commented 2 months ago

Summary discussion 9/9/2024

(This text added to main issue)

mferrera commented 2 months ago

Summary discussion 10/9/2024

@jcrivenaes @tnatt is this an accurate summary before adding to the main issue comment?

mferrera commented 2 months ago

Sept 25 2024 - Updated function signature from discussions this week and removed unanswered questions that we have answered