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 to0
x1 (
Union
[int
,float
]) – maximum x-value, in metres, defaults to18
y0 (
Union
[int
,float
]) – minimum y-value, in metres, defaults to1
y1 (
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.grd
andD3D.enc
, and and return the range of the grid indices (m
xn
).- 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 to0
x1 (
Union
[int
,float
]) – maximum x-value, in metres, defaults to18
y0 (
Union
[int
,float
]) – minimum y-value, in metres, defaults to1
y1 (
Union
[int
,float
]) – maximum y-value, in metres, defaults to5
- Return type:
- Returns:
Returns a dictionary with the following keys:
'm0'
: lowest index in them
direction'm1'
: highest index in them
direction'n0'
: lowest index in then
direction'n1'
: highest index in then
direction