Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically list all variables of a NetCDF file using netCDF4 and Python

Tags:

python

netcdf

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')
like image 653
user308827 Avatar asked Oct 24 '25 23:10

user308827


1 Answers

dset.variables.keys() 

would provide you with a list of the variables.

like image 172
RH_data_maths Avatar answered Oct 27 '25 13:10

RH_data_maths



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!