...
The kernel of the calibration algorithm then be a double loop with which we will iterate along all possible combinations of the parameters used in the procedure, BC at Boxbergen and roughness Strickler coefficient ks for the default value of the main Main type of cross section roughness. When the parameters have been updated, then model should be run. Then, the results at the gauging station will be retrieved, and the deviation of these results with respect to the data calculated. The list containing the calibration parameters values and the goodness of the corresponding fit will be added to listCalibration. Finally, the entire time series of the results will also be added to the corresponding list timeSeriesToCompare. This last variable can be used, for example, in case we decide to change the threshold for which the model is considered to be warming up, and therefore, the results should be neglected, without having to run all the simulations one more time (since this process can be very time-consuming).
Code Block | ||||
---|---|---|---|---|
| ||||
# Main calibration loop for bcValue in rangeBC: # Adjust boundary condition value bcCalibration.Flow = bcValue for roughnessValue in rangeRoughness: # Adjust default roughness value for roughness section Main roughnessMain.DefaultValue = roughnessValue RunModel(flowModel, showDialog=True) # Add deviation of results of current run with respect to measurements calibResults = GetTimeSeriesFromWaterFlowModel(flowModel, calculationPoint, "Water level") deviation = GetAverageDeviation(measuredTimeSeries, calibResults, startAt = warmUpTimeSteps) listCalibration.append([bcValue, roughnessValue, deviation]) # Add timeseries to timeSeriesToCompare list timeSeriesToCompare.append(calibResults) |
...