Fuzzy EUM Lookup #178
stephankistner
started this conversation in
Ideas
Replies: 2 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
1 reply
-
I like your ideas, @stephankistner. It's great to have these features that help you do what you want quicker 👍 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
Great work - I find it very exciting to see some community support for python and MIKE. We've developed our own "MIKE-IO" concept over the past 4 years, but now that there's an official version we will slowly start to migrate over to a more official one.
One of the concepts that we used was fuzzy lookups when writing Dfs files (FuzzyWuzzy module). This was especially advantageous when you want to do very quick I/O processing:
E.g, if we have a wind time series that looks like this (ASCII, Excel, or other similar format):
The item names are already defined in the columns so we utilize a Fuzzy-lookup that finds the closest match of "Wind Spd" and "Wind Dir" in the EUM database (either local user or generic version). As for the units: 90% of the time we are working with standard units, so we can find that from our EUM database as well.
So then it's as simple as:
The accuracy of the lookup naturally depends on your input, so sometimes it necessitates "forcing" the item names to result in a more accurate search term:
Likewise for non-conventional units:
The fuzzy-lookup is not unique to our Dfs0-I/O and is universally applied to Dfs1,2,3,U filetypes.
At the same time we also accept EUM integers EUM strings for the cases that you really want to be sure ;)
Another advantage of this approach is that we did not have to manually rewrite the long lists or dictionaries of EUM Items and Quantities: all of these are directly read from the .ubg files - as used in Mike Zero.
I'd happily send over the script - or at the very least a Notebook. It just needs a lot of refactoring, so it's not quite ready to share with the world.
Stephan Kistner
Coastal Engineer
PRDW Consulting Port and Coastal Engineers
Beta Was this translation helpful? Give feedback.
All reactions