Warning
This adaptor is not supported anymore because MIKE HYDRO River was last released with MIKE 2023.
When running a simulation, MIKE OPERATIONS will look for a MIKE Zero installation matching the MIKE OPERATIONS version. For example, MIKE OPERATIONS 2025 will run the simulation with
C:\Program Files (x86)\DHI\MIKE Zero\2025\bin\x64\DHI.Mike1D.Application.exe
Over time, newer versions of the MIKE1D engine will not run with the older MIKE HYDRO River models registered in MIKE OPERATIONS.
We recommand upgrading to MIKE+.
MIKE HYDRO River Adapter¶
The MIKE HYDRO River adapter enables use of MIKE HYDRO River model setups within the MIKE Workbench. The adapter supports the Rainfall-Runoff model specified in the Catchment definitions. AD boundary conditions and AD initial conditions are supported as well.
As all adapters, the MIKE HYDRO River adapter supports setting of editable model parameters via the user interface and via a spreadsheet. It is also possible to define ensembles of parameters in the spreadsheet.
It can take advantage of a multi-core machine and execute different runs of an ensemble simulation simultaneously in order to speed up ensemble model runs.
Limitations¶
-
mhydro-file must be in the root folder of the setup
-
All files in the directory structure from the root folder and down including hotstart files (except result files) are zipped during registration, so reduce the size of data files and remove unnecessary files
Model objects¶
The below list of model objects can be derived from a MIKE HYDRO River setup. Input and output timeseries are associated to corresponding model objects.
- Branch
- Parameters:
- Name
- Start chainage
- End chainage
- Flow direction
- Down stream
- Downstream branch name
- Downstream chainage
- Up stream
- Upstream branch name
- Upstream chainage
- Parameters:
- CrossSection
- Parameters:
- Name
- Branch name
- Chainage
- Left levee bank
- Right levee bank
- Lowest point
- Parameters:
- Catchment
- Parameters:
- Name
- Parameters:
- CalculationPoint
- Parameters:
- Branch name
- Chainage
- Type
- Parameters:
- Structure
- Parameters:
- Name
- Type
- Location
- River
- Chainage
- Parameters:
- ADInitialCondition
- Parameters:
- Name
- Branch name
- Chainage
- Component name
- Initial concentration (editable)
- Global
- Parameters:
- DataAssimilation
- Parameters:
- Name
- Parameters:
- Storage
- Parameters:
- Name
- Parameters:
- Boundary
- Parameters:
- Name
- Boundary type (HD, AD, ST)
- Input type (Constant, Time varying)
- Constant value (editable)
- Parameters:
Configuration¶
The MIKE HYDRO River adapter runs a user defined launch command if specified.
If no launch command is specified, the adapter runs the MIKE 1D engine
if no NAM model is specified. In case a NAM model is specified, it uses
the DHI.MHydro.Application.exe
to run the model.
Hotstart functionality for the Rainfall-Runoff model is supported. HD initial conditions and AD initial conditions using hotstart files are also supported.
Launch command¶
The default launch command of the MIKE HYDRO River model adapter from version 2024 is DHI.Mike1D.Application.exe
.
This command is used for executing the MIKE HYDRO River model when running simulations.
The launch command can be changed in the MIKEHydroRiver Adapter.xml
created during model registration.
<?xml version="1.0"?>
<MIKEHydroRiverAdapter>
<!-- ... -->
<HRFilePath>Vida.mhydro</HRFilePath>
<LaunchCmd>
</LaunchCmd>
<LaunchArguments>
</LaunchArguments>
<LaunchSilentArguments>
</LaunchSilentArguments>
<EditModelCmd>MZShell.exe</EditModelCmd>
<Folders>
<String>Vida.mhydro - Result Files</String>
</Folders>
</MIKEHydroRiverAdapter>
Updating the launch command requires that the model setup is exported e.g. using the Open in Native Tool or by using an export script, so that that the MIKEHydroRiver Adapter.xml
can be changed.
After changing the MIKEHydroRiver Adapter.xml
file, the exported model, should be zipped and imported again, e.g. by using an zip and import script in the script manager.
def ReZipSetup(modelSetupPath, directory):
"""
<Script>
<Author>admin</Author>
<Description>Script to zip a folder and assign the result as content to a modelsetup, ths updating the blob</Description>
<Parameters>
<Parameter name="modelSetupPath" type="string">The full path of the model setup in the database (copy Full Path)</Parameter>
<Parameter name="directory" type="string">The directoy path in windows where the setup has been unpacked</Parameter>
</Parameters>
</Script>
"""
if (System.IO.Directory.Exists(directory) == False):
return;
scm = app.Modules.Get("Scenario Manager");
modelsetup = scm.ModelSetupList.Fetch(modelsetupPath);
zipptr = BaseAdapter.ZipFiles(directory, None, "no Adapter");
modelsetup.Content = zipptr;
scm.ModelSetupList.Update(modelsetup, True);
Warning
Be carefull when editing the model information and importing the changes, as the model information is used as when running simulation.