tilupy.models.saval2D.read ========================== .. py:module:: tilupy.models.saval2D.read Attributes ---------- .. autoapisummary:: tilupy.models.saval2D.read.AVAILABLE_OUTPUT Functions --------- .. autoapisummary:: tilupy.models.saval2D.read.extract_saval_ascii Classes ------- .. autoapisummary:: tilupy.models.saval2D.read.Results Module Contents --------------- Attributes ^^^^^^^^^^ .. py:data:: AVAILABLE_OUTPUT :value: ['h', 'hvert', 'u', 'hu', 'hu2', 'ux', 'uy', 'hux', 'huy'] All output available for a shaltop simulation. Implemented states: - h : Flow thickness (normal to the surface) - hux : Momentum flux component in X direction - huy : Momentum flux component in Y direction Output computed from other output: - hvert : True vertical flow thickness - ux : Velocity component in X direction - uy : Velocity component in Y direction - u : Norm of the velocity (from ux and uy) - hu : Momentum flux (from h and u) - hu2 : Convective momentum flux (from h and u) Functions ^^^^^^^^^ .. py:function:: extract_saval_ascii(path: str) -> numpy.ndarray Extract ascii file data generated by saval2D. :param path: Path to the ascii file. :type path: str :returns: Values in the ascii file. :rtype: numpy.ndarray Classes ^^^^^^^ .. py:class:: Results(folder, raster_topo='mntsimulation.asc') Bases: :py:obj:`tilupy.read.Results` Results of saval2D simulations. This class is the results class for saval2D. Reading results from saval2D outputs are done in this class. This class has all the global and quick attributes of the parent class. The quick attributes are only computed if needed and can be deleted to clean memory. In addition to these attributes, there are those necessary for the operation of reading the saval2D results. :param folder: Path to the folder containing the simulation files. :type folder: str :param raster_topo: Topographic raster name. :type raster_topo: str .. attribute:: _simu_inputs Path to the input folder of saval2D simulation. :type: str .. attribute:: _simu_outputs Path to the output folder of saval2D simulation. :type: str .. attribute:: _raster Raster file name. :type: str .. attribute:: _params Dictionary storing all simulation parameters. :type: dict .. py:method:: get_rheological_parameters(path_to_log: str) -> list[str] Get rheological parameters of a saval2D simulation. :param path_to_log: Path to the log file containing the value of the rheological parameters. :type path_to_log: str :returns: List of rheological parameters : tau/rho, mu and xi. :rtype: list[str] .. py:method:: get_times(path: str) -> list[float] Get simulation time steps. :param path: Path to the log file. :type path: str :returns: List of recorded time steps. :rtype: list[float]