wolfhece.interpolating_raster
Module Contents
- class wolfhece.interpolating_raster.interpolating_raster[source]
- nullvalue_for_hole(WA)[source]
Sets the null value for a WolfArray to 0 (as per the convention in the interpolation routine).
- export_z_or_v_bin(fn_read, manager, name, type_hazard='z', type_extraction='danger_map', param_danger=[0, -1, 1], threshold: float = 0.01)[source]
Reads the free surface altitude from a GPU simulation and exports it in binary format.
- Parameters:
fn_read_simu (str) – The simulation file to read.
fn_laststep (str) – The folder
EXTRACTED_LAST_STEP
defined in acceptability/INBE.param_danger (list) – The time step to extract the results gpu (in order :) to start / end / every X
fn_write (str) – The path to save the output in binary format.
type_hazard (str) – Either
'z'
for water level only, or'z_v'
for water level and velocity.
- riverbed_trace(fn_read_simu, fn_output, threshold, type_extraction='danger_map')[source]
Recognizes the riverbed trace based on a simulation, where water depth above a given threshold is considered part of the riverbed.
- Parameters:
fn_read_simu (str) – The simulation file to read.
fn_output (str) – The location to save the riverbed trace as a
.tiff
file.threshold (float) – The water depth threshold above which the areas are considered riverbed.
- batch_creation_and_interpolation_fotran_holes(manager, checked_paths: list[pathlib.Path], iftest: bool) tuple[bool, list[str]] [source]
Creates a batch file to launch holes.exe from the selected simulations and launches it.
Every files in EXTRACTED_LAST_STEP are interpolated for tests (iftest==True).
Only the check simulations of the windows are interpolated for the GUI (iftest!=True).
- Parameters:
checked_paths – list of paths to the checked simulations
iftest – boolean to indicate if the function is called from the tests or not
- batch_creation_and_interpolation_python_eikonal(manager, checked_paths: list[pathlib.Path], iftest: bool, ifwd=False) tuple[bool, list[str]] [source]
Creates a batch file to launch holes.exe from the selected simulations and launches it.
Every files in EXTRACTED_LAST_STEP are interpolated for tests (iftest==True).
Only the check simulations of the windows are interpolated for the GUI (iftest!=True).
- Parameters:
checked_paths – list of paths to the checked simulations
iftest – boolean to indicate if the function is called from the tests or not