Skip to content

Commit

Permalink
#369: Move all categories into one
Browse files Browse the repository at this point in the history
  • Loading branch information
priscavdsluis committed Mar 17, 2023
1 parent 02b5bcc commit c9ef619
Showing 1 changed file with 112 additions and 117 deletions.
229 changes: 112 additions & 117 deletions hydrolib/core/dflowfm/extold/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,124 +6,119 @@
from hydrolib.core.basemodel import BaseModel, DiskOnlyFileModel


class Quantity:
"""Class contains the different external forcing category classes."""

class QuantityBase(str, Enum):
pass

class Bnd(QuantityBase):
"""Enum class containing the valid values for the boundary conditions category
of the external forcings.
"""

WaterLevel = "waterlevelbnd"
"""Water level"""
Neumann = "neumannbnd"
"""Water level gradient"""
Riemann = "riemannbnd"
"""Riemann invariant"""
Outflow = "outflowbnd"
"""Outflow"""
Velocity = "velocitybnd"
"""Velocity"""
Discharge = "dischargebnd"
"""Discharge"""
RiemannVelocity = "riemann_velocitybnd"
"""Riemann invariant velocity"""
Salinity = "salinitybnd"
"""Salinity"""
Temperature = "temperaturebnd"
"""Temperature"""
Sediment = "sedimentbnd"
"""Suspended sediment"""
UXUYAdvectionVelocity = "uxuyadvectionvelocitybnd"
"""ux-uy advection velocity"""
NormalVelocity = "normalvelocitybnd"
"""Normal velocity"""
TangentialVelocity = "tangentialvelocitybnd"
"""Tangentional velocity"""
Qh = "qhbnd"
"""Discharge-water level dependency"""
Tracer = "tracerbnd"
"""User-defined tracer"""

class Meteo(QuantityBase):
WindX = "windx"
"""Wind x component"""
WindY = "windy"
"""Wind y component"""
WindXY = "windxy"
"""Wind vector"""
AirPressureWindXWindY = "airpressure_windx_windy"
"""Atmospheric pressure and wind components"""
AtmosphericPressure = "atmosphericpressure"
"""Atmospheric pressure"""
Rainfall = "rainfall"
"""Precipitation"""
RainfallRate = "rainfall_rate"
"""Precipitation"""
HumidityAirTemperatureCloudiness = "humidity_airtemperature_cloudiness"
"""Combined heat flux terms"""
HumidityAirTemperatureCloudinessSolarRadiation = (
"humidity_airtemperature_cloudiness_solarradiation"
)
"""Combined heat flux terms"""
LongWaveRadiation = "longwaveradiation"
"""Long wave radiation"""
SolarRadiation = "solarradiation"
"""Solar radiation"""
DischargeSalinityTemperatureSorSin = "discharge_salinity_temperature_sorsin"
"""Discharge, salinity and heat sources"""

class Struc(QuantityBase):
Pump = "pump"
"""Pump capacity"""
DamLevel = "damlevel"
"""Dam level"""
GateLowerEdgeLevel = "gateloweredgelevel"
"""Gate lower edge level"""
GeneralStructure = "generalstructure"
"""General structure"""

class IniField(QuantityBase):
InitialWaterLevel = "initialwaterlevel"
"""Initial water level"""
InitialSalinity = "initialsalinity"
"""Initial salinity"""
InitialSalinityTop = "initialsalinitytop"
"""Initial salinity top"""
InitialTemperature = "initialtemperature"
"""Initial temperature"""
InitialVerticalTemperatureProfile = "initialverticaltemperatureprofile"
"""Initial vertical temperature profile"""
InitialVerticalSalinityProfile = "initialverticalsalinityprofile"
"""Initial vertical salinity profile"""
InitialTracer = "initialtracer"
"""Initial tracer"""

class SpatVar(QuantityBase):
FrictionCoefficient = "frictioncoefficient"
"""Firction coefficient"""
HorizontalEddyViscosityCoefficient = "horizontaleddyviscositycoefficient"
"""Horizontal eddy viscosity coefficient"""
HorizontalEddyDiffusivityCoefficient = "horizontaleddydiffusivitycoefficient"
"""Horizontal eddy diffusivity coefficient"""
AdvectionType = "advectiontype"
"""Advection type"""
IBotLevType = "ibotlevtype"
"""ibotlevtype"""

