Skip to content

External forcings file

The external forcing .ext file contains the forcing data for a D-Flow FM model. This includes open boundaries, lateral discharges and meteorological forcings. The documentation below only concerns the 'old' format (ExtForceFile in the MDU file).

Model

ExtOldBoundaryQuantity

Bases: StrEnum

Source code in hydrolib/core/dflowfm/extold/models.py
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
class ExtOldBoundaryQuantity(StrEnum):
    # 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"
    """Tangential velocity"""
    QhBnd = "qhbnd"
    """Discharge-water level dependency"""

    @classmethod
    def _missing_(cls, value):
        """Custom implementation for handling missing values.

        the method parses any missing values and only allows the ones that start with "initialtracer".
        """
        # Allow strings starting with "tracer"
        if isinstance(value, str) and value.startswith(
            BOUNDARY_CONDITION_QUANTITIES_VALID_PREFIXES
        ):
            new_member = str.__new__(cls, value)
            new_member._value_ = value
            return new_member
        else:
            raise ValueError(
                f"{value} is not a valid {cls.__name__} possible quantities are {', '.join(cls.__members__)}, "
                f"and quantities that start with 'tracer'"
            )

DischargeBnd = 'dischargebnd' class-attribute instance-attribute

Discharge

NeumannBnd = 'neumannbnd' class-attribute instance-attribute

Water level gradient

NormalVelocityBnd = 'normalvelocitybnd' class-attribute instance-attribute

Normal velocity

OutflowBnd = 'outflowbnd' class-attribute instance-attribute

Outflow

QhBnd = 'qhbnd' class-attribute instance-attribute

Discharge-water level dependency

RiemannBnd = 'riemannbnd' class-attribute instance-attribute

Riemann invariant

RiemannVelocityBnd = 'riemann_velocitybnd' class-attribute instance-attribute

Riemann invariant velocity

SalinityBnd = 'salinitybnd' class-attribute instance-attribute

Salinity

SedimentBnd = 'sedimentbnd' class-attribute instance-attribute

Suspended sediment

TangentialVelocityBnd = 'tangentialvelocitybnd' class-attribute instance-attribute

Tangential velocity

TemperatureBnd = 'temperaturebnd' class-attribute instance-attribute

Temperature

UXUYAdvectionVelocityBnd = 'uxuyadvectionvelocitybnd' class-attribute instance-attribute

ux-uy advection velocity

VelocityBnd = 'velocitybnd' class-attribute instance-attribute

Velocity

WaterLevelBnd = 'waterlevelbnd' class-attribute instance-attribute

Water level

ExtOldExtrapolationMethod

Bases: IntEnum

Enum class containing the valid values for the extrapolation_method attribute in the ExtOldForcing class.

Source code in hydrolib/core/dflowfm/extold/models.py
570
571
572
573
574
575
576
577
578
class ExtOldExtrapolationMethod(IntEnum):
    """Enum class containing the valid values for the `extrapolation_method` attribute
    in the [ExtOldForcing][hydrolib.core.dflowfm.extold.models.ExtOldForcing] class.
    """

    NoSpatialExtrapolation = 0
    """0. No spatial extrapolation."""
    SpatialExtrapolationOutsideOfSourceDataBoundingBox = 1
    """1. Do spatial extrapolation outside of source data bounding box."""

NoSpatialExtrapolation = 0 class-attribute instance-attribute

  1. No spatial extrapolation.

SpatialExtrapolationOutsideOfSourceDataBoundingBox = 1 class-attribute instance-attribute

  1. Do spatial extrapolation outside of source data bounding box.

ExtOldFileType

Bases: IntEnum

Enum class containing the valid values for the filetype attribute in the ExtOldForcing class.

Source code in hydrolib/core/dflowfm/extold/models.py
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
class ExtOldFileType(IntEnum):
    """Enum class containing the valid values for the `filetype` attribute
    in the [ExtOldForcing][hydrolib.core.dflowfm.extold.models.ExtOldForcing] class.
    """

    TimeSeries = 1
    """1. Time series"""
    TimeSeriesMagnitudeAndDirection = 2
    """2. Time series magnitude and direction"""
    SpatiallyVaryingWindPressure = 3
    """3. Spatially varying wind and pressure"""
    ArcInfo = 4
    """4. ArcInfo"""
    SpiderWebData = 5
    """5. Spiderweb data (cyclones)"""
    CurvilinearData = 6
    """6. Space-time data on curvilinear grid"""
    Samples = 7
    """7. Samples"""
    TriangulationMagnitudeAndDirection = 8
    """8. Triangulation magnitude and direction"""
    Polyline = 9
    """9. Polyline (<*.pli>-file) with boundary signals on support points"""
    InsidePolygon = 10
    """10. Polyfile (<*.pol>-file). Uniform value inside polygon for INITIAL fields"""
    NetCDFGridData = 11
    """11. NetCDF grid data (e.g. meteo fields)"""
    NetCDFWaveData = 14
    """14. NetCDF wave data"""

ArcInfo = 4 class-attribute instance-attribute

  1. ArcInfo

CurvilinearData = 6 class-attribute instance-attribute

  1. Space-time data on curvilinear grid

InsidePolygon = 10 class-attribute instance-attribute

  1. Polyfile (<*.pol>-file). Uniform value inside polygon for INITIAL fields

NetCDFGridData = 11 class-attribute instance-attribute

  1. NetCDF grid data (e.g. meteo fields)

NetCDFWaveData = 14 class-attribute instance-attribute

  1. NetCDF wave data

Polyline = 9 class-attribute instance-attribute

  1. Polyline (<*.pli>-file) with boundary signals on support points

Samples = 7 class-attribute instance-attribute

  1. Samples

SpatiallyVaryingWindPressure = 3 class-attribute instance-attribute

  1. Spatially varying wind and pressure

