[netCDF #FGA-310231]: reading the data from multidimensional arrays and variables
- Subject: [netCDF #FGA-310231]: reading the data from multidimensional arrays and variables
- Date: Tue, 06 Nov 2018 15:22:13 -0700
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."
> 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
> 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 ID: FGA-310231
Department: Support Python
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.