You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Once the model has been calibrated (i.e. that the best fit of the calibration process has been found), the only work left is exporting all the relevant results to external files which can be then shared with other modelers or used by third party software.

To begin with, we can export a summary of the calibration process, containing the parameter values which have been used and the goodness of the fit which was obtained with them.

Export list with calibration summary to csv file
 ExportListToCsvFile(rootPath + r"\calibration.csv", listCalibration, ["BC value", "Roughness", "Average deviation"], delimiterChar = ",")

You can also export the time series corresponding to the results of the best fit.

Export single time series to a csv file
 ExportListToCsvFile(rootPath + r"\bestFit.csv", timeSeriesToCompare[indexBestFit], ["Time", "Water level at Gauging station"])

You can also export all the time series found during the calibration to different respective files, indicating which one is the best fit.

Export multiple time series to multiple files
index = 0
for ts in timeSeriesToCompare:
    if index == 0:
        flag = " Initial set up "
    elif index == indexBestFit:
        flag = " best fit "
    else:
        flag = " "

    fileName = rootPath + r"\Water Level at Gauging Station case " + str(index) + flag + ".csv"
    ExportListToCsvFile(fileName, ts, ["Time", "Water level at Gauging station"], ",")
    index += 1

Finally, also the plots produced during the calibration process can be saved to external image files. For example:

Export figures as image files
  chartCalibration.ExportAsImage(rootPath + r"\Calibration.png",1250,650)

 

 

  • No labels