Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagepy
titleCreate a list containing the already known time series
# Save measurements and initial model results in a list of time series to compare 

timeSeriesToCompare = [measuredTimeSeries, waterlevelResults]

 

 

The model calibration will be done by changing the less reliable parameters from the loaded model. Let’s assume that these factors are the flow boundary condition at the node Boxbergen, and the roughness of the main tributaries leading to Zwolle:

...

The boundary conditions are not known yet in the scripting environment as variables. The complete name of the flow boundary condition at Boxbergen is, as shown in the previous figure, composed by the name of the location and the current value (Boxbergen - Q:25.064 m^3/s). However, the function GetBoundaryDataByName defined in API library SobekWaterFlowFunctions already takes this into account, so you don't have to worry about it. Assign the name of the boundary condition to a new variable bcCalibrationName. Then use that string to assign the Boundary data object to the variable bcCalibration. boundary data object corresponding to the B.C. Boxbergen to the variable bcCalibration. Also, we assume that this parameters could have a value between 8 and 12 m3/s. Create therefore a list containing the cases in thatrange of variation:

Code Block
languagepy
titleFirst parameter used in the calibration: B.C. at Boxbergen
# Selection of parameters used for calibration and their range of variation
bcCalibration = GetBoundaryDataByName(flowModel, "Boxbergen")
rangeBC = [8, 10, 12]

The other parameter that will be used to calibrate the model is the roughness of the main cross section type. We will assume that this parameter can change from 24 to 34 m1/3 s-1 in steps of 2, so a total of 6 different cases.

Code Block
languagepy
titleSecond parameter used in the calibration: roughness
 roughnessMain = GetItemByName(flowModel.RoughnessSections, "Main").RoughnessNetworkCoverage
rangeRoughness = [24, 26, 28, 30, 32, 34] 

 

The property Flow of this object contains the current numeric value of this constant flow boundary. We will save this number in the variable bcInitialValue.

...