snl_d3d_cec_verify.grid package

snl_d3d_cec_verify.grid.write_fm_rectangle(path, dx, dy, x0=0, x1=18, y0=1, y1=5)

Create a rectangular Delft3D flexible mesh grid, in a rectangular domain (x0, y0, x1, y1), and save to the given path, in netCDF format.

Parameters:
  • path (Union[str, Path]) – destination path for the grid file

  • dx (Union[int, float]) – grid spacing in the x-direction, in metres

  • dy (Union[int, float]) – grid spacing in the y-direction, in metres

  • x0 (Union[int, float]) – minimum x-value, in metres, defaults to 0

  • x1 (Union[int, float]) – maximum x-value, in metres, defaults to 18

  • y0 (Union[int, float]) – minimum y-value, in metres, defaults to 1

  • y1 (Union[int, float]) – maximum y-value, in metres, defaults to 5

Return type:

Dict[str, Any]

snl_d3d_cec_verify.grid.write_structured_rectangle(path, dx, dy, x0=0, x1=18, y0=1, y1=5)

Create a rectangular Delft3D structured mesh grid, in a rectangular domain (x0, y0, x1, y1), with discharge and water level boundaries, save to the given path as D3D.grd and D3D.enc, and and return the range of the grid indices (m x n).

Parameters:
  • path (Union[str, Path]) – destination path for the grid file

  • dx (Union[int, float]) – grid spacing in the x-direction, in metres

  • dy (Union[int, float]) – grid spacing in the y-direction, in metres

  • x0 (Union[int, float]) – minimum x-value, in metres, defaults to 0

  • x1 (Union[int, float]) – maximum x-value, in metres, defaults to 18

  • y0 (Union[int, float]) – minimum y-value, in metres, defaults to 1

  • y1 (Union[int, float]) – maximum y-value, in metres, defaults to 5

Return type:

Dict[str, Any]

Returns:

Returns a dictionary with the following keys:

  • 'm0': lowest index in the m direction

  • 'm1': highest index in the m direction

  • 'n0': lowest index in the n direction

  • 'n1': highest index in the n direction