Please wait...
×

Error

Posted Tue, 11 Apr 2017 23:55:40 GMT by aragorn
Good morning everybody,

I've been trying to find this on the web but I can't get any good results so I'm sorry if it's a pretty simple answer.  Is there a way to get the statistically maximum/minimum current speed from a dfsu file BUT with the corresponding direction still attached?  When I do the simple Compute Statistics from the Data Manager for the speed, it decouples from the vector direction so it always just gives me a current going due north.
Posted Tue, 18 Apr 2017 16:11:29 GMT by Christian Tomsu Germany
Hi,

I assume, you have to code something for that using the DFS - API.

loop through all time steps -
keep the time step with the maximum velocity -
read the u/v - velocity of this special timestep.

Bests Christian
Posted Thu, 27 Apr 2017 09:53:32 GMT by aragorn
Good evening Christian,

Ah so I was correct that there is no built-in thing for this.  Thanks for the input!
Posted Fri, 28 Apr 2017 07:09:13 GMT by Onisaki
This information is very helpful to me.
Posted Wed, 31 May 2017 09:09:23 GMT by Mathieu Hellegouarch
Hi all,

A tool called "Velocity at Maximum Flow Tool" is available for download on this page:
https://www.mikepoweredbydhi.com/download/mike-by-dhi-tools

It does exactly what Christian suggested, to save the U- and V-velocity components corresponding to the maximum current speed (or the maximum water depth).

Note that the tool is provided with its source code, so you can easily modify the code in case you want to get the directions for the minimum values instead of maximum ones.

Best regards,
Mathieu
Posted Wed, 31 May 2017 09:11:29 GMT by Christian Tomsu Germany
:) :)
Posted Wed, 31 May 2017 09:46:00 GMT by Christian Tomsu Germany
Matthieu,
it works only with MIKE2017 ?
Bests Christian
Posted Tue, 13 Jun 2017 10:46:23 GMT by Mathieu Hellegouarch
Hi Christian,

Yes, the *.exe file will work with version 2017 only. If you e.g. want to use it with version 2016, you will simply need to install MIKE SDK 2016, open the source code and update the references to MIKE SDK libraries in 2016 version, and re-create the executable.

Cheers,
Mathieu
Posted Wed, 14 Jun 2017 08:12:18 GMT by Christian Tomsu Germany
Hi Mathieu,

I converted your script to python and included it in a complex postprocessing routine for MIKE21FM.
Thanks for the template  :). It works fine.

Bests
Christian

You must be signed in to post in this forum.