How do I programmatically list all variables of a NetCDF file that I have read in using netCDF4 and Python?
import netCDF4
dset = netCDF4.Dataset('test.nc')
dset.variables.keys()
would provide you with a list of the variables.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With