I often finding myself wanting basic information about netCDF files and needing to inspect it in Python quickly.
I’ve written a bash function that takes a passed path of a netCDF file, it then writes a short python script and loads it into a ipython console. The console then prints out basic information about the file and all the variable names, ready for you to hack away!
For this bash function you’ll need:
- python 2.x
- python netCDF4 library
Here’s the function: