Usage#

D-Hydro results stored in history files (_his.nc) can be extracted and processed using the provided his(tory file)reader. By default hisreader.py extracts timeseries for all observation points and structures for which output is provided and stores them as individual pandas-compatible csv files. Advanced usage allows the direct processing of the results, e.g. to combine simulated results with measurements and to generate plots for quick inspection of the results.

Import hisreader#

Add hisreader to path and import HisResults

import os
import sys 

currentdir = os.path.dirname(os.getcwd())
sys.path.append(currentdir + "/HydroLogic_Inundation_toolbox/Readers")

from hisreader import HisResults

Load results#

Load example model reults and make a quick plot to inspect the data for a measurement station.

input_path = currentdir + "/HydroLogic_Inundation_toolbox/Data/Tol/input/"
Results = HisResults(inputdir=input_path, outputdir=input_path + r"/csv/")

obj_name = Results.structure_list[0][0]
print(obj_name)
getattr(Results, obj_name).simulated_plot("waterlevel")
Spoor kruising
_images/hisreader_usage_4_1.png