Skip to content

Commit

Permalink
Add missing concentration tables in QGIS. (#1839)
Browse files Browse the repository at this point in the history
As encountered while trying to debug mass balance in Delwaq
  • Loading branch information
evetion authored Sep 23, 2024
1 parent a25c96f commit 4d51380
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions ribasim_qgis/core/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,64 @@ def attributes(cls) -> list[QgsField]:
]


class BasinConcentrationExternal(Input):
@classmethod
def input_type(cls) -> str:
return "Basin / concentration_external"

@classmethod
def geometry_type(cls) -> str:
return "No Geometry"

@classmethod
def attributes(cls) -> list[QgsField]:
return [
QgsField("time", QVariant.DateTime),
QgsField("node_id", QVariant.Int),
QgsField("substance", QVariant.String),
QgsField("concentration", QVariant.Double),
]


class BasinConcentrationState(Input):
@classmethod
def input_type(cls) -> str:
return "Basin / concentration_state"

@classmethod
def geometry_type(cls) -> str:
return "No Geometry"

@classmethod
def attributes(cls) -> list[QgsField]:
return [
QgsField("time", QVariant.DateTime),
QgsField("node_id", QVariant.Int),
QgsField("substance", QVariant.String),
QgsField("concentration", QVariant.Double),
]


class BasinConcentration(Input):
@classmethod
def input_type(cls) -> str:
return "Basin / concentration"

@classmethod
def geometry_type(cls) -> str:
return "No Geometry"

@classmethod
def attributes(cls) -> list[QgsField]:
return [
QgsField("time", QVariant.DateTime),
QgsField("node_id", QVariant.Int),
QgsField("substance", QVariant.String),
QgsField("drainage", QVariant.Double),
QgsField("precipitation", QVariant.Double),
]


class BasinSubgridLevel(Input):
@classmethod
def input_type(cls) -> str:
Expand Down

0 comments on commit 4d51380

Please sign in to comment.