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 filedx (
Union[int,float]) – grid spacing in the x-direction, in metresdy (
Union[int,float]) – grid spacing in the y-direction, in metresx0 (
Union[int,float]) – minimum x-value, in metres, defaults to0x1 (
Union[int,float]) – maximum x-value, in metres, defaults to18y0 (
Union[int,float]) – minimum y-value, in metres, defaults to1y1 (
Union[int,float]) – maximum y-value, in metres, defaults to5
- Return type:
- 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 asD3D.grdandD3D.enc, and and return the range of the grid indices (mxn).- Parameters:
path (
Union[str,Path]) – destination path for the grid filedx (
Union[int,float]) – grid spacing in the x-direction, in metresdy (
Union[int,float]) – grid spacing in the y-direction, in metresx0 (
Union[int,float]) – minimum x-value, in metres, defaults to0x1 (
Union[int,float]) – maximum x-value, in metres, defaults to18y0 (
Union[int,float]) – minimum y-value, in metres, defaults to1y1 (
Union[int,float]) – maximum y-value, in metres, defaults to5
- Return type:
- Returns:
Returns a dictionary with the following keys:
'm0': lowest index in themdirection'm1': highest index in themdirection'n0': lowest index in thendirection'n1': highest index in thendirection