I am generating some netCDF datasets which contain daily variables over the 21st century, with each 5 years of data is stored in a separate file. Everything goes smoothly but when I checked the time values in each file I found out that for no obvious reason date2num generated some random big numbers (9.96921e+36) for some of the netCDF files! I am pretty sure that my dates array (which is converted to numbers) does not have any problem or missing data. In fact, I ran the same code again and it behaved for that specific file but generated random big numbers for another file. Has anyone come across this problem before?
Asked
Active
Viewed 150 times
0
-
Can you provide a sample of the netcdf file along with the code you are using? That will help us diagnose the issue! – N1B4 Jun 09 '17 at 20:54
-
It turned out to be because of the shape of a variable that had time dimension. The variable X had dimensions of ('time','lat','lon') and its shape was (2501,200,200), while 'time' values were 2500 values. netCDF4 was not throwing any error about non-matching dimensions and was generating random numbers to match the size of time variable and first dimension of variable X. – Monobakht Jun 12 '17 at 10:31
-
The Rocket Software MultiValue Databases ( UniData, UniVerse and D3 ) use Python 3.4.1 not a 2.x version of Python, I think you may have put the wrong tag on the question. – Mike Jul 25 '17 at 23:43