-
Notifications
You must be signed in to change notification settings - Fork 298
Closed
Labels
Milestone
Description
If you print a coordinate with a long time unit interval (one of months or years), the time coordinate points are not rendered as datetimes. This is not the case for shorter time unit intervals. For example:
a = np.arange(0, 34, 3)
tc = iris.coords.DimCoord(a, standard_name='time',
units=cf_units.Unit('months since 1970-01-01', calendar='gregorian'))
print(tc)
DimCoord([ 0 3 6 9 12 15 18 21 24 27 30 33], standard_name='time', calendar='gregorian')
tc2 = iris.coords.DimCoord(a, standard_name='time',
units=cf_units.Unit('days since 1970-01-01', calendar='gregorian'))
print(tc2)
DimCoord([1970-01-01 00:00:00, 1970-01-04 00:00:00, 1970-01-07 00:00:00,
1970-01-10 00:00:00, 1970-01-13 00:00:00, 1970-01-16 00:00:00,
1970-01-19 00:00:00, 1970-01-22 00:00:00, 1970-01-25 00:00:00,
1970-01-28 00:00:00, 1970-01-31 00:00:00, 1970-02-03 00:00:00], standard_name='time', calendar='gregorian')Follows on from #2354. Thanks to @PAGWatson for originally bringing this to our attention there.