Calculating Water Balances in Batch Mode

Like most DHI software, the water balance utility can be run in batch mode. This is useful if you want to run the water balance utility:

·         immediately after a simulation that was also run in batch mode, or

·         without using the water balance utility graphical user interface.

The water balance utility stores all of its information in a .wbl file. The .wbl file is an ASCII file that can be edited with Notepad or other text editor, but the format of the water balance file must be preserved. For more information on editing the .wbl file and creating custom water balances, see Making Custom Water Balances (V1 p. 131).

The executables for the water balance utility are found in the installation directory (..\bin\x64). There are three executables.

To perform the water balance extraction use:

MSHE_Wbl_Ex.exe xxx.wbl

where xxx.wbl is the water balance .wbl input file. To run an individual water balance use:

MSHE_Wbl_Post.exe xxx.wbl num

where num is the number of the post-processing water balance item that you want to run. To display the chart water balance output use:

MSHE_WblChart.exe xxx.txt

where xxx.txt is the output text file for the water balance chart defined in the post-processor item.

The number in the Postprocessing command must be consistent with the water balance utility file (i.e., the number cannot be greater than the number of Postprocessing items in the file). Otherwise, the program will terminate with an error. The Postprocessing step cannot be executed before an Extrac­tion step but only one Extraction step needs to be run for a single water bal­ance utility file.

To run the water balance utility in batch mode, the .wbl file must be created prior to executing the water balance and all file names in the .wbl file need to be valid.

If during calibration the same MIKE SHE file name is used for each simulation then the same .wbl file can be used for all calibration runs. If the MIKE SHE simulation to be evaluated is different from the MIKE SHE simulation used to set up the water balance file, you will have to edit the .wbl file.

To run the Extraction and Postprocessing steps in batch mode, the PATH statement needs to include the directory where MIKE SHE was installed. For the 2016 Release, the default directory is

C:\Program Files (x86)\DHI\2016\bin\x64

The batch file can contain Extraction and Postprocessing steps from multiple water balance utility files.

An example is shown below of a batch file that generates water balance data for three postprocessing steps, using a water balance utility file named WaterConservationAreas.WBL.

rem -------------------------------------------

MSHE_Wbl_Ex.exe WaterConservationAreas.WBL

MSHE_Wbl_Post.exe WaterConservationAreas.WBL 1

MSHE_Wbl_Post.exe WaterConservationAreas.WBL 2

MSHE_Wbl_Post.exe WaterConservationAreas.WBL 3