OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
get_ncdf_object.py
Go to the documentation of this file.
1 def get_ncdf_object(file,group,object):
2  # Program to read a data object from a NetCDF file
3  # Liang Hong, 2/11/2020
4 
5  from netCDF4 import Dataset
6 
7  nc_fid = Dataset(file,'r')
8  ngid = nc_fid.groups[group]
9  data = ngid.variables[object][:].data
10  nc_fid.close()
11 
12  return data
13 
def get_ncdf_object(file, group, object)