pyorc.Velocimetry.to_ugrid#

Velocimetry.to_ugrid(time0: Optional[datetime] = None, title: Optional[str] = None, fill_na: Optional[float] = None) Dataset[source]#

Show the dataset as a UGRID compliant mesh.

This is also compatible with QGIS. Store as netCDF as follows:

>>> ds_ugrid = ds_orig.velocimetry.ugrid.to_netcdf("velocimetry_ugrid.nc")
Parameters:
  • time0 (datetime, optional) – reference time to store in the ugrid dataset (default: None)

  • title (str, optional) – title to store in the ugrid dataset (default: None)

  • fill_na (float, optional) – if set, all np.nan values in the data variables are replaced with this value before parsing ugrid dataset

Returns:

ds_ugrid – dataset in UGRID format, with variables “mesh2d_ucx” and “mesh2d_ucy” for the velocity components, and “s2n” and “corr” for the remaining variables. This can be opened in QGIS and also holds QGIS-compatible metadata of the CRS if the camera configuration has a CRS.

Return type:

xr.Dataset