Handling missing dates

By default, the package will raise an error if there are missing dates.

Missing dates can be handled by specifying a list of dates in the configuration file. The dates should be in the same format as the dates in the time series. The missing dates will be filled np.nan values.

dates:
  start: 2017-01-01 00:00:00
  end: 2017-01-31 23:00:00
  frequency: 1h

  missing:
  - 2017-01-02 00:00:00
  - 2017-01-03 00:00:00

Anemoi will ignore the missing dates when computing the statistics.

You can retrieve the list indices corresponding to the missing dates by accessing the missing attribute of the dataset object.

print(ds.missing)

If you access a missing index, the dataset will throw a MissingDateError.