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

Dfs2 - Issue reading shoreline morphology model Dfs2 #266

Closed
PatMottmac opened this issue Nov 16, 2021 · 3 comments
Closed

Dfs2 - Issue reading shoreline morphology model Dfs2 #266

PatMottmac opened this issue Nov 16, 2021 · 3 comments

Comments

@PatMottmac
Copy link

PatMottmac commented Nov 16, 2021

Describe the bug
Receive the following error when attempting to read a "profile.dfs2" file that is generated by the shoreline morphology model:

ValueError: 100217 is not a valid eumUnit
To Reproduce
Steps to reproduce the behavior:
image

Include code snippet
See code snippet above

Expected behavior
I would like to load the profile Dfs2 file using the standard Dfs2 function from the mikeio module.

Screenshots
Error traceback
image

System information:

  • Python version: Python 3.7.6
  • MIKE version: 0.10.2
@ecomodeller
Copy link
Member

DiscIaimer, have zero experience with shoreline modelling...

But it seems like the Dfs2 file somehow has an invalid spatial axis unit.

The error message is correct, there is no EUM unit with the number 100217. There is however an EUMType with that number.

So either there is a bug in the engine that wrote the dfs2 file or there is something else that I am missing.

Could you attach an example file so we can take a look at the metadata?

@PatMottmac
Copy link
Author

Here is the code snippet i was using to load the file - will email the file separately

from mikeio import Dfs2
#specify profile file name
profile_file = 'profile.dfs2'

#load profile
dfs2 = Dfs2(profile_file)
data_profile = dfs2.read()

@ecomodeller
Copy link
Member

This is an invalid file, however it can be handled by allowing ignoring the unit, but it needs to be handled in mikecore, where I have created an issue. The proper way to fix this is to correct the tool that generated the file. So I will be closing this issue since there is nothing we can do within mikeio to fix it.

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

No branches or pull requests

2 participants