SpiderWebData = 5 class-attribute instance-attribute

  1. Spiderweb data (cyclones)

TimeSeries = 1 class-attribute instance-attribute

  1. Time series

TimeSeriesMagnitudeAndDirection = 2 class-attribute instance-attribute

  1. Time series magnitude and direction

TriangulationMagnitudeAndDirection = 8 class-attribute instance-attribute

  1. Triangulation magnitude and direction

ExtOldForcing

Bases: BaseModel

Class holding the external forcing values.

Source code in hydrolib/core/dflowfm/extold/models.py
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
class ExtOldForcing(BaseModel):
    """Class holding the external forcing values."""

    quantity: Union[ExtOldQuantity, str] = Field(alias="QUANTITY")
    """Union[Quantity, str]: The name of the quantity."""

    filename: Union[PolyFile, TimModel, DiskOnlyFileModel] = Field(
        None, alias="FILENAME"
    )
    """Union[PolyFile, TimModel, DiskOnlyFileModel]: The file associated to this forcing."""

    varname: Optional[str] = Field(None, alias="VARNAME")
    """Optional[str]: The variable name used in `filename` associated with this forcing; some input files may contain multiple variables."""

    sourcemask: DiskOnlyFileModel = Field(
        default_factory=lambda: DiskOnlyFileModel(None), alias="SOURCEMASK"
    )
    """DiskOnlyFileModel: The file containing a mask."""

    filetype: ExtOldFileType = Field(alias="FILETYPE")
    """FileType: Indication of the file type.

    Options:
    1. Time series
    2. Time series magnitude and direction
    3. Spatially varying weather
    4. ArcInfo
    5. Spiderweb data (cyclones)
    6. Curvilinear data
    7. Samples (C.3)
    8. Triangulation magnitude and direction
    9. Polyline (<*.pli>-file, C.2)
    11. NetCDF grid data (e.g. meteo fields)
    14. NetCDF wave data
    """

    method: ExtOldMethod = Field(alias="METHOD")
    """ExtOldMethod: The method of interpolation.

    Options:
    1. Pass through (no interpolation)
    2. Interpolate time and space
    3. Interpolate time and space, save weights
    4. Interpolate space
    5. Interpolate time
    6. Averaging space
    7. Interpolate/Extrapolate time
    """

    extrapolation_method: Optional[ExtOldExtrapolationMethod] = Field(
        None, alias="EXTRAPOLATION_METHOD"
    )
    """Optional[ExtOldExtrapolationMethod]: The extrapolation method.

    Options:
    0. No spatial extrapolation.
    1. Do spatial extrapolation outside of source data bounding box.
    """

    maxsearchradius: Optional[float] = Field(None, alias="MAXSEARCHRADIUS")
    """Optional[float]: Search radius (in m) for model grid points that lie outside of the source data bounding box."""

    operand: Operand = Field(alias="OPERAND")
    """Operand: The operand to use for adding the provided values.

    Options:
    'O' Existing values are overwritten with the provided values.
    'A' Provided values are used where existing values are missing.
    '+' Existing values are summed with the provided values.
    '*' Existing values are multiplied with the provided values.
    'X' The maximum values of the existing values and provided values are used.
    'N' The minimum values of the existing values and provided values are used.
    """

    value: Optional[float] = Field(None, alias="VALUE")
    """Optional[float]: Custom coefficients for transformation."""

    factor: Optional[float] = Field(None, alias="FACTOR")
    """Optional[float]: The conversion factor."""

    ifrctyp: Optional[float] = Field(None, alias="IFRCTYP")
    """Optional[float]: The friction type."""

    averagingtype: Optional[float] = Field(None, alias="AVERAGINGTYPE")
    """Optional[float]: The averaging type."""

    relativesearchcellsize: Optional[float] = Field(
        None, alias="RELATIVESEARCHCELLSIZE"
    )
    """Optional[float]: The relative search cell size for samples inside a cell."""

    extrapoltol: Optional[float] = Field(None, alias="EXTRAPOLTOL")
    """Optional[float]: The extrapolation tolerance."""

    percentileminmax: Optional[float] = Field(None, alias="PERCENTILEMINMAX")
    """Optional[float]: Changes the min/max operator to an average of the highest/lowest data points. The value sets the percentage of the total set that is to be included.."""

    area: Optional[float] = Field(None, alias="AREA")
    """Optional[float]: The area for sources and sinks."""

    nummin: Optional[int] = Field(None, alias="NUMMIN")
    """Optional[int]: The minimum required number of source data points in each target cell."""

    def is_intermediate_link(self) -> bool:
        return True

    @validator("quantity", pre=True)
    def validate_quantity(cls, value):
        if isinstance(value, ExtOldQuantity):
            return value

        def raise_error_tracer_name(quantity: ExtOldTracerQuantity):
            raise ValueError(
                f"QUANTITY '{quantity}' should be appended with a tracer name."
            )

        if isinstance(value, ExtOldTracerQuantity):
            raise_error_tracer_name(value)

        value_str = str(value)
        lower_value = value_str.lower()

        for tracer_quantity in ExtOldTracerQuantity:
            if lower_value.startswith(tracer_quantity):
                n = len(tracer_quantity)
                if n == len(value_str):
                    raise_error_tracer_name(tracer_quantity)
                return tracer_quantity + value_str[n:]

        if lower_value in list(ExtOldQuantity):
            return ExtOldQuantity(lower_value)

        supported_value_str = ", ".join(([x.value for x in ExtOldQuantity]))
        raise ValueError(
            f"QUANTITY '{value_str}' not supported. Supported values: {supported_value_str}"
        )

    @validator("operand", pre=True)
    def validate_operand(cls, value):
        if isinstance(value, Operand):
            return value

        if isinstance(value, str):

            for operand in Operand:
                if value.lower() == operand.value.lower():
                    return operand

            supported_value_str = ", ".join(([x.value for x in Operand]))
            raise ValueError(
                f"OPERAND '{value}' not supported. Supported values: {supported_value_str}"
            )

        return value

    @root_validator(skip_on_failure=True)
    def validate_forcing(cls, values):
        class _Field:
            def __init__(self, key: str) -> None:
                self.alias = cls.__fields__[key].alias
                self.value = values[key]

        def raise_error_only_allowed_when(
            field: _Field, dependency: _Field, valid_dependency_value: str
        ):
            error = f"{field.alias} only allowed when {dependency.alias} is {valid_dependency_value}"
            raise ValueError(error)

        def only_allowed_when(
            field: _Field, dependency: _Field, valid_dependency_value: Any
        ):
            """This function checks if a particular field is allowed to have a value only when a dependency field has a specific value."""

            if field.value is None or dependency.value == valid_dependency_value:
                return

            raise_error_only_allowed_when(field, dependency, valid_dependency_value)

        quantity = _Field("quantity")
        varname = _Field("varname")
        sourcemask = _Field("sourcemask")
        filetype = _Field("filetype")
        method = _Field("method")
        extrapolation_method = _Field("extrapolation_method")
        maxsearchradius = _Field("maxsearchradius")
        value = _Field("value")
        factor = _Field("factor")
        ifrctype = _Field("ifrctyp")
        averagingtype = _Field("averagingtype")
        relativesearchcellsize = _Field("relativesearchcellsize")
        extrapoltol = _Field("extrapoltol")
        percentileminmax = _Field("percentileminmax")
        area = _Field("area")
        nummin = _Field("nummin")

        only_allowed_when(varname, filetype, ExtOldFileType.NetCDFGridData)

        if sourcemask.value.filepath is not None and filetype.value not in [
            ExtOldFileType.ArcInfo,
            ExtOldFileType.CurvilinearData,
        ]:
            raise_error_only_allowed_when(
                sourcemask, filetype, valid_dependency_value="4 or 6"
            )

        if (
            extrapolation_method.value
            == ExtOldExtrapolationMethod.SpatialExtrapolationOutsideOfSourceDataBoundingBox
            and method.value != ExtOldMethod.InterpolateTimeAndSpaceSaveWeights
            and method.value != ExtOldMethod.Obsolete
        ):
            error = f"{extrapolation_method.alias} only allowed to be 1 when {method.alias} is 3"
            raise ValueError(error)

        only_allowed_when(
            maxsearchradius,
            extrapolation_method,
            ExtOldExtrapolationMethod.SpatialExtrapolationOutsideOfSourceDataBoundingBox,
        )
        only_allowed_when(value, method, ExtOldMethod.InterpolateSpace)

        if factor.value is not None and not quantity.value.startswith(
            ExtOldTracerQuantity.InitialTracer
        ):
            error = f"{factor.alias} only allowed when {quantity.alias} starts with {ExtOldTracerQuantity.InitialTracer}"
            raise ValueError(error)

        only_allowed_when(ifrctype, quantity, ExtOldQuantity.FrictionCoefficient)
        only_allowed_when(averagingtype, method, ExtOldMethod.AveragingSpace)
        only_allowed_when(relativesearchcellsize, method, ExtOldMethod.AveragingSpace)
        only_allowed_when(extrapoltol, method, ExtOldMethod.InterpolateTime)
        only_allowed_when(percentileminmax, method, ExtOldMethod.AveragingSpace)
        only_allowed_when(
            area, quantity, ExtOldQuantity.DischargeSalinityTemperatureSorSin
        )
        only_allowed_when(nummin, method, ExtOldMethod.AveragingSpace)

        return values

    @root_validator(pre=True)
    def choose_file_model(cls, values):
        """Root-level validator to the right class for the filename parameter based on the filetype.

        The validator chooses the right class for the filename parameter based on the FileType_FileModel_mapping
        dictionary.

        FileType_FileModel_mapping = {
            1: TimModel,
            2: TimModel,
            3: DiskOnlyFileModel,
            4: DiskOnlyFileModel,
            5: DiskOnlyFileModel,
            6: DiskOnlyFileModel,
            7: DiskOnlyFileModel,
            8: DiskOnlyFileModel,
            9: PolyFile,
            10: PolyFile,
            11: DiskOnlyFileModel,
            12: DiskOnlyFileModel,
        }
        """
        # if the filetype and the filename are present in the values
        if any(par in values for par in ["filetype", "FILETYPE"]) and any(
            par in values for par in ["filename", "FILENAME"]
        ):
            file_type_var_name = "filetype" if "filetype" in values else "FILETYPE"
            filename_var_name = "filename" if "filename" in values else "FILENAME"
            file_type = values.get(file_type_var_name)
            raw_path = values.get(filename_var_name)
            model = FILETYPE_FILEMODEL_MAPPING.get(int(file_type))

            values[filename_var_name] = model(raw_path)

        return values

area = Field(None, alias='AREA') class-attribute instance-attribute

Optional[float]: The area for sources and sinks.

averagingtype = Field(None, alias='AVERAGINGTYPE') class-attribute instance-attribute

Optional[float]: The averaging type.

extrapolation_method = Field(None, alias='EXTRAPOLATION_METHOD') class-attribute instance-attribute

Optional[ExtOldExtrapolationMethod]: The extrapolation method.

Options: 0. No spatial extrapolation. 1. Do spatial extrapolation outside of source data bounding box.

extrapoltol = Field(None, alias='EXTRAPOLTOL') class-attribute instance-attribute

Optional[float]: The extrapolation tolerance.

factor = Field(None, alias='FACTOR') class-attribute instance-attribute

Optional[float]: The conversion factor.

filename = Field(None, alias='FILENAME') class-attribute instance-attribute

Union[PolyFile, TimModel, DiskOnlyFileModel]: The file associated to this forcing.

filetype = Field(alias='FILETYPE') class-attribute instance-attribute

FileType: Indication of the file type.

Options: 1. Time series 2. Time series magnitude and direction 3. Spatially varying weather 4. ArcInfo 5. Spiderweb data (cyclones) 6. Curvilinear data 7. Samples (C.3) 8. Triangulation magnitude and direction 9. Polyline (<*.pli>-file, C.2) 11. NetCDF grid data (e.g. meteo fields) 14. NetCDF wave data

