tilupy.make_topo
Functions
|
Construct channel as in Gray et all 99. |
|
Generate channel with potential multiple bends. |
Module Contents
Functions
- tilupy.make_topo.gray99(nx: int = None, ny: int = None, dx: float = 0.01, dy: float = 0.01, xmin: float = -0.4, x1: float = 1.75, x2: float = 2.15, xmax: float = 3.2, ymax: float = 0.6, R: float = 1.1, theta1: float = 40, theta2: float = 0, maxz: float = None, plot: bool = False) list[numpy.ndarray]
Construct channel as in Gray et all 99.
Input coordinates are in curvilinear coordinates along the reference topography following the channel bottom. Output coordinates are in the fixed cartesian frame.
- Parameters:
nx (int) – Size of the grid in x direction.
ny (int) – Size of the grid in y direction.
dx (float, optional) – Cell size of the x axis. if specified, nx is recomputed. By default 0.01.
dy (float, optional) – Cell size of the y axis. if specified, ny is recomputed. By default 0.01.
xmin (float, optional) – Minimum x coordinate, by default -0.4.
x1 (float, optional) – Min coordinate of the channel outlet (transition zone), by default 1.75.
x2 (float, optional) – Max coordinate of the channel outlet (transition zone), by default 2.15.
xmax (float, optional) – Maximum x coordinate, by default 3.2.
ymax (float, optional) – Maximum y coordinate, the final y axis spans from -ymax to ymax, by default 0.5.
R (float, optional) – Radius of curvature of the channel, by default 1.1.
theta1 (float, optional) – Slope of the channel in degree, by default 40.
theta2 (float, optional) – Slope after the channel, by default 0.
maxz (float, optional) – Maximum z coordinate, by default None.
plot (bool, optional) – Plot result, by default False.
- Returns:
- Xoutnumpy.ndarray
Mesh of X coordinates in the cartesian frame (nx*ny).
- Youtnumpy.ndarray
Mesh of Y coordinates in the cartesian frame (nx*ny).
- Zoutnumpy.ndarray
Mesh of Z coordinates in the cartesian frame (nx*ny).
- Return type:
list[numpy.ndarray, numpy.ndarray, numpy.ndarray]
- tilupy.make_topo.channel(nx: int = None, ny: int = None, dx: float = None, dy: float = None, xmin: float = -0.4, xmax: float = 3.6, ymax: float = 0.5, xstart_channel: float = 0.65, xend_channel: float = 2.3, xstart_trans: float = 0.4, xend_trans: float = 2.75, R: float = 1.1, bend: float = 0.2, nbends: int = 1, theta_start: float = 40, theta_channel: float = 40, theta_end: float = 0, plot: bool = False, maxh: float = None, interp_method: str = 'linear') list[numpy.ndarray]
Generate channel with potential multiple bends.
Input coordinates are curvilinear along the flattened topography.
- Parameters:
nx (int, optinal) – Size of the grid in x direction, by default None.
ny (int, optinal) – Size of the grid in y direction, by default None.
dx (float, optional) – Cell size of the x axis. if specified, nx is recomputed, by default 0.01.
dy (float, optional) – Cell size of the y axis. if specified, ny is recomputed, by default 0.01.
xmin (float, optional) – Minimum x coordinate, by default -0.4.
xmax (float, optional) – Maximum x coordinate, by default 3.2.
ymax (float, optional) – Maximum y coordinate, the final y axis spans from -ymax to ymax, by default 0.5.
xstart_channel (float, optional) – Start of the channel, by default 0.65.
xend_channel (float, optional) – End of the channel, by default 2.3.
xstart_trans (float, optional) – Start of the transition zone before the channel start, by default 0.4.
xend_trans (float, optional) – End of the transition zone after the channel end, by default 2.75.
R (float, optional) – Radius of curvature of the channel, by default 1.1.
bend (float, optional) – Width of the channel bend, by default 0.2.
nbends (ind, optional) – Number of bends, by default 1.
theta_start (float, optional) – Slope before the channel, by default 40.
theta_channel (float, optional) – Slope of the channel, by default 40.
theta_end (float, optional) – Slope after the channel, by default 0.
plot (bool, optional) – Plot generated topography, by default False.
maxh (float, optional) – Depth of the channel, by default None.
interp_method (string, optional) – Interpolation method for converting the topography from curvilinear coordinates to cartesian coordinates, by default ‘linear’.
- Returns:
- Xoutnumpy.ndarray
Mesh of X coordinates in the cartesian frame (nx*ny).
- Youtnumpy.ndarray
Mesh of Y coordinates in the cartesian frame (nx*ny).
- Zoutnumpy.ndarray
Mesh of Z coordinates in the cartesian frame (nx*ny).
thalweg : numpy.ndarray
- Return type:
list[numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray]