[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #FGA-310231]: reading the data from multidimensional arrays and variables



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.