rwgen.WeatherModel.preprocess
- WeatherModel.preprocess(max_buffer=150.0, min_points=5, use_neighbours=True, neighbour_radius=20.0, calculation_period=(1991, 2020), completeness_threshold=33.0)
Read and transform reference series in preparation for model fitting.
- Parameters:
max_buffer (int or float) – Maximum distance (km) to look away from domain edges for weather stations. Defaults to 150km.
min_points (int) – Minimum number of weather stations required for spatial model. Defaults to 5.
use_neighbours (bool) – Flag to use neighbouring precipitation record to infill wet/dry state series for above weather station (i.e. if precipitation data wholly or partly missing). Default is True.
neighbour_radius (int or float) – Maximum distance for using a neighbouring gauge to infill wet/dry state for a weather station (i.e. if precipitation data missing). Defaults to 20km.
calculation_period (list or tuple) – Start and end year for calculating reference statistics. Defaults to
(1991, 2020)
.completeness_threshold (int or float) – Percentage completeness threshold for using a reference weather series (default of 33%).