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 14 forks source link

Add `export_field_outline()` one liner export #765

Open mferrera opened 2 weeks ago

mferrera commented 2 weeks 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_outlines(
    project: Any,  # PRJ
    top_surface_name: str, # or RMS name, and create it behind the scenes. Horizon?
    top_surface_category: str, # folder name containing top surface. Horizon?
    contacts: list[str],  # TODO: Current topic of discussion
    global_config: str | Path = "path/to/global/config",
    vertical_domain: dict[str, str] = {"depth": "msl"},
    workflow: str = "rms/structural model",
    tagname: str = f"field_outline_(contact_name)",
)

Unanswered questions

Summary discussion 9/9/2024

tnatt commented 2 weeks 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 2 weeks 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 2 weeks 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 4 days ago

Summary discussion 9/9/2024

(This text added to main issue)

mferrera commented 3 days ago

Summary discussion 10/9/2024

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