wradlib.io.netcdf.read_generic_netcdf#
- wradlib.io.netcdf.read_generic_netcdf(fname)[source]#
Reads netcdf files and returns a dictionary with corresponding structure.
In contrast to other file readers under
wradlib.io
, this function will not return a two item tuple with (data, metadata). Instead, this function returns ONE dictionary that contains all the file contents - both data and metadata. The keys of the output dictionary conform to the Group/Subgroup directory branches of the original file. Please see the examples below on how to browse through a return object. The most important keys are the “dimensions” which define the shape of the data arrays, and the “variables” which contain the actual data and typically also the data that define the dimensions (e.g. sweeps, azimuths, ranges). These keys should be present in any netcdf file.Note
The returned dictionary could be quite big, depending on the content of the file.
- Parameters:
fname (
str
or file-like) – a netcdf file path or file-like object- Returns:
out (
dict
) – an ordered dictionary that contains both data and metadata according to the original netcdf file structure
Examples