Hi Steve,
Thanks very much for the code snippet. I figured out the following via
experimentation.
- Open specific layer by using:
layer = gdal.Open('netCDF:annual_mean.nc:temp')
- Then get at the layer data data using the following:
netcdf_band = layer.GetRasterBand(1)
- Read in the data one
Roger,
Hello. Our examples differ in that you called the ReadAsArray() on a
single band, which returns an array with dimensions (ny,nx), and I called
it on the subdataset, which returns an array with dimensions
(nbands,ny,nx). In my example the array returned has size (539,78,141),
where the
Hello. Here's an example of reading an entire array for a single subdataset.
[EMAIL PROTECTED] AEFF]$ gdalinfo latest.nc
Driver: netCDF/Network Common Data Format
...
SUBDATASET_25_NAME=NETCDF:latest.nc:TMP_GPML
SUBDATASET_25_DESC=[49x11x78x141]
air_temperature_at_constant_altitude_above_m