Dit notebook toont de workflow om df_stats_minima op te bouwen met de functies uit gwdi_reference_stats.
Voor GWDI wordt df_stats_minimavooraf berekend op basis van historische klimaatreeksen en opgeloste Pastas-modellen.
Die tabel wordt daarna gebruikt tijdens inference in GwdiModel voor de frequentie-naar-hoogte interpolatie per locatie.
Draai deze workflow opnieuw wanneer één van onderstaande inputs wijzigt:
referentie-klimaatreeksen (neerslag/verdamping),
locatieconfiguratie (location, position),
Pastas-modelset,
gekozen referentieperiode.
Het resultaat (bijvoorbeeld df_stats_minima.csv) hoort vervolgens als expliciete DataAdapter-input in GWDI-configuratie te staan.
Achtereenvolgens worden de volgende acties getoond: 1. Ruwe klimaatbestanden inlezen naar dataframes. 2. Klimaat voorbereiden met prepare_reference_climate(...) (naar m/dag en referentieperiode). 3. Locatie-info en Pastas-modellen laden en mappen op locatie. 4. compute_df_stats_minima(...) uitvoeren en optioneel wegschrijven.
from pathlib import Pathimport pandas as pdimport pastas as psfrom toolbox_continu_inzicht.base.adapters.input.pastas_models import ( input_pastas_models,)from toolbox_continu_inzicht.gwdi.processing.gwdi_reference_stats import ( compute_df_stats_minima, prepare_reference_climate,)
DeprecationWarning: As of Pastas 1.5, no noisemodel is added to the pastas Model class by default anymore. To solve your model using a noisemodel, you have to explicitly add a noisemodel to your model before solving. For more information, and how to adapt your code, please see this issue on GitHub: https://github.com/pastas/pastas/issues/735
Invoer: - df_precipitation_regions: datetime-index + kolom prec_R-R (of andere regio-kolom), waarden in mm. - df_evaporation: datetime-index + kolom makkink, waarden in mm. - info_locaties: kolommen location en position. - Pastas-modellen: keys in vorm {location}_{position}_tarso.
Uitvoer: - df_stats_minima met herhalingstijden als index (1, 3, 10, 30, 100, 300, 1000) en locaties als kolommen.
# Gebruik lokale voorbeelddata in deze notebook-map.data_dir = Path.cwd() /"data_sets"/"104.gwdi_reference_stats"shared_dir = Path.cwd() /"data_sets"/"10.gwdi_simple_calculation"path_precipitation = data_dir /"reference_precipitation_regions.csv"path_evaporation = data_dir /"reference_evaporation.csv"path_info = shared_dir /"gwdi_pastas_mapping.csv"path_models = shared_dir /"pastas_models"output_path = shared_dir /"df_stats_minima.csv"
The solver object is stored in the model.solver attribute since Pastas 1.3. Please update your pas-file to the new format by loading and saving the file with Pastas 1.3.
The solver object is stored in the model.solver attribute since Pastas 1.3. Please update your pas-file to the new format by loading and saving the file with Pastas 1.3.
The solver object is stored in the model.solver attribute since Pastas 1.3. Please update your pas-file to the new format by loading and saving the file with Pastas 1.3.
The solver object is stored in the model.solver attribute since Pastas 1.3. Please update your pas-file to the new format by loading and saving the file with Pastas 1.3.
The solver object is stored in the model.solver attribute since Pastas 1.3. Please update your pas-file to the new format by loading and saving the file with Pastas 1.3.
The stress of the stressmodel has no overlap with ml.oseries.
The stress of the stressmodel has no overlap with ml.oseries.
The stress of the stressmodel has no overlap with ml.oseries.