Skip to content
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

Add export_field_outlines() one liner export #765

Open
mferrera opened this issue Aug 27, 2024 · 6 comments
Open

Add export_field_outlines() one liner export #765

mferrera opened this issue Aug 27, 2024 · 6 comments

Comments

@mferrera
Copy link
Collaborator

mferrera commented Aug 27, 2024

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

  • How should we handle polygon vertices limits?

Summary discussion 9/9/2024

  • We would prefer to keep the export "pure" -- no side effects, no modifying the RMS project (creating something)
  • Polygons should be generated pre-export
  • Contact should be provided as a string (?)
  • We should consider the best way to standardize what is expected and what is generated
    • Ex: A folder must be provided?
    • Ex: HCPV maps required?
@tnatt
Copy link
Collaborator

tnatt commented Aug 28, 2024

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

  • using the intersection between top reservoir surface and contact surface
  • using a saturation parameter in the grid to filter and create the outline
  • using HCPV maps and create outline where HCPV is larger than 0
  • manually
  • etc

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
Copy link
Collaborator Author

mferrera commented Aug 29, 2024

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

Country outlines are a function of:

  • country looking at the map,
  • history,
  • politics,
  • ...,
  • geography

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

Field outlines are a function of:

  • the asset?,
  • contacts?,
  • ...?,
  • geology?

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
Copy link
Contributor

@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
Copy link
Collaborator Author

mferrera commented Sep 9, 2024

Summary discussion 9/9/2024

  • We would prefer to keep the export "pure" -- no side effects, no modifying the RMS project (creating something)
  • Polygons should be generated pre-export
  • Contact should be provided as a string (?)
  • We should consider the best way to standardize what is expected and what is generated
    • Ex: A folder must be provided?
    • Ex: HCPV maps required?

(This text added to main issue)

@mferrera
Copy link
Collaborator Author

mferrera commented Sep 10, 2024

Summary discussion 10/9/2024

  • We will seek to provide a standardized field outline function from another package, i.e. fmu-tools
    • This function will seek to store the field outline polygon in RMS' General 2D Data folder
    • It will store to some defaulted name
  • The export function will take an "RMS path" to the outline polygon to export
    • By default to the General 2D Data folder
    • export_field_outline(project, ..., rms_path=[..., 'General 2D Data', 'field_outline'])

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

@mferrera mferrera changed the title Add export_field_outlines() one liner export Add export_field_outline() one liner export Sep 10, 2024
@mferrera mferrera changed the title Add export_field_outline() one liner export Add export_field_outlines() one liner export Sep 23, 2024
@mferrera
Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants