wolfhece.wolf_array._mnap
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
- wolfhece.wolf_array._mnap.split_floatstring_from_FORTRAN(value: str) list[str][source]
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.
- Parameters:
value – Input string potentially containing two floats concatenated.
- Returns:
List of strings after splitting.
- class wolfhece.wolf_array._mnap.WolfArrayMNAP(fname=None, mold=None, masknull=True, crop=None)[source]
Bases:
wolfhece.wolf_array._mb.WolfArrayMB
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.
- contour: wolfhece.PyVertexvectors.Zones[source]
Compute contour lines from this multi-block array.
The array is first converted to a single-block
WolfArraybefore contouring.- Parameters:
levels – Number of levels or explicit list of level values.
- Returns:
A
Zonesobject containing the contour polylines.
- write_all()[source]
Ecriture de tous les fichiers d’un Wolf array
- Parameters:
newpath – new path and filename with extension – if None, use the current filename
EPSG – EPSG code for geotiff
- read_data()[source]
Read binary block data from
filename.Creates
WolfArray(GUI-enabled) instances for each block.