class Misc(QuantityBase):
shiptxy = "shiptxy"
"""shiptxy"""
movingstationxy = "movingstationxy"
"""Moving observation point for output (time, x, y)"""
wavesignificantheight = "wavesignificantheight"
"""Wave significant heigth"""
waveperiod = "waveperiod"
"""Wave period"""

class Quantity(str, Enum):
"""Enum class containing the valid values for the boundary conditions category
of the external forcings.
"""

# Boundary conditions
WaterLevelBnd = "waterlevelbnd"
"""Water level"""
NeumannBnd = "neumannbnd"
"""Water level gradient"""
RiemannBnd = "riemannbnd"
"""Riemann invariant"""
OutflowBnd = "outflowbnd"
"""Outflow"""
VelocityBnd = "velocitybnd"
"""Velocity"""
DischargeBnd = "dischargebnd"
"""Discharge"""
RiemannVelocityBnd = "riemann_velocitybnd"
"""Riemann invariant velocity"""
SalinityBnd = "salinitybnd"
"""Salinity"""
TemperatureBnd = "temperaturebnd"
"""Temperature"""
SedimentBnd = "sedimentbnd"
"""Suspended sediment"""
UXUYAdvectionVelocityBnd = "uxuyadvectionvelocitybnd"
"""ux-uy advection velocity"""
NormalVelocityBnd = "normalvelocitybnd"
"""Normal velocity"""
TangentialVelocityBnd = "tangentialvelocitybnd"
"""Tangentional velocity"""
QhBnd = "qhbnd"
"""Discharge-water level dependency"""
TracerBnd = "tracerbnd"
"""User-defined tracer"""

# Meteorological fields
WindX = "windx"
"""Wind x component"""
WindY = "windy"
"""Wind y component"""
WindXY = "windxy"
"""Wind vector"""
AirPressureWindXWindY = "airpressure_windx_windy"
"""Atmospheric pressure and wind components"""
AtmosphericPressure = "atmosphericpressure"
"""Atmospheric pressure"""
Rainfall = "rainfall"
"""Precipitation"""
RainfallRate = "rainfall_rate"
"""Precipitation"""
HumidityAirTemperatureCloudiness = "humidity_airtemperature_cloudiness"
"""Combined heat flux terms"""
HumidityAirTemperatureCloudinessSolarRadiation = (
"humidity_airtemperature_cloudiness_solarradiation"
)
"""Combined heat flux terms"""
LongWaveRadiation = "longwaveradiation"
"""Long wave radiation"""
SolarRadiation = "solarradiation"
"""Solar radiation"""
DischargeSalinityTemperatureSorSin = "discharge_salinity_temperature_sorsin"
"""Discharge, salinity and heat sources"""

# Structure parameters
Pump = "pump"
"""Pump capacity"""
DamLevel = "damlevel"
"""Dam level"""
GateLowerEdgeLevel = "gateloweredgelevel"
"""Gate lower edge level"""
GeneralStructure = "generalstructure"
"""General structure"""

# Initial fields
InitialWaterLevel = "initialwaterlevel"
"""Initial water level"""
InitialSalinity = "initialsalinity"
"""Initial salinity"""
InitialSalinityTop = "initialsalinitytop"
"""Initial salinity top"""
InitialTemperature = "initialtemperature"
"""Initial temperature"""
InitialVerticalTemperatureProfile = "initialverticaltemperatureprofile"
"""Initial vertical temperature profile"""
InitialVerticalSalinityProfile = "initialverticalsalinityprofile"
"""Initial vertical salinity profile"""
InitialTracer = "initialtracer"
"""Initial tracer"""

# Spatial physical properties
FrictionCoefficient = "frictioncoefficient"
"""Firction coefficient"""
HorizontalEddyViscosityCoefficient = "horizontaleddyviscositycoefficient"
"""Horizontal eddy viscosity coefficient"""
HorizontalEddyDiffusivityCoefficient = "horizontaleddydiffusivitycoefficient"
"""Horizontal eddy diffusivity coefficient"""
AdvectionType = "advectiontype"
"""Advection type"""
IBotLevType = "ibotlevtype"
"""ibotlevtype"""

# Miscellaneous
ShiptXY= "shiptxy"
"""shiptxy"""
MovingStationXY = "movingstationxy"
"""Moving observation point for output (time, x, y)"""
WaveSignificantHeight = "wavesignificantheight"
"""Wave significant heigth"""
WavePeriod = "waveperiod"
"""Wave period"""

class FileType(IntEnum):
"""Enum class containing the valid values for the `filetype` attribute
Expand Down

0 comments on commit c9ef619

Please sign in to comment.