NetCDF4 Python not recognizing attributes

The name of the pictureThe name of the pictureThe name of the pictureClash 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.





That should indeed work (just tested it). Can you share the NetCDF file?
– Bart
6 hours ago









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.

Comments

Popular posts from this blog

Executable numpy error

PySpark count values by condition

Mass disable jenkins jobs