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

Shoreline profile - bad spatial axis unit #18

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ecomodeller
Copy link
Member

Spatial axis unit is wrong in shoreline profile dfs2.

Which makes it impossible to read the data in mikecore, even though the file can be opened in Mike Zero.

ValueError: 100217 is not a valid eumUnit

@ecomodeller
Copy link
Member Author

This is the original issue: DHI/mikeio#266

@ecomodeller ecomodeller marked this pull request as ready for review November 19, 2021 06:42
@ecomodeller ecomodeller changed the title Bad spatial axis - failing test to demonstrate Shoreline profile - bad spatial axis unit Nov 19, 2021
@JesperGr
Copy link
Collaborator

100217 is a EUM item type number, and not a unit. Seems like somewhere the item type number is used as a unit number.

@JesperGr
Copy link
Collaborator

I just had a look at the file, and it is invalid. The fix in DfsFile is fine, though I would probably not check in an invalid file to the repository?

Where does this file come from, do you know?

@JesperGr
Copy link
Collaborator

Also, the same construction using 'eumUnit(eumUnitInt.value)' is there for all spatial axis, and the fix should be extended to all of them.

@JesperGr
Copy link
Collaborator

Found the origin of the file: Mesh Editor in MIKE Zero. I will report a bug for that one as well, so that will be fixed for next release. Though, this fix is still required to support existing files.

The fix works similar to MZ tools: If unit is not found, it defaults to meters.

@ecomodeller
Copy link
Member Author

I just had a look at the file, and it is invalid. The fix in DfsFile is fine, though I would probably not check in an invalid file to the repository?

Where does this file come from, do you know?

The file is from a shoreline morphology model according to the client.

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 this pull request may close these issues.

2 participants