pypam.utils.reindexing_datetime

pypam.utils.reindexing_datetime(da, first_datetime, last_datetime, freq='10T', tolerance='1D', fill_value=nan)[source]

Reindex the datetime of your data and fill missing values

Parameters:
daxarray DataArray

Data you want to reindex

first_datetimedatetime64

Lower limit of the new datetime index

last_datetimedatetime64

Upper limit of the new datetime index

freqstr

Frequency of values in the new datetime index

tolerancestr

Maximum distance between original and new datetimes for inexact matches

fill_valuescalar

Value to use for newly missing values

Returns:
da_reindexxarray DataArray

Data after reindexing