forked from equinor/fmu-dataio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: Enumerate inplace volumes table columns
Showing
3 changed files
with
87 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
from __future__ import annotations | ||
|
||
from enum import Enum | ||
from typing import Final | ||
|
||
|
||
class InplaceVolumes: | ||
"""Enumerations relevant to inplace volumes tables.""" | ||
|
||
class Fluid(str, Enum): | ||
"""Fluid types""" | ||
|
||
OIL = "OIL" | ||
GAS = "GAS" | ||
WATER = "WATER" | ||
|
||
class TableIndexColumns(str, Enum): | ||
"""The index columns for an inplace volumes table.""" | ||
|
||
FLUID = "FLUID" | ||
ZONE = "ZONE" | ||
REGION = "REGION" | ||
FACIES = "FACIES" | ||
LICENSE = "LICENSE" | ||
|
||
FLUID_COLUMN: Final = TableIndexColumns.FLUID | ||
"""The column name and value used to indicate the index value for fluid type.""" | ||
|
||
class VolumetricColumns(str, Enum): | ||
"""The value columns for an inplace volumes table.""" | ||
|
||
BULK = "BULK" | ||
NET = "NET" | ||
PORV = "PORV" | ||
HCPV = "HCPV" | ||
STOIIP = "STOIIP" | ||
GIIP = "GIIP" | ||
ASSOCIATEDGAS = "ASSOCIATEDGAS" | ||
ASSOCIATEDOIL = "ASSOCIATEDOIL" | ||
|
||
@staticmethod | ||
def index_columns() -> list[str]: | ||
"""Returns a list of the index columns.""" | ||
return [k.value for k in InplaceVolumes.TableIndexColumns] | ||
|
||
@staticmethod | ||
def value_columns() -> list[str]: | ||
"""Returns a list of the value columns.""" | ||
return [k.value for k in InplaceVolumes.VolumetricColumns] | ||
|
||
@staticmethod | ||
def table_columns() -> list[str]: | ||
"""Returns a list of all table columns.""" | ||
return InplaceVolumes.index_columns() + InplaceVolumes.value_columns() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters