• Re: output file formats

    Hi Jaromir,

    You need to use .NET oriented programming languages to access/manipulate dfs files (C#, IronPython ...). When you have access to the data, you can store them with the format that as you want.
    Their is example on how to programming script as well as manuals to describe the dfs structure in the "MIKE SDK" directory (MIKE 2014).
    I am handling my dfs files with IronPython (creating dfs files, extracting data etc.) and it's working fine.
  • Re: txt to dfs0

    Hey Niels,

    I would advice you to use Mike SDK (Software Development Kit) which is automatically installed with MU 2014. I guess that you should be able to download it if you use a older version of MU.

    Mike SDK gives you access to .NET libraries to handle dfs files (create, happens, read ...). So you need to use a .NET oriented programming langue as C# or IronPyton to write you program (Matlab  should also work). There are some examples inside the Mike SDK directory.

    I am doing it with IronPython and it works just fine.

    I hope it helps,

    Vianney
  • Re: Runoff generation using dsf2 files

    Hi Thomas,

    Thank you for your answer. I looked into City Tools, there is indeed a feature to convert dfs2 to dfs0. It's localized each catchments according to the grid and create a specific dfs0 by weighting the corresponding cells.

    Such tool is very relevant for small grid size while I dealing with a large grid. Furthermore this method is time consuming (creating one dfs0 for each catchment) and lead to an high computation time for the runoff generation.  In my case the computation time is major issue, so I decided to modified my IronPython script in order to generate a network of dfs0 files rather than one dfs2 file.

    Vianney
  • Runoff generation using dsf2 files

    Hi,

    I am using meteorological data from radar observation which are defined through time on a 3 km grid. Therefore, I created a dfs2 file to store these data (ie: there is one dfs0 file for each grid cell).

    I would like to use directly my dfs2 file as boundary item in the catchment load. My dfs2 file has coordinates same as my catchment. So technically, it is possible to match each basin with the corresponding time series.

    Does someone knows if it possible and how to do it?

    Thank you,

    Vianney
  • Re: Creating dfs2 files automatically from hdf5 files – Java code?

    Thank you Christian,

    The documentation and examples in "FileFormats" are very useful. In order to use directly the .NET framework, I decided to drop Java and to use IronPython instead. Which, after some time of adaptation, is working just fine.

    For the future reader,  MIKE SDK (Software Development Kit) is addressing this kind of issues and will be available with the new release (2014)

    Vianney
  • Creating dfs2 files automatically from hdf5 files – Java code?

    Hi,

    I want to automatically create dfs2 files from hdf5 files. I am considering to create a Java routine to do so.

    I know that DHI has created a “DHI Mathlab Toolbox”, so dfs files can be handled by Matlab.  Do you know if there is any similar toolbox or documents for Java?

    Thank you,
  • Re: MOUSE Engine - COM Interface with Matlab

    Hi,

    I solve part of my issues so I let you know in case some of you are interrested on the topic.

    Some commands of the COM Interface need to be called through the Matlab method "set" and "invoke". Two examples:

    set(MOUSEapp, 'RunType', 'HD')
    Output(i,1) = invoke(MOUSEapp, 'GetValue', 1, 1, char(Node_Name(i,1)), 0);

    But I still have an issue: If I can launch a basic simulation with both MU 2009 and MU 2011. The step by step simulation is only working with MU 2009.

    Does any one knows what are the changes made to the COM Interface between MU 2009 and MU 2011?

    Thank you,

    Vianney Courdent
  • Re: MOUSE Engine - COM Interface with Matlab

    Hej Niels Thule,

    Thank you for your answer. I made some researches, there is a function in Matlab to call dos command. But it seems quite complicated to go through the dos when Mike Urban COM interface can be open directly with Matlab.

    The purpose of using Matlab is to run some calculations with the data extracted from the simulation.

    The problem being that some of the methods and classes defined in MU COM interface are not recognized by Matlab. My reference “MOUSE Engine – Additional features” was made in 2009 so I tried with Mike Urban 2009 and 2011, both give the same result.

    Does anyone have experience with MU COM interface? Or have some documentation on the topic ?

    Thank you,
    \Vianney Courdent
  • MOUSE Engine - COM Interface with Matlab

    Hi,

    I am willing to execute the MOUSE computational engine from Matlab by using the COM interface technology. 

    In order to call the COM interface in Matlab I am using the function “actxserver” with the program ID “MOUSESimLaunch.MOUSE”. 

    Matlab recognizes the COM interface (can be tested with the function “iscom”) but does not recognize the “RunType” property in the MOUSE engine COM interface. Therefore the simulation cannot be launch.

    Does anyone have some experiences on this issue?

    PS: I am using as reference the “MOUSE Engine – Additional features” (2009) document, chapter 6 and 7.

    Thank you,
    Best regards,
    Vianney Courdent