metobs_toolkit.gap.Gap#

class Gap(gaprecords: DatetimeIndex, obstype: Obstype, stationname: str)[source]#

Represents a gap in observational data for a specific station and observation type.

Parameters:
  • gaprecords (pd.DatetimeIndex) – The datetime index representing the gap records.

  • obstype (Obstype) – The type of observation (e.g., temperature, humidity).

  • stationname (str) – The name of the station where the gap occurred.

__init__(gaprecords: DatetimeIndex, obstype: Obstype, stationname: str)[source]#

Initialize a Gap object.

Methods

__init__(gaprecords, obstype, stationname)

Initialize a Gap object.

debiased_model_gapfill(sensordata, ...[, ...])

Fill the gaps using model data corrected for the bias.

diurnal_debiased_model_gapfill(sensordata, ...)

Fill the gaps using model data corrected for the diurnal bias.

flag_can_be_filled([overwrite])

Determine if the gap can be filled.

flush_fill()

Clear all fill information for this gap.

get_info([printout])

Print or return detailed information about the Gap.

interpolate(sensordata[, method, ...])

Fill the gap using interpolation of SensorData.

raw_model_gapfill(modeltimeseries[, ...])

Fill the gap using model data without correction.

test_if_gf_is_suitable_with_gapsize(max_gapsize)

Check whether the gap duration is within the allowed limit for gap-filling.

weighted_diurnal_debiased_model_gapfill(...)

Fill the gaps using a weighted sum of model data corrected for the diurnal bias and weights with respect to the start of the gap.

Attributes

df

Gap DataFrame constructor.

end_datetime

Return the end datetime of the gap.

fillsettings

Return the settings used for filling the gap.

fillstatus

Returns the fill status of the gap.

obstype

Return the observation type.

records

Return the records of the gap.

start_datetime

Return the start datetime of the gap.

stationname

Return the station name.