Skip to content

Observation point .ini files

The observation point module provides the specific logic for accessing observation point files for a D-Flow FM model.

Generic parsing and serializing functionality comes from the generic hydrolib.core.dflowfm.ini modules.

An observation point .ini file is described by the classes below.

Model

ObservationPoint (INIBasedModel) pydantic-model

An observation point that is included in the observation point file.

All lowercased attributes match with the observation point input as described in UM Sec.F.2.2.1.

validate_that_location_specification_is_correct(values: Dict) -> Dict classmethod

Validates that the correct location specification is given.

Source code in hydrolib/core/dflowfm/obs/models.py
@root_validator(allow_reuse=True)
def validate_that_location_specification_is_correct(cls, values: Dict) -> Dict:
    """Validates that the correct location specification is given."""
    return validate_location_specification(
        values,
        config=LocationValidationConfiguration(
            validate_node=False, validate_num_coordinates=False
        ),
        fields=LocationValidationFieldNames(x_coordinates="x", y_coordinates="y"),
    )

ObservationPointGeneral (INIGeneral) pydantic-model

The observation point file's [General] section with file meta data.

ObservationPointModel (INIModel) pydantic-model

The overall observation point model that contains the contents of one observation point file.

This model is typically referenced under a FMModel.output.obsfile[..].

Attributes:

Name Type Description
general ObservationPointGeneral

[General] block with file metadata.

observationpoint List[ObservationPoint]

List of [ObservationPoint] blocks for all observation points.

Back to top