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
I discovered that I get negative times on the time dimension for long intervals (years 1700-2013, monthly timestep).
importxrayimportnumpyasnpimportpandasaspdyears=range(1700,2014)
LATS=np.arange(-89.75, 90.0, 0.5)
LONS=np.arange(-179.75, 180.0, 0.5)
tlist=pd.date_range('%d-01-01'%years[0], periods=12*len(years), freq='M')
da=xray.DataArray(np.ones((12*len(years), 360, 720))*-9999, \
[('time', tlist), ('latitude', LATS), ('longitude', LONS) ])
# i then fill the dataarray with info from a text file (using read_csv from pandas)# eventually I dump to netcdfds=xray.Dataset({"mgpp": da})
ds.to_netcdf('test_%d-%d.nc'% (years[0], years[-1]))
This looks like some sort of integer overflow bug. Oddly, the times actually roundtrips fine back into xray (but probably not other programs that read netCDFs).
In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity
If this issue remains relevant, please comment here; otherwise it will be marked as closed automatically
Hi.
I discovered that I get negative times on the time dimension for long intervals (years 1700-2013, monthly timestep).
If I "ncdump -c mgpp_1700-2013.nc I get:
and eventually:
Not sure if I can inflence that at "dump" time with to_netcdf? I know about the time limitation, but my years should be non-critical, no?
The text was updated successfully, but these errors were encountered: