tilupy.make_topo ================ .. py:module:: tilupy.make_topo Functions --------- .. autoapisummary:: tilupy.make_topo.gray99 tilupy.make_topo.channel Module Contents --------------- Functions ^^^^^^^^^ .. py:function:: 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. :param nx: Size of the grid in x direction. :type nx: int :param ny: Size of the grid in y direction. :type ny: int :param dx: Cell size of the x axis. if specified, nx is recomputed. By default 0.01. :type dx: float, optional :param dy: Cell size of the y axis. if specified, ny is recomputed. By default 0.01. :type dy: float, optional :param xmin: Minimum x coordinate, by default -0.4. :type xmin: float, optional :param x1: Min coordinate of the channel outlet (transition zone), by default 1.75. :type x1: float, optional :param x2: Max coordinate of the channel outlet (transition zone), by default 2.15. :type x2: float, optional :param xmax: Maximum x coordinate, by default 3.2. :type xmax: float, optional :param ymax: Maximum y coordinate, the final y axis spans from -ymax to ymax, by default 0.5. :type ymax: float, optional :param R: Radius of curvature of the channel, by default 1.1. :type R: float, optional :param theta1: Slope of the channel in degree, by default 40. :type theta1: float, optional :param theta2: Slope after the channel, by default 0. :type theta2: float, optional :param maxz: Maximum z coordinate, by default None. :type maxz: float, optional :param plot: Plot result, by default False. :type plot: bool, optional :returns: Xout : numpy.ndarray Mesh of X coordinates in the cartesian frame (nx*ny). Yout : numpy.ndarray Mesh of Y coordinates in the cartesian frame (nx*ny). Zout : numpy.ndarray Mesh of Z coordinates in the cartesian frame (nx*ny). :rtype: list[numpy.ndarray, numpy.ndarray, numpy.ndarray] .. py:function:: 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. :param nx: Size of the grid in x direction, by default None. :type nx: int, optinal :param ny: Size of the grid in y direction, by default None. :type ny: int, optinal :param dx: Cell size of the x axis. if specified, nx is recomputed, by default 0.01. :type dx: float, optional :param dy: Cell size of the y axis. if specified, ny is recomputed, by default 0.01. :type dy: float, optional :param xmin: Minimum x coordinate, by default -0.4. :type xmin: float, optional :param xmax: Maximum x coordinate, by default 3.2. :type xmax: float, optional :param ymax: Maximum y coordinate, the final y axis spans from -ymax to ymax, by default 0.5. :type ymax: float, optional :param xstart_channel: Start of the channel, by default 0.65. :type xstart_channel: float, optional :param xend_channel: End of the channel, by default 2.3. :type xend_channel: float, optional :param xstart_trans: Start of the transition zone before the channel start, by default 0.4. :type xstart_trans: float, optional :param xend_trans: End of the transition zone after the channel end, by default 2.75. :type xend_trans: float, optional :param R: Radius of curvature of the channel, by default 1.1. :type R: float, optional :param bend: Width of the channel bend, by default 0.2. :type bend: float, optional :param nbends: Number of bends, by default 1. :type nbends: ind, optional :param theta_start: Slope before the channel, by default 40. :type theta_start: float, optional :param theta_channel: Slope of the channel, by default 40. :type theta_channel: float, optional :param theta_end: Slope after the channel, by default 0. :type theta_end: float, optional :param plot: Plot generated topography, by default False. :type plot: bool, optional :param maxh: Depth of the channel, by default None. :type maxh: float, optional :param interp_method: Interpolation method for converting the topography from curvilinear coordinates to cartesian coordinates, by default 'linear'. :type interp_method: string, optional :returns: Xout : numpy.ndarray Mesh of X coordinates in the cartesian frame (nx*ny). Yout : numpy.ndarray Mesh of Y coordinates in the cartesian frame (nx*ny). Zout : numpy.ndarray Mesh of Z coordinates in the cartesian frame (nx*ny). thalweg : numpy.ndarray :rtype: list[numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray]