Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filetype 10 not supported for oldext #565

Closed
veenstrajelmer opened this issue Oct 11, 2023 · 0 comments · Fixed by #566
Closed

Filetype 10 not supported for oldext #565

veenstrajelmer opened this issue Oct 11, 2023 · 0 comments · Fixed by #566

Comments

@veenstrajelmer
Copy link
Collaborator

Describe the bug
When providing an old extfile with a polygon that prescribes the area in which a certain initial value is to be applied, it raises a ValidationError:

ValidationError: 1 validation error for ExtOldModel
oldext_invalid.ext -> forcing -> 0 -> FILETYPE
  value is not a valid enumeration member; permitted: 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 14 (type=type_error.enum; enum_values=[<ExtOldFileType.TimeSeries: 1>, <ExtOldFileType.TimeSeriesMagnitudeAndDirection: 2>, <ExtOldFileType.SpatiallyVaryingWindPressure: 3>, <ExtOldFileType.ArcInfo: 4>, <ExtOldFileType.SpiderWebData: 5>, <ExtOldFileType.CurvilinearData: 6>, <ExtOldFileType.Samples: 7>, <ExtOldFileType.TriangulationMagnitudeAndDirection: 8>, <ExtOldFileType.Polyline: 9>, <ExtOldFileType.NetCDFGridData: 11>, <ExtOldFileType.NetCDFWaveData: 14>])

To Reproduce
Create file oldext_insidepol.ext with these contents:

QUANTITY=frictioncoefficient
FILENAME=allcells.pli
FILETYPE=10
METHOD=4
OPERAND=O
VALUE=62.5

Run these lines:

import hydrolib.core.dflowfm as hcdfm
file_ext = "oldext_insidepol.ext"
hcdfm.ExtOldModel(file_ext)

Expected behavior
Support for filetype 10 (polygon) in old extfile. This is also defined in the extfile header

Version info (please complete the following information):

  • OS: Windows
  • Version 0.5.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant