User Guide#

This user guide is example based, and should give you an idea how to accomplish common tasks.

Information on specific methods and classes can be found in the API Reference.

There are a few tutorials available as Jupyter Notebooks, which are embedded here. You can use Binder to run these notebooks interactively (loading can take a while). There are also example scripts available with more specific applications. The pdf slides contain an overview of dfm_tools information, features and examples.

dfm_tools is built on top of other well documentated packages like xarray, xugrid, pandas, geopandas and HYDROLIB-core. Checking the type() of a variable will help to find the relevant documentation.

For pre-processing (e.g. the modelbuilder), the focus is often on data conversion. Raw data is being read with pandas, geopdandas or xarray, then processed (e.g. interpolated) and then written to model input files with xarray or HYDROLIB-core. For mesh generation, the MeshKernelPy package is used.

For post-processing, the main sources of information are xarray and xugrid. For instance, the function dfmt.open_partitioned_dataset() returns a variable of type xugrid.UgridDataset. The xugrid user guide contains many useful examples. The xugrid package in its turn wraps the underlying data as xarray datasets. This is a powerful package for lazy loading netcdf data (among others) and performing delayed operations on them. If you are unfamiliar with it, please read the xarray in 45 minutes tutorial.