This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hi, The short answer to reading data from variables is: from netCDF4 import Dataset nc = Dataset('myfile.nc') myvar = nc.variables['myvariablename'] data = my_var[:] # Returns an numpy masked array I think the documentation you're looking for is available at http://unidata.github.io/netcdf4-python under the heading "6. Writing data to and retrieving data from a netCDF variable." Ryan > Hi, > > As part of our current project we are capturing the Green Vegetation > Fraction data from NOAA CLASS, so they are providing the data set in .nc > format. > During this process we got stuck at converting them into CSV format readable > format. The documentation we > referred(http://unidata.github.io/netcdf4-python/) didn't completely > mentioned about the how to read the data from the multidimensional arrays and > reading the data from variables and dimensions. Ticket Details =================== Ticket ID: FGA-310231 Department: Support Python Priority: High Status: Closed =================== NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.