Skip to content

Commit

Permalink
remove interpolationmethod and operand from the attributes of the…
Browse files Browse the repository at this point in the history
… `SourceSink` class
  • Loading branch information
MAfarrag committed Jan 9, 2025
1 parent 89b55a0 commit a074a44
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 10 deletions.
2 changes: 0 additions & 2 deletions hydrolib/core/dflowfm/ext/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,6 @@ class SourceSink(INIBasedModel):

salinitydelta: Optional[ForcingData] = Field(alias="SalinityDelta")
temperaturedelta: Optional[ForcingData] = Field(alias="TemperatureDelta")
interpolationmethod: Optional[str] = Field(alias="interpolationMethod")
operand: Optional[Operand] = Field(Operand.override.value, alias="operand")

@classmethod
def _exclude_from_validation(cls, input_data: Optional[dict] = None) -> Set:
Expand Down
4 changes: 0 additions & 4 deletions hydrolib/tools/ext_old_to_new/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,10 +499,6 @@ def convert(
"zsink": z_sink,
}
data = data | time_series

data = convert_interpolation_data(forcing, data)
data["operand"] = forcing.operand

new_block = SourceSink(**data)

return new_block
Expand Down
4 changes: 0 additions & 4 deletions tests/dflowfm/ext/test_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,6 @@ def source_sink_data(self) -> Dict[str, Any]:
"ycoordinates": [12.950216, 6.350155],
"zsource": -3.0,
"zsink": -4.2,
"interpolationmethod": "",
"operand": "O",
"discharge": 1.1234,
"temperaturedelta": [2.0, 2.0, 5.0, 8.0, 10.0],
"salinitydelta": [3.0, 5.0, 12.0, 9.0, 23.0],
Expand Down Expand Up @@ -292,8 +290,6 @@ def test_time_series_discharge_case(self):
"discharge": [1.0, 2.0, 3.0, 5.0, 8.0],
"temperaturedelta": [2.0, 2.0, 5.0, 8.0, 10.0],
"salinitydelta": [3.0, 5.0, 12.0, 9.0, 23.0],
"interpolationmethod": "linearSpaceTime",
"operand": "O",
}

source_sink = SourceSink(**data)
Expand Down

0 comments on commit a074a44

Please sign in to comment.