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

Time Section in the mdu has unknown keywords + Structure file has unkown keywords #747

Open
sumihar opened this issue Feb 25, 2025 · 1 comment
Labels
extforce external forcing file conversion type: bug Something isn't working

Comments

@sumihar
Copy link

sumihar commented Feb 25, 2025

Describe the bug
The following validation errors happen with test case e02_f002_c100_longculvert:

(.hydrolib) PS C:\Software\delft3d\test\deltares_testbench\data\cases\e02_f002_c100_longculvert> python.exe C:\Software\HYDROLIB-core\hydrolib\tools\ext_old_to_new\cli.py --mdufile tunnel.mdu
Traceback (most recent call last):
File "C:\Software\HYDROLIB-core\hydrolib\core\basemodel.py", line 71, in init
super().init(**data)
File "C:\Users\sumihar\virtualenvs.hydrolib\Lib\site-packages\pydantic\v1\main.py", line 341, in init
raise validation_error
pydantic.v1.error_wrappers.ValidationError: 3 validation errors for LegacyFMModel
numerics -> zlayercenterbedvel
value could not be parsed to a boolean (type=type_error.bool)
wind -> root
Unknown keywords are detected in section: 'Wind', '['stericcorrection']' (type=value_error)
processes -> root
Unknown keywords are detected in section: 'Processes', '['dtmassbalance']' (type=value_error)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Software\HYDROLIB-core\hydrolib\tools\ext_old_to_new\main_converter.py", line 409, in from_mdu
fm_model = LegacyFMModel(mdu_file, recurse=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Software\HYDROLIB-core\hydrolib\core\basemodel.py", line 931, in init
super().init(*args, **kwargs)
File "C:\Software\HYDROLIB-core\hydrolib\core\basemodel.py", line 91, in init
raise ValidationError([ErrorWrapper(e, loc=identifier)], self.class)
pydantic.v1.error_wrappers.ValidationError: 3 validation errors for LegacyFMModel
tunnel.mdu -> numerics -> zlayercenterbedvel
value could not be parsed to a boolean (type=type_error.bool)
tunnel.mdu -> wind -> root
Unknown keywords are detected in section: 'Wind', '['stericcorrection']' (type=value_error)
tunnel.mdu -> processes -> root
Unknown keywords are detected in section: 'Processes', '['dtmassbalance']' (type=value_error)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Software\HYDROLIB-core\hydrolib\tools\ext_old_to_new\cli.py", line 126, in
main()
File "C:\Software\HYDROLIB-core\hydrolib\tools\ext_old_to_new\cli.py", line 96, in main
converter = ExternalForcingConverter.from_mdu(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Software\HYDROLIB-core\hydrolib\tools\ext_old_to_new\main_converter.py", line 422, in from_mdu
data, mdu_info = ExternalForcingConverter.get_mdu_info(mdu_file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Software\HYDROLIB-core\hydrolib\tools\ext_old_to_new\main_converter.py", line 360, in get_mdu_info
mdu_time = Time(**time_data)
^^^^^^^^^^^^^^^^^
File "C:\Software\HYDROLIB-core\hydrolib\core\basemodel.py", line 88, in init
raise e
File "C:\Software\HYDROLIB-core\hydrolib\core\basemodel.py", line 71, in init
super().init(**data)
File "C:\Users\sumihar\virtualenvs.hydrolib\Lib\site-packages\pydantic\v1\main.py", line 341, in init
raise validation_error
pydantic.v1.error_wrappers.ValidationError: 1 validation error for Time
root
Unknown keywords are detected in section: 'Time', '['timestepanalysis']' (type=value_error)

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'C:\Software\delft3d\test\deltares_testbench\data\cases\e02_f002_c100_longculvert'
  2. Run '(.hydrolib) PS C:\Software\delft3d\test\deltares_testbench\data\cases\e02_f002_c100_longculvert> python.exe C:\Software\HYDROLIB-core\hydrolib\tools\ext_old_to_new\cli.py --mdufile tunnel.mdu'
  3. See error

Expected behavior
If those are obsolete parameters, please remove them. Otherwise, if they are not relevant for the extforce, we need to discuss further what to do.

Screenshots
If applicable, add screenshots to help explain your problem.

Version info (please complete the following information):

  • OS: Windows
  • Version [e.g. 0.1.5]

Additional context
Add any other context about the problem here.

@sumihar
Copy link
Author

sumihar commented Feb 25, 2025

Please note that this issue happens too in the following test cases:
e02_f002_c101_longculvert_timeseries_valve
e02_f002_c102_longculvert_new\

@sumihar sumihar changed the title validation errors extforce: validation errors Feb 25, 2025
@MAfarrag MAfarrag added type: bug Something isn't working extforce external forcing file conversion labels Feb 26, 2025
@MAfarrag MAfarrag changed the title extforce: validation errors Time Section in the mdu has unknown keywords + Structure file has unkown keywords Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extforce external forcing file conversion type: bug Something isn't working
Projects
Status: To do
Development

No branches or pull requests

2 participants