Tips and Tricks


Please do not hesitate to e-mail us if you have tips yourself:


  • Go Home Early by Automating Simulation and Post Processing Tasks

    Many users are saving themselves hours each week by using batch files to automate the execution of simulations and post processing tools. Three simple batch examples are included in this Newsflash (text can be directly copied from the html). The first example uses MZLaunch to execute simulations; MZLaunch.exe manages all MIKE Zero software based simulations including MIKE11, MIKE21, MIKESHE and MIKEFLOOD. The second example executes MIKE ZERO Toolbox files and the third example exports image files including .jpg, .png and .bmp from existing Plot Composer setups.
    In order to create a batch file first create a new text file, then paste in the text below (with edits to suit your file names and paths). Save the text file with .bat extension in the folder containing your simulation files (or you can add a path). Execute your batch file by double clicking on it and watch as each task is executed as soon as the preceding task has been completed. Please note that the location of bin directory has changed for the 2009 version.

    MIKE ZERO Software 2007 & 2008 versions

    start /w C:\Progra~1\DHI\MIKEZero\bin\MZlaunch.exe BigFlood.sim11 -s -x
    start /w C:\Progra~1\DHI\MIKEZero\bin\ToolboxShell -run MaxStats.mzt
    start /w C:\Progra~1\DHI\MIKEZero\bin\MzPlotCompApp.exe Plot.plc -Printtofile C:\project\BigFlood.jpg

    MIKE ZERO Software 2009 version

    start /w C:\Progra~1\DHI\2009\bin\MZlaunch.exe BigFlood.sim11 -s -x
    start /w C:\Progra~1\DHI\2009\bin\ToolboxShell -run MaxStats.mzt
    start /w C:\Progra~1\DHI\2009\bin\MzPlotCompApp.exe Plot.plc -Printtofile C:\project\BigFlood.jpg

    The typical batch file example below will run each MIKE FLOOD simulation, produce maximum statistics for each event (appropriate setups need to be developed in the MZT file) and export .jpg images from Plot Composer.

    Typical Batch File Example

    start /w C:\Progra~1\DHI\2009\bin\MZlaunch.exe Q5_BigFlood.couple -s -x
    start /w C:\Progra~1\DHI\2009\bin\MZlaunch.exe Q10_BigFlood.couple -s -x
    start /w C:\Progra~1\DHI\2009\bin\MZlaunch.exe Q50_BigFlood.couple -s –x
    start /w C:\Progra~1\DHI\2009\bin\MZlaunch.exe Q100_BigFlood.couple -s –x
    start /w C:\Progra~1\DHI\2009\bin\ToolboxShell -run MaxStats.mzt
    start /w C:\Progra~1\DHI\2009\bin\MzPlotCompApp.exe Q5_BigFlood.plc -Printtofile C:\project\Q5_BigFlood_MaxSurfaceEle.jpg
    start /w C:\Progra~1\DHI\2009\bin\MzPlotCompApp.exe Q10_BigFlood.plc -Printtofile C:\project\Q10_BigFlood_ MaxSurfaceEle.jpg
    start /w C:\Progra~1\DHI\2009\bin\MzPlotCompApp.exe Q50_BigFlood.plc -Printtofile C:\project\Q50_BigFlood_ MaxSurfaceEle.jpg
    start /w C:\Progra~1\DHI\2009\bin\MzPlotCompApp.exe Q100_BigFlood.plc -Printtofile C:\project\Q100_BigFlood_ MaxSurfaceEle.jpg

    You may also consider editing MIKE ZERO based files in text editors to save time. Some simple timesaving edits include using ‘find and replace’ within MIKE11 boundary files to change .dfs0 input, changing data file name within a Plot Composer file to create the same plot of a different source file and adding new setups within a MIKE ZERO Toolbox file by copying and pasting existing setups. For more information, contact Blake Boulton or 07 5564 0916.