ifrctyp = Field(None, alias='IFRCTYP') class-attribute instance-attribute

Optional[float]: The friction type.

maxsearchradius = Field(None, alias='MAXSEARCHRADIUS') class-attribute instance-attribute

Optional[float]: Search radius (in m) for model grid points that lie outside of the source data bounding box.

method = Field(alias='METHOD') class-attribute instance-attribute

ExtOldMethod: The method of interpolation.

Options: 1. Pass through (no interpolation) 2. Interpolate time and space 3. Interpolate time and space, save weights 4. Interpolate space 5. Interpolate time 6. Averaging space 7. Interpolate/Extrapolate time

nummin = Field(None, alias='NUMMIN') class-attribute instance-attribute

Optional[int]: The minimum required number of source data points in each target cell.

operand = Field(alias='OPERAND') class-attribute instance-attribute

Operand: The operand to use for adding the provided values.

Options: 'O' Existing values are overwritten with the provided values. 'A' Provided values are used where existing values are missing. '+' Existing values are summed with the provided values. '*' Existing values are multiplied with the provided values. 'X' The maximum values of the existing values and provided values are used. 'N' The minimum values of the existing values and provided values are used.

percentileminmax = Field(None, alias='PERCENTILEMINMAX') class-attribute instance-attribute

Optional[float]: Changes the min/max operator to an average of the highest/lowest data points. The value sets the percentage of the total set that is to be included..

quantity = Field(alias='QUANTITY') class-attribute instance-attribute

Union[Quantity, str]: The name of the quantity.

relativesearchcellsize = Field(None, alias='RELATIVESEARCHCELLSIZE') class-attribute instance-attribute

Optional[float]: The relative search cell size for samples inside a cell.

sourcemask = Field(default_factory=lambda: DiskOnlyFileModel(None), alias='SOURCEMASK') class-attribute instance-attribute

DiskOnlyFileModel: The file containing a mask.

value = Field(None, alias='VALUE') class-attribute instance-attribute

Optional[float]: Custom coefficients for transformation.

varname = Field(None, alias='VARNAME') class-attribute instance-attribute

Optional[str]: The variable name used in filename associated with this forcing; some input files may contain multiple variables.

choose_file_model(values)

Root-level validator to the right class for the filename parameter based on the filetype.

The validator chooses the right class for the filename parameter based on the FileType_FileModel_mapping dictionary.

FileType_FileModel_mapping = { 1: TimModel, 2: TimModel, 3: DiskOnlyFileModel, 4: DiskOnlyFileModel, 5: DiskOnlyFileModel, 6: DiskOnlyFileModel, 7: DiskOnlyFileModel, 8: DiskOnlyFileModel, 9: PolyFile, 10: PolyFile, 11: DiskOnlyFileModel, 12: DiskOnlyFileModel, }

Source code in hydrolib/core/dflowfm/extold/models.py
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
@root_validator(pre=True)
def choose_file_model(cls, values):
    """Root-level validator to the right class for the filename parameter based on the filetype.

    The validator chooses the right class for the filename parameter based on the FileType_FileModel_mapping
    dictionary.

    FileType_FileModel_mapping = {
        1: TimModel,
        2: TimModel,
        3: DiskOnlyFileModel,
        4: DiskOnlyFileModel,
        5: DiskOnlyFileModel,
        6: DiskOnlyFileModel,
        7: DiskOnlyFileModel,
        8: DiskOnlyFileModel,
        9: PolyFile,
        10: PolyFile,
        11: DiskOnlyFileModel,
        12: DiskOnlyFileModel,
    }
    """
    # if the filetype and the filename are present in the values
    if any(par in values for par in ["filetype", "FILETYPE"]) and any(
        par in values for par in ["filename", "FILENAME"]
    ):
        file_type_var_name = "filetype" if "filetype" in values else "FILETYPE"
        filename_var_name = "filename" if "filename" in values else "FILENAME"
        file_type = values.get(file_type_var_name)
        raw_path = values.get(filename_var_name)
        model = FILETYPE_FILEMODEL_MAPPING.get(int(file_type))

        values[filename_var_name] = model(raw_path)

    return values

ExtOldInitialConditionQuantity

Bases: StrEnum

Initial Condition quantities

initialwaterlevel, initialsalinity, initialsalinitytop, initialtemperature, initialverticaltemperatureprofile, initialverticalsalinityprofile, initialvelocityx, initialvelocityy, initialvelocity

If there is a missing quantity that is mentioned in the "Accepted quantity names" section of the user manual Sec.C.5.3. and Sec.D.3. please open and issue in github.

Source code in hydrolib/core/dflowfm/extold/models.py
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
class ExtOldInitialConditionQuantity(StrEnum):
    """
    Initial Condition quantities:
        initialwaterlevel, initialsalinity, initialsalinitytop, initialtemperature,
        initialverticaltemperatureprofile, initialverticalsalinityprofile, initialvelocityx,
        initialvelocityy, initialvelocity

    If there is a missing quantity that is mentioned in the "Accepted quantity names" section of the user manual
    [Sec.C.5.3](https://content.oss.deltares.nl/delft3dfm1d2d/D-Flow_FM_User_Manual_1D2D.pdf#subsection.C.5.3).
    and [Sec.D.3](https://content.oss.deltares.nl/delft3dfm1d2d/D-Flow_FM_User_Manual_1D2D.pdf#subsection.D.3).
    please open and issue in github.
    """

    # Initial Condition fields
    BedLevel = "bedlevel"
    BedLevel1D = "bedlevel1D"
    BedLevel2D = "bedlevel2D"

    InitialWaterLevel = "initialwaterlevel"
    InitialWaterLevel1D = "initialwaterlevel1d"
    InitialWaterLevel2D = "initialwaterlevel2d"

    InitialSalinity = "initialsalinity"
    InitialSalinityTop = "initialsalinitytop"
    InitialSalinityBot = "initialsalinitybot"
    InitialVerticalSalinityProfile = "initialverticalsalinityprofile"

    InitialTemperature = "initialtemperature"
    InitialVerticalTemperatureProfile = "initialverticaltemperatureprofile"

    initialUnsaturatedZoneThickness = "initialunsaturatedzonethickness"
    InitialVelocityX = "initialvelocityx"
    InitialVelocityY = "initialvelocityy"
    InitialVelocity = "initialvelocity"
    InitialWaqBot = "initialwaqbot"

    @classmethod
    def _missing_(cls, value):
        """Custom implementation for handling missing values.

        the method parses any missing values and only allows the ones that start with "initialtracer".
        """
        # Allow strings starting with "tracer"
        if isinstance(value, str) and value.startswith(
            INITIAL_CONDITION_QUANTITIES_VALID_PREFIXES
        ):
            new_member = str.__new__(cls, value)
            new_member._value_ = value
            return new_member
        else:
            raise ValueError(
                f"{value} is not a valid {cls.__name__} possible quantities are {', '.join(cls.__members__)}, "
                f"and quantities that start with 'tracer'"
            )

ExtOldMeteoQuantity

Bases: StrEnum

Source code in hydrolib/core/dflowfm/extold/models.py
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
class ExtOldMeteoQuantity(StrEnum):

    # 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"""
    AirPressureWindXWindYCharnock = "airpressure_windx_windy_charnock"
    "Atmospheric pressure and wind components Charnock"
    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"""
    DewPointAirTemperatureCloudiness = "dewpoint_airtemperature_cloudiness"
    """Dew point air temperature cloudiness"""
    LongWaveRadiation = "longwaveradiation"
    """Long wave radiation"""
    SolarRadiation = "solarradiation"
    """Solar radiation"""
    NudgeSalinityTemperature = "nudge_salinity_temperature"
    """Nudging salinity and temperature"""
    AirPressure = "airpressure"
    """AirPressure"""
    StressX = "stressx"
    """eastward wind stress"""
    StressY = "stressy"
    """northward wind stress"""
    AirTemperature = "airtemperature"
    """AirTemperature"""
    Cloudiness = "cloudiness"
    """Cloudiness, or cloud cover (fraction)"""
    Humidity = "humidity"
    """Humidity"""
    StressXY = "stressxy"
    """eastward and northward wind stress"""
    AirpressureStressXStressY = "airpressure_stressx_stressy"
    """Airpressure, eastward and northward wind stress"""
    WindSpeed = "wind_speed"
    """WindSpeed"""
    WindSpeedFactor = "windspeedfactor"

    WindFromDirection = "wind_from_direction"
    """WindFromDirection"""
    DewpointAirTemperatureCloudinessSolarradiation = (
        "dewpoint_airtemperature_cloudiness_solarradiation"
    )
    """Dewpoint temperature, air temperature, cloudiness, solarradiation"""
    AirDensity = "airdensity"
    """Air density"""
    Charnock = "charnock"
    """Charnock coefficient"""
    Dewpoint = "dewpoint"
    """Dewpoint temperature"""

AirDensity = 'airdensity' class-attribute instance-attribute

Air density

AirPressure = 'airpressure' class-attribute instance-attribute

AirPressure

AirPressureWindXWindY = 'airpressure_windx_windy' class-attribute instance-attribute

Atmospheric pressure and wind components

AirPressureWindXWindYCharnock = 'airpressure_windx_windy_charnock' class-attribute instance-attribute

Atmospheric pressure and wind components Charnock

AirTemperature = 'airtemperature' class-attribute instance-attribute

AirTemperature

AirpressureStressXStressY = 'airpressure_stressx_stressy' class-attribute instance-attribute

Airpressure, eastward and northward wind stress

AtmosphericPressure = 'atmosphericpressure' class-attribute instance-attribute

Atmospheric pressure

Charnock = 'charnock' class-attribute instance-attribute

Charnock coefficient

Cloudiness = 'cloudiness' class-attribute instance-attribute

Cloudiness, or cloud cover (fraction)

DewPointAirTemperatureCloudiness = 'dewpoint_airtemperature_cloudiness' class-attribute instance-attribute

Dew point air temperature cloudiness

Dewpoint = 'dewpoint' class-attribute instance-attribute

Dewpoint temperature

DewpointAirTemperatureCloudinessSolarradiation = 'dewpoint_airtemperature_cloudiness_solarradiation' class-attribute instance-attribute

Dewpoint temperature, air temperature, cloudiness, solarradiation

Humidity = 'humidity' class-attribute instance-attribute

Humidity

HumidityAirTemperatureCloudiness = 'humidity_airtemperature_cloudiness' class-attribute instance-attribute

Combined heat flux terms

HumidityAirTemperatureCloudinessSolarRadiation = 'humidity_airtemperature_cloudiness_solarradiation' class-attribute instance-attribute

Combined heat flux terms

LongWaveRadiation = 'longwaveradiation' class-attribute instance-attribute

Long wave radiation

NudgeSalinityTemperature = 'nudge_salinity_temperature' class-attribute instance-attribute

Nudging salinity and temperature

Rainfall = 'rainfall' class-attribute instance-attribute

Precipitation

RainfallRate = 'rainfall_rate' class-attribute instance-attribute

Precipitation

SolarRadiation = 'solarradiation' class-attribute instance-attribute

Solar radiation

StressX = 'stressx' class-attribute instance-attribute

eastward wind stress

StressXY = 'stressxy' class-attribute instance-attribute

eastward and northward wind stress

StressY = 'stressy' class-attribute instance-attribute

northward wind stress

WindFromDirection = 'wind_from_direction' class-attribute instance-attribute

WindFromDirection

WindSpeed = 'wind_speed' class-attribute instance-attribute

WindSpeed

WindX = 'windx' class-attribute instance-attribute

Wind x component

WindXY = 'windxy' class-attribute instance-attribute

Wind vector

WindY = 'windy' class-attribute instance-attribute

Wind y component

ExtOldMethod

Bases: IntEnum

Enum class containing the valid values for the method attribute in the ExtOldForcing class.

Source code in hydrolib/core/dflowfm/extold/models.py
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
class ExtOldMethod(IntEnum):
    """Enum class containing the valid values for the `method` attribute
    in the [ExtOldForcing][hydrolib.core.dflowfm.extold.models.ExtOldForcing] class.
    """

    PassThrough = 1
    """1. Pass through (no interpolation)"""
    InterpolateTimeAndSpace = 2
    """2. Interpolate time and space"""
    InterpolateTimeAndSpaceSaveWeights = 3
    """3. Interpolate time and space, save weights"""
    InterpolateSpace = 4
    """4. Interpolate space"""
    InterpolateTime = 5
    """5. Interpolate time"""
    AveragingSpace = 6
    """6. Averaging in space"""
    InterpolateExtrapolateTime = 7
    """7. Interpolate/Extrapolate time"""
    Obsolete = 11
    """11. METHOD=11 is obsolete; use METHOD=3 and EXTRAPOLATION_METHOD=1"""

AveragingSpace = 6 class-attribute instance-attribute

  1. Averaging in space

InterpolateExtrapolateTime = 7 class-attribute instance-attribute

  1. Interpolate/Extrapolate time

InterpolateSpace = 4 class-attribute instance-attribute

  1. Interpolate space

InterpolateTime = 5 class-attribute instance-attribute

  1. Interpolate time

InterpolateTimeAndSpace = 2 class-attribute instance-attribute

  1. Interpolate time and space

InterpolateTimeAndSpaceSaveWeights = 3 class-attribute instance-attribute

  1. Interpolate time and space, save weights

Obsolete = 11 class-attribute instance-attribute

  1. METHOD=11 is obsolete; use METHOD=3 and EXTRAPOLATION_METHOD=1

PassThrough = 1 class-attribute instance-attribute

  1. Pass through (no interpolation)

ExtOldModel

Bases: ParsableFileModel

The overall external forcings model that contains the contents of one external forcings file (old format).

This model is typically referenced under a FMModel.external_forcing.extforcefile.

Source code in hydrolib/core/dflowfm/extold/models.py
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
class ExtOldModel(ParsableFileModel):
    """
    The overall external forcings model that contains the contents of one external forcings file (old format).

    This model is typically referenced under a [FMModel][hydrolib.core.dflowfm.mdu.models.FMModel]`.external_forcing.extforcefile`.
    """

    comment: List[str] = Field(default=HEADER.splitlines()[1:])
    """List[str]: The comments in the header of the external forcing file."""
    forcing: List[ExtOldForcing] = Field(default_factory=list)
    """List[ExtOldForcing]: The external forcing/QUANTITY blocks in the external forcing file."""

    @classmethod
    def _ext(cls) -> str:
        return ".ext"

    @classmethod
    def _filename(cls) -> str:
        return "externalforcings"

    def dict(self, *args, **kwargs):
        return dict(comment=self.comment, forcing=[dict(f) for f in self.forcing])

    @classmethod
    def _get_serializer(
        cls,
    ) -> Callable[[Path, Dict, SerializerConfig, ModelSaveSettings], None]:
        return Serializer.serialize

    @classmethod
    def _get_parser(cls) -> Callable[[Path], Dict]:
        return Parser.parse

    @property
    def quantities(self) -> List[str]:
        """List all the quantities in the external forcings file."""
        return [forcing.quantity for forcing in self.forcing]

comment = Field(default=HEADER.splitlines()[1:]) class-attribute instance-attribute

List[str]: The comments in the header of the external forcing file.

forcing = Field(default_factory=list) class-attribute instance-attribute

List[ExtOldForcing]: The external forcing/QUANTITY blocks in the external forcing file.

quantities property

List all the quantities in the external forcings file.

ExtOldParametersQuantity

Bases: StrEnum

Enum class containing the valid values for the Spatial parameter category of the external forcings.

for more details check D-Flow FM User Manual 1D2D, Chapter D.3.1, Table D.2 https://content.oss.deltares.nl/delft3d/D-Flow_FM_User_Manual_1D2D.pdf

Source code in hydrolib/core/dflowfm/extold/models.py
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
class ExtOldParametersQuantity(StrEnum):
    """Enum class containing the valid values for the Spatial parameter category
    of the external forcings.

    for more details check D-Flow FM User Manual 1D2D, Chapter D.3.1, Table D.2
    https://content.oss.deltares.nl/delft3d/D-Flow_FM_User_Manual_1D2D.pdf
    """

    FrictionCoefficient = "frictioncoefficient"
    HorizontalEddyViscosityCoefficient = "horizontaleddyviscositycoefficient"
    HorizontalEddyDiffusivityCoefficient = "horizontaleddydiffusivitycoefficient"
    AdvectionType = "advectiontype"
    InfiltrationCapacity = "infiltrationcapacity"
    BedRockSurfaceElevation = "bedrock_surface_elevation"
    WaveDirection = "wavedirection"
    XWaveForce = "xwaveforce"
    YWaveForce = "ywaveforce"
    WavePeriod = "waveperiod"
    WaveSignificantHeight = "wavesignificantheight"
    InternalTidesFrictionCoefficient = "internaltidesfrictioncoefficient"

ExtOldQuantity

Bases: StrEnum

Enum class containing the valid values for the boundary conditions category of the external forcings.

Source code in hydrolib/core/dflowfm/extold/models.py
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
class ExtOldQuantity(StrEnum):
    """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"""

    # 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"""
    AirPressureWindXWindYCharnock = "airpressure_windx_windy_charnock"
    "Atmospheric pressure and wind components Charnock"
    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"""
    DewPointAirTemperatureCloudiness = "dewpoint_airtemperature_cloudiness"
    """Dew point air temperature cloudiness"""
    LongWaveRadiation = "longwaveradiation"
    """Long wave radiation"""
    SolarRadiation = "solarradiation"
    """Solar radiation"""
    DischargeSalinityTemperatureSorSin = "discharge_salinity_temperature_sorsin"
    """Discharge, salinity temperature source-sinks"""
    NudgeSalinityTemperature = "nudge_salinity_temperature"
    """Nudging salinity and temperature"""
    AirPressure = "airpressure"
    """AirPressure"""
    StressX = "stressx"
    """eastward wind stress"""
    StressY = "stressy"
    """northward wind stress"""
    AirTemperature = "airtemperature"
    """AirTemperature"""
    Cloudiness = "cloudiness"
    """Cloudiness, or cloud cover (fraction)"""
    Humidity = "humidity"
    """Humidity"""
    StressXY = "stressxy"
    """eastward and northward wind stress"""
    AirpressureStressXStressY = "airpressure_stressx_stressy"
    """Airpressure, eastward and northward wind stress"""
    WindSpeed = "wind_speed"
    """WindSpeed"""
    WindSpeedFactor = "windspeedfactor"
    WindFromDirection = "wind_from_direction"
    """WindFromDirection"""
    DewpointAirTemperatureCloudinessSolarradiation = (
        "dewpoint_airtemperature_cloudiness_solarradiation"
    )
    """Dewpoint temperature, air temperature, cloudiness, solarradiation"""
    AirDensity = "airdensity"
    """Air density"""
    Charnock = "charnock"
    """Charnock coefficient"""
    Dewpoint = "dewpoint"
    """Dewpoint temperature"""

    # 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 layer"""
    InitialTemperature = "initialtemperature"
    """Initial temperature"""
    InitialVerticalTemperatureProfile = "initialverticaltemperatureprofile"
    """Initial vertical temperature profile"""
    InitialVerticalSalinityProfile = "initialverticalsalinityprofile"
    """Initial vertical salinity profile"""
    BedLevel = "bedlevel"
    """Bed level"""

    # Spatial physical properties
    FrictionCoefficient = "frictioncoefficient"
    """Friction coefficient"""
    HorizontalEddyViscosityCoefficient = "horizontaleddyviscositycoefficient"
    """Horizontal eddy viscosity coefficient"""
    InternalTidesFrictionCoefficient = "internaltidesfrictioncoefficient"
    """Internal tides friction coefficient"""
    HorizontalEddyDiffusivityCoefficient = "horizontaleddydiffusivitycoefficient"
    """Horizontal eddy diffusivity coefficient"""
    AdvectionType = "advectiontype"
    """Type of advection scheme"""
    IBotLevType = "ibotlevtype"
    BedRockSurfaceElevation = "bedrock_surface_elevation"
    """Type of bed-level handling"""

    # Miscellaneous
    ShiptXY = "shiptxy"
    """shiptxy"""
    MovingStationXY = "movingstationxy"
    """Moving observation point for output (time, x, y)"""
    WaveSignificantHeight = "wavesignificantheight"
    """Wave significant height"""
    WavePeriod = "waveperiod"
    """Wave period"""
    WaveDirection = "wavedirection"
    XWaveForce = "xwaveforce"
    YWaveForce = "ywaveforce"

    InitialVelocityX = "initialvelocityx"
    InitialVelocityY = "initialvelocityy"
    InitialVelocity = "initialvelocity"

