tilupy.models.ravaflow.initsimus ================================ .. py:module:: tilupy.models.ravaflow.initsimus .. autoapi-nested-parse:: Created on Wed May 26 11:03:56 2021 @author: peruzzetto Attributes ---------- .. autoapisummary:: tilupy.models.ravaflow.initsimus.readme_param_match Functions --------- .. autoapisummary:: tilupy.models.ravaflow.initsimus.readme_to_params tilupy.models.ravaflow.initsimus.write_params tilupy.models.ravaflow.initsimus.make_simus Module Contents --------------- Attributes ^^^^^^^^^^ .. py:data:: readme_param_match Functions ^^^^^^^^^ .. py:function:: readme_to_params(folder_data: str) -> dict Read a README.txt file and convert it to a parameters dictionary. Each line of the README file should contain a key and a value separated by whitespace. The function parses the file and returns a dictionary mapping keys to their corresponding string values. :param folder_data: Path to the folder containing the README.txt file. :type folder_data: str :returns: Dictionary where keys are parameter names (str) and values are their corresponding values (str) read from the file. :rtype: dict .. py:function:: write_params(params: dict) -> str Convert a parameters dictionary to a formatted string for RavaFlow input. Generates a single string in the form "key1=val1 key2=val2 ...", suitable for passing as command-line arguments to RavaFlow. :param params: Dictionary of parameters, where keys and values are strings. :type params: dict :returns: Formatted string containing all parameters in "key=value" format, separated by spaces. :rtype: str .. py:function:: make_simus(law: str, rheol_params: dict, folder_files: str, folder_out: str, readme_file: str) -> None Write ravaflow initial file for simple slope test case Reads simulation parameters from a README file and input ASCII rasters, sets topography and mass, prepares numerical and rheological parameters, and generates a shell script to execute simulations. Supports multiple combinations of rheology parameters. :param law: Rheological law to use, e.g., "coulomb" or "voellmy". :type law: str :param rheol_params: Dictionary of rheology parameters, each key maps to a list of values defining multiple simulation runs. :type rheol_params: dict of list :param folder_files: Path to folder containing input ASCII files "topo.asc" and "mass.asc". :type folder_files: str :param folder_out: Path to the folder where output simulation folders and run scripts will be created. :type folder_out: str :param readme_file: Path to the README.txt file containing simulation metadata and parameters. :type readme_file: str :rtype: None