Skip to content

Commit b1f4aa7

Browse files
committed
Update to handle time axis better
1 parent 5a6444a commit b1f4aa7

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/netcdf_scm/iris_cube_wrappers.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -828,15 +828,8 @@ def _get_openscmdata_time_axis_and_calendar(
828828
"of time between dates".format(out_calendar)
829829
)
830830
time_axis = _vector_cftime_conversion(time_axis)
831-
elif isinstance(time_axis[0], datetime):
832-
pass
833-
elif isinstance(time_axis[0], int):
834-
# TODO: put in openscm
835-
warnings.warn("Integer time axis will be put on 1st Jan of each year")
836-
elif isinstance(time_axis[0], float):
837-
pass
838-
else: # pragma: no cover # emergency valve
839-
raise TypeError("unrecognised time axis format: {}".format(type(time_axis[0])))
831+
else:
832+
pass # leave openscm to handle from here
840833

841834
# As we sometimes have to deal with long timeseries, we force the index to be
842835
# pd.Index and not pd.DatetimeIndex. We can't use DatetimeIndex because of a

0 commit comments

Comments
 (0)