NetCDF4 Python not recognizing attributes
Clash Royale CLAN TAG#URR8PPP
NetCDF4 Python not recognizing attributes
I am running the following code:
file = Dataset('file.nc')
print(file.ncattrs())
for name in file.ncattrs():
print(name)
The second line returns , and the for loops returns nothing, suggesting there are no attributes in the file. However, I opened the file and found 41 global attributes. Why is this not detecting the attributes?
EDIT: Here is the file I'm using.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
That should indeed work (just tested it). Can you share the NetCDF file?
– Bart
6 hours ago