tilupy.initdata =============== .. py:module:: tilupy.initdata Functions --------- .. autoapisummary:: tilupy.initdata.create_topo_constant_slope tilupy.initdata.gray99_topo_mass Module Contents --------------- Functions ^^^^^^^^^ .. py:function:: create_topo_constant_slope(folder_out: str, xmax: int = 30, ymax: int = 25, cell_size: float = 0.5, theta: int = 5, mass_type: str = 'r', r_center: tuple = (7.5, 12.5), r_radius: tuple = (3.75, 3.75), s_vertex: list = [0, 5, 0, 25], h_max: float = 3.75, description: str = 'No informations.') -> list[str, numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray] Generates a synthetic topography and initial mass, saves them as ASCII files, and stores all configuration parameters in a dedicated folder. :param folder_out: Output folder. :type folder_out: str :param xmax: Domain length in the X direction (in meters). :type xmax: int :param ymax: Domain length in the Y direction (in meters). :type ymax: int :param cell_size: Spatial resolution of the grid (in meters). :type cell_size: float :param theta: Slope angle of the topography (in degrees). :type theta: int :param mass_type: Shape of the initial mass: 'r' for ellipse, 's' for rectangle. :type mass_type: str :param r_center: Center (x, y) of the elliptical initial mass. :type r_center: tuple :param r_radius: Radii (rx, ry) of the elliptical initial mass. :type r_radius: tuple :param s_vertex: Rectangle boundaries [xmin, xmax, ymin, ymax] for the rectangular mass. :type s_vertex: list :param h_max: Maximum height of the initial mass. :type h_max: float :param description: Text description of the configuration. :type description: str :returns: folder_path : str Absolute path to the output directory. x, y : numpy.ndarray, numpy.ndarray Meshgrid coordinates. z : numpy.ndarray Topography data. m : numpy.ndarray Initial mass distribution. :rtype: list[str, numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray] .. py:function:: gray99_topo_mass(dx: float = 0.1, dy: float = 0.1, res_type: str = 'true_normal') -> list[numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray] Create Gray99 topographic and mass test. Create an initial spherical calotte above the topography, resulting as a mass with a height of 0.22 m and a radius of 0.32 m (more precisely it is the length in the downslope direction), following the indications in Gray et al 99 (p. 1859). The correspondig radius of the sphere, and the offset from the topography in the topography normal direction (norm_offset) are deduced from these parameters. See also Gig 3 in Wieland, Gray and Hutter (1999) :param dx: Cell size of the x axis, by default 0.1 :type dx: float, optional :param dy: Cell size of the y axis, by default 0.1 :type dy: float, optional :param res_type: Type of thickness output: - 'true_normal': Real thickness in the direction normal to the topography. - 'vertical': Thickness in the vertical direction. - 'projected_normal': Thickness normal to the topography is computed from the vertical thickness projected on the axe normal to the topography. The default is 'true_normal'. :type res_type: str, optional :returns: X : numpy.ndarray Mesh of X coordinates in the cartesian frame (nx*ny). Y : numpy.ndarray Mesh of Y coordinates in the cartesian frame (nx*ny). Z : numpy.ndarray Mesh of Z coordinates in the cartesian frame (nx*ny). M : numpy.ndarray Array of mass height, in the direction normal to topography. :rtype: list[numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray]