Hallo,
I did several subsequent calculations and wrote results to one big nc-file. My object_id's look like this:
object_id= 'angle' + str(int(angle)).rjust(2, '0')
Angle is 0.0, 1.0, ... so I get object id's like 'angle-000', 'angle-001', ...
My nc-file is very big ~4.3GB. When I wanted to read a configuration I got the following error
File "./zipdir/NL/IO/NLSaveUtilities.py", line 252, in nlread
File "./zipdir/NL/IO/NetCDFFile.py", line 156, in __init__
File "./zipdir/NL/IO/NetCDFFile.py", line 369, in _read
File "./zipdir/NL/IO/NetCDFFile.py", line 440, in _read_var_array
If a have a wrong object_id, the output of nlread is an empty array []. But not such an error.
Did you see someting like this before? Could it be related to the file-size being too large?
Normally VNL is able to quickly print the object_id's of an nc-file. But it does not work here. Is there a way to find out the object-id's manually with atkpython?
Is this file unrepairably damaged or could there be a way to still get some data out of it?
The following code snippet gives the list of object id's in the file.
from NL.IO.NLSaveUtilities import nlinspect
print nlinspect('your_file.nc')
However I think there is 2 possibilities that can cause this problem.
- The file is broken - caused by an interruption in saving or so - if you install the program ncdump and is able to see inside the file, it is likely that it is not broken.
- If the file is not broken, then file might be too large to read in. This can either be an issue in the code or it can be related to memory on the machine.