You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug pysat.utils.time.create_datetime_index assumes that input files are in order. This is not always the case and can result in files being mislabeled as later years.
To Reproduce
import numpy as np
import pysat
year = np.array([2014, 2014, 2008])
day = np.array([1, 2, 365])
uts = np.array([0, 3600, 2700])
pysat.utils.time.create_datetime_index(year=year, day=day, uts=uts)
Expected behavior
This should produce an index corresponding to the three years. Instead, the final date is labeled as '2014-12-31 00:45:00' instead of '2008-12-31 00:45:00'
Describe the bug
pysat.utils.time.create_datetime_index
assumes that input files are in order. This is not always the case and can result in files being mislabeled as later years.To Reproduce
Expected behavior
This should produce an index corresponding to the three years. Instead, the final date is labeled as '2014-12-31 00:45:00' instead of '2008-12-31 00:45:00'
Screenshots
This area seems to be the culprit:
pysat/pysat/utils/time.py
Lines 316 to 318 in 6374f84
Desktop (please complete the following information):
Additional context
See pysat/pysatCDAAC#24 for context
The text was updated successfully, but these errors were encountered: