metobs_toolkit.Dataset.get_gaps_info#

Dataset.get_gaps_info()[source]#

Print out detailed information of the gaps.

Return type:

None.

Examples

>>> import metobs_toolkit
>>>
>>> # Import data into a Dataset
>>> dataset = metobs_toolkit.Dataset()
>>> dataset.update_settings(
...                         input_data_file=metobs_toolkit.demo_datafile,
...                         input_metadata_file=metobs_toolkit.demo_metadatafile,
...                         template_file=metobs_toolkit.demo_template,
...                         )
>>> dataset.import_data_from_file()
>>> dataset.coarsen_time_resolution(freq='1h')
>>>
>>> # Apply quality control on the temperature observations
>>> dataset.apply_quality_control(obstype='temp') #Using the default QC settings
>>>
>>> # Interpret the outliers as missing/gaps
>>> dataset.update_gaps_and_missing_from_outliers(obstype='temp')
>>> dataset
Dataset instance containing:
      *28 stations
      *['temp', 'humidity', 'wind_speed', 'wind_direction'] observation types
      *10080 observation records
      *0 records labeled as outliers
      *2 gaps
      *1473 missing observations
      *records range: 2022-09-01 00:00:00+00:00 --> 2022-09-15 23:00:00+00:00 (total duration:  14 days 23:00:00)
      *time zone of the records: UTC
      *Coordinates are available for all stations.
>>> dataset.get_gaps_info()
Gap for vlinder05 with:
---- Gap info -----
(Note: gaps are defined on the frequency estimation of the native dataset.)
  * Start gap: 2022-09-06 21:00:00+00:00
  * End gap: 2022-09-13 06:00:00+00:00
  * Duration gap: 6 days 09:00:00
---- Gap fill info -----
(No gapfill applied)
Gap for vlinder05 with:
---- Gap info -----
(Note: gaps are defined on the frequency estimation of the native dataset.)
  * Start gap: 2022-09-13 20:00:00+00:00
  * End gap: 2022-09-15 23:00:00+00:00
  * Duration gap: 2 days 03:00:00
---- Gap fill info -----
(No gapfill applied)