AdvectionType = 'advectiontype' class-attribute instance-attribute

Type of advection scheme

AirDensity = 'airdensity' class-attribute instance-attribute

Air density

AirPressure = 'airpressure' class-attribute instance-attribute

AirPressure

AirPressureWindXWindY = 'airpressure_windx_windy' class-attribute instance-attribute

Atmospheric pressure and wind components

AirPressureWindXWindYCharnock = 'airpressure_windx_windy_charnock' class-attribute instance-attribute

Atmospheric pressure and wind components Charnock

AirTemperature = 'airtemperature' class-attribute instance-attribute

AirTemperature

AirpressureStressXStressY = 'airpressure_stressx_stressy' class-attribute instance-attribute

Airpressure, eastward and northward wind stress

AtmosphericPressure = 'atmosphericpressure' class-attribute instance-attribute

Atmospheric pressure

BedLevel = 'bedlevel' class-attribute instance-attribute

Bed level

BedRockSurfaceElevation = 'bedrock_surface_elevation' class-attribute instance-attribute

Type of bed-level handling

Charnock = 'charnock' class-attribute instance-attribute

Charnock coefficient

Cloudiness = 'cloudiness' class-attribute instance-attribute

Cloudiness, or cloud cover (fraction)

DamLevel = 'damlevel' class-attribute instance-attribute

Dam level

DewPointAirTemperatureCloudiness = 'dewpoint_airtemperature_cloudiness' class-attribute instance-attribute

Dew point air temperature cloudiness

Dewpoint = 'dewpoint' class-attribute instance-attribute

Dewpoint temperature

DewpointAirTemperatureCloudinessSolarradiation = 'dewpoint_airtemperature_cloudiness_solarradiation' class-attribute instance-attribute

Dewpoint temperature, air temperature, cloudiness, solarradiation

DischargeBnd = 'dischargebnd' class-attribute instance-attribute

Discharge

DischargeSalinityTemperatureSorSin = 'discharge_salinity_temperature_sorsin' class-attribute instance-attribute

Discharge, salinity temperature source-sinks

FrictionCoefficient = 'frictioncoefficient' class-attribute instance-attribute

Friction coefficient

GateLowerEdgeLevel = 'gateloweredgelevel' class-attribute instance-attribute

Gate lower edge level

GeneralStructure = 'generalstructure' class-attribute instance-attribute

General structure

HorizontalEddyDiffusivityCoefficient = 'horizontaleddydiffusivitycoefficient' class-attribute instance-attribute

Horizontal eddy diffusivity coefficient

HorizontalEddyViscosityCoefficient = 'horizontaleddyviscositycoefficient' class-attribute instance-attribute

Horizontal eddy viscosity coefficient

Humidity = 'humidity' class-attribute instance-attribute

Humidity

HumidityAirTemperatureCloudiness = 'humidity_airtemperature_cloudiness' class-attribute instance-attribute

Combined heat flux terms

HumidityAirTemperatureCloudinessSolarRadiation = 'humidity_airtemperature_cloudiness_solarradiation' class-attribute instance-attribute

Combined heat flux terms

InitialSalinity = 'initialsalinity' class-attribute instance-attribute

Initial salinity

InitialSalinityTop = 'initialsalinitytop' class-attribute instance-attribute

Initial salinity top layer

InitialTemperature = 'initialtemperature' class-attribute instance-attribute

Initial temperature

InitialVerticalSalinityProfile = 'initialverticalsalinityprofile' class-attribute instance-attribute

Initial vertical salinity profile

InitialVerticalTemperatureProfile = 'initialverticaltemperatureprofile' class-attribute instance-attribute

Initial vertical temperature profile

InitialWaterLevel = 'initialwaterlevel' class-attribute instance-attribute

Initial water level

InternalTidesFrictionCoefficient = 'internaltidesfrictioncoefficient' class-attribute instance-attribute

Internal tides friction coefficient

LongWaveRadiation = 'longwaveradiation' class-attribute instance-attribute

Long wave radiation

MovingStationXY = 'movingstationxy' class-attribute instance-attribute

Moving observation point for output (time, x, y)

NeumannBnd = 'neumannbnd' class-attribute instance-attribute

Water level gradient

NormalVelocityBnd = 'normalvelocitybnd' class-attribute instance-attribute

Normal velocity

NudgeSalinityTemperature = 'nudge_salinity_temperature' class-attribute instance-attribute

Nudging salinity and temperature

OutflowBnd = 'outflowbnd' class-attribute instance-attribute

Outflow

Pump = 'pump' class-attribute instance-attribute

Pump capacity

QhBnd = 'qhbnd' class-attribute instance-attribute

Discharge-water level dependency

Rainfall = 'rainfall' class-attribute instance-attribute

Precipitation

RainfallRate = 'rainfall_rate' class-attribute instance-attribute

Precipitation

RiemannBnd = 'riemannbnd' class-attribute instance-attribute

Riemann invariant

RiemannVelocityBnd = 'riemann_velocitybnd' class-attribute instance-attribute

Riemann invariant velocity

SalinityBnd = 'salinitybnd' class-attribute instance-attribute

Salinity

SedimentBnd = 'sedimentbnd' class-attribute instance-attribute

Suspended sediment

ShiptXY = 'shiptxy' class-attribute instance-attribute

shiptxy

SolarRadiation = 'solarradiation' class-attribute instance-attribute

Solar radiation

StressX = 'stressx' class-attribute instance-attribute

eastward wind stress

StressXY = 'stressxy' class-attribute instance-attribute

eastward and northward wind stress

StressY = 'stressy' class-attribute instance-attribute

northward wind stress

TangentialVelocityBnd = 'tangentialvelocitybnd' class-attribute instance-attribute

Tangentional velocity

TemperatureBnd = 'temperaturebnd' class-attribute instance-attribute

Temperature

UXUYAdvectionVelocityBnd = 'uxuyadvectionvelocitybnd' class-attribute instance-attribute

ux-uy advection velocity

VelocityBnd = 'velocitybnd' class-attribute instance-attribute

Velocity

WaterLevelBnd = 'waterlevelbnd' class-attribute instance-attribute

Water level

WavePeriod = 'waveperiod' class-attribute instance-attribute

Wave period

WaveSignificantHeight = 'wavesignificantheight' class-attribute instance-attribute

Wave significant height

WindFromDirection = 'wind_from_direction' class-attribute instance-attribute

WindFromDirection

WindSpeed = 'wind_speed' class-attribute instance-attribute

WindSpeed

WindX = 'windx' class-attribute instance-attribute

Wind x component

WindXY = 'windxy' class-attribute instance-attribute

Wind vector

WindY = 'windy' class-attribute instance-attribute

Wind y component

ExtOldSourcesSinks

Bases: StrEnum

Source and sink quantities

Source code in hydrolib/core/dflowfm/extold/models.py
351
352
353
354
class ExtOldSourcesSinks(StrEnum):
    """Source and sink quantities"""

    DischargeSalinityTemperatureSorSin = "discharge_salinity_temperature_sorsin"

ExtOldTracerQuantity

Bases: StrEnum

Enum class containing the valid values for the boundary conditions category of the external forcings that are specific to tracers.

Source code in hydrolib/core/dflowfm/extold/models.py
143
144
145
146
147
148
149
150
151
152
class ExtOldTracerQuantity(StrEnum):
    """Enum class containing the valid values for the boundary conditions category
    of the external forcings that are specific to tracers.
    """

    TracerBnd = "tracerbnd"
    """User-defined tracer"""
    InitialTracer = "initialtracer"
    """Initial tracer"""
    SedFracBnd = "sedfracbnd"

InitialTracer = 'initialtracer' class-attribute instance-attribute

Initial tracer

TracerBnd = 'tracerbnd' class-attribute instance-attribute

User-defined tracer