metobs_toolkit.gap.Gap.raw_model_gapfill#
- Gap.raw_model_gapfill(modeltimeseries: ModelTimeSeries, max_gap_duration_to_fill: Timedelta = Timedelta('0 days 12:00:00'), min_value=None, max_value=None) None[source]#
Fill the gap using model data without correction.
This method fills the gap by directly interpolating the model data to the missing records.
- Parameters:
modeltimeseries (ModelTimeSeries) – The model time series used to fill the gap records. The model data must be compatible (equivalent obstype and related to the same Station as the gap.)
max_gap_duration_to_fill (pandas.Timedelta, optional) – The maximum gap duration of to fill with interpolation. The result is independent on the time-resolution of the gap. Defaults to 12 hours.
min_value (float, optional) – Minimum allowed value for filled data. If provided, filled values below this threshold will be clipped to this value. Default is None (no minimum limit).
max_value (float, optional) – Maximum allowed value for filled data. If provided, filled values above this threshold will be clipped to this value. Default is None (no maximum limit).
- Return type:
None
Notes
A schematic description of the raw model data gap fill:
Check the compatibility of the ModelTimeSeries with the gap.
Ensure both the ModelTimeSeries and gap have the same timezone.
Interpolate the model data to match the missing records in the gap.
Clip filled values to the range [min_value, max_value] if specified.
Update the gap attributes with the interpolated values, labels, and details.