I have a netCDF file in Python in which the unit of the time variable is days_since_Jan11900
which cannot be read by the xarray
package. It throws the error
unable to decode time units 'days_since_Jan11900' with 'the default calendar'. Try opening your dataset with decode_times=False or installing cftime if it is not installed.
I do not want to use decode_times
but simply change it into days_since_0
. It is days since 1/1/0000.
How can I change the units in the netCDF to something read-able?
<class 'netCDF4._netCDF4.Variable'>
float64 days(time)
units: days_since_Jan11900
long_name: calendar_days
unlimited dimensions:
current shape = (87600,)
filling on, default _FillValue of 9.969209968386869e+36 used