Posted Fri, 18 Apr 2014 19:17:05 GMT by Julia Glenday
I am trying to use the AutoCal tool to do a sensitivity analysis and then parameter observation on a MIKE SHE model.

I have divided my model area into several subcatchments and I have not specified a river so the OLF and SZ outflow from interflow and baseflow reservoirs just leaves the model as net outflow in the timestep. (I'm trying to keep things simple to start with and then add in elements)

The observed data I have to work with is total outflow volume per month.

I am having two problems:

1. When I go into the AutoCal tool to specify the Output file and item for comparison to the observed, the only output options I get are outflows for each subcatchment. How do I get a total for all the subcatchments as a variable I can calibrate against?

2. My observed data is monthly. I can change the output specifications in the .she file, but the output time steps must be in hours. Is there a way to actually do it by month or do I just need to do the average number of hours in a month and know that some months will be off...

The Toolbox didn't seem to have a place to just write a script to do this (sum subcatchment output and make it monthly) that I could add to the AutoCal simulation sequence, but I couldn't find any tool that allowed me to do that.

What would you suggest?

Thanks for your help!
Posted Tue, 22 Apr 2014 07:48:21 GMT by Oluf Jessen
Hi Julia
This is an interesting issue and I have some suggestions but there might be better solutions from others.

1. As you don’t have a river in your setup you don’t have the option of selecting the total outflows from all the catchments. There are two solutions:
              a. Include a river in your setup (MIKE 11 model). The river should receive the outflow from all the catchments and the most downstream node would then contain the total flow (make a detailed timeseries output for this node). Use a routing method and a very low leakage coefficient if you don’t want to lose any water from leakage from the stream (adjust the parameter if that’s the case). Adjust the routing parameters to include any time lag between the outflows from the different catchments.
            b. Make a small script (C# code) that is executed by AutoCal just after the MIKE SHE simulation is done. The tool should read the flow from each of the sub-catchments (from the MIKE SHE result file) and sum the values into a new time series file. The new time series file (dfs0) should then be used in AutoCal for the simulated values. For help making the code please look into the software development kit (SDK) which comes with the 2014 version. It includes examples of how to make a tool for reading and writing dfs files.

2. You are correct that there is not an option for monthly results, and using the hours is not a good option especially if you have a long simulation. I would recommend keeping your results in daily time steps and making a tool for converting the simulation results to monthly before doing the stat.

I hope this helps you on the way, but there might be other users with better suggestions.
Best regards
Oluf (DHI)
Posted Wed, 23 Apr 2014 18:16:06 GMT by Julia Glenday
Thanks Oluf!
I will try adding a river and writing a code to accumulate model output to monthly.

As a related question, I have been getting an error message trying to run AutoCal that says "model run error"

The model set-up runs fine outside of AutoCal.

When I go into the AutoCal log, I get the following:

"AUTOCAL simulation:

Simulation option:  Sensitivity analysis
Algorithm:          Local sensitivity analysis

Evaluation of parameter set No. 1 initiated
Evaluation of parameter set No. 2 initiated
Evaluation of parameter set No. 1 completed: FAILED - model run error

Error: Unable to continue. No of failed simulations too high. "

However when I go into the individual "Model_Process1" etc folders and look at the MIKE-SHE logs it says that the WM model terminated normally.
Do you have any suggestions for where else to look for the problem?

Thanks for your help!
Posted Fri, 25 Apr 2014 14:14:47 GMT by Oluf Jessen

The error message basically tells you that AutoCal was not able to calculate the statistics from the model. There could be a number of reasons, and the first issue would be to verify that the model terminates correctly. I would recommend you to first try and execute the model in the “Model_Process1” folder without using AutoCal to make sure that it terminates correctly, and that it is not executed with an error. Next make sure that it generates the dfs0 files that you are using to calculate the statistic, and that the files contains actual values.
If this works then look inside the log files from AutoCal and evaluate if it calculates the objectives or if some of the values are Nan. If it still gives problems I would recommend you to contact the support at as they would be able to debug the error.

Oluf (DHI)
Posted Tue, 05 Jan 2021 23:16:36 GMT by Spencer Whitman Grad Student
Is there any way to set up AUTOCAL such that one does not have to re-run the Setup_Process_n models to diagnose failed simulations?

e.g. write last few lines of a log file to AutoCalSimErr.dat or something like this?

I have gone through the manuals and not found much.

You must be signed in to post in this forum.