wolfhece.wolf_array._mnap ========================= .. py:module:: wolfhece.wolf_array._mnap .. autoapi-nested-parse:: WolfArrayMNAP - MNAP mesh array class for WOLF2D simulations. Extracted from wolf_array.py for modularity. Author: HECE - University of Liege, Pierre Archambeau Date: 2024 Copyright (c) 2024 University of Liege. All rights reserved. This script and its content are protected by copyright law. Unauthorized copying or distribution of this file, via any medium, is strictly prohibited. Module Contents --------------- .. py:function:: split_floatstring_from_FORTRAN(value: str) -> list[str] Useful for reading MNAP files written by the FORTRAN executable from old simulations. If the string contains two floats, returns a list where the input is split into two strings. Otherwise, returns a list with the original string as the only element. !!! A list is returned to handle potential cases in the future where the second float might be needed. :param value: Input string potentially containing two floats concatenated. :return: List of strings after splitting. .. py:class:: WolfArrayMNAP(fname=None, mold=None, masknull=True, crop=None) Bases: :py:obj:`wolfhece.wolf_array._mb.WolfArrayMB` .. autoapi-inheritance-diagram:: wolfhece.wolf_array._mnap.WolfArrayMNAP :parts: 1 :private-bases: Matrice MNAP d'une modélisation WOLF2D Elle contient toutes les informations de maillage en Multi-blocks ainsi que les relations de voisinage de blocs. Surcharge de WolfArrayMB avec modification des opérations de lecture/écriture car le fichier est au format TEXTE/ASCII et d'une structure spécifique. .. py:attribute:: contour :type: wolfhece.PyVertexvectors.Zones Compute contour lines from this multi-block array. The array is first converted to a single-block :class:`WolfArray` before contouring. :param levels: Number of levels or explicit list of level values. :return: A :class:`Zones` object containing the contour polylines. .. py:method:: write_all() Ecriture de tous les fichiers d'un Wolf array :param newpath: new path and filename with extension -- if None, use the current filename :param EPSG: EPSG code for geotiff .. py:method:: read_data() Read binary block data from :attr:`filename`. Creates :class:`WolfArray` (GUI-enabled) instances for each block. .. py:method:: read_txt_header() Surcharge de la lecture du header Il n'y a pas en tant que tel de header d'un fichier MNAP. Les informations de translation sont dans le fichier ".trl". Les informations de tailles de maille 'fines', Nbx, Nby et coordonnées d'origine sont dans le fichier ".par" .. py:method:: get_one_mask(which: int | str) Return the mask of the block `which` .. py:method:: get_all_masks() Return all masks