wradlib.io.xarray_depr.OdimH5#
- class wradlib.io.xarray_depr.OdimH5(filename=None, flavour=None, **kwargs)[source]#
Class for xarray based retrieval of ODIM_H5 data files
Initialize xarray structure from hdf5 data structure.
- Parameters:
- Keyword Arguments:
decode_times (
bool
) – If True, decode cf times to np.datetime64. Defaults to True.decode_coords (
bool
) – If True, use the ‘coordinates’ attribute on variable to assign coordinates. Defaults to True.mask_and_scale (
bool
) – If True, lazily scale (using scale_factor and add_offset) and mask (using _FillValue). Defaults to True.chunks (
int
ordict
, optional) – If chunks is provided, it used to load the new dataset into dask arrays. chunks={} loads the dataset with dask using a single chunk for all arrays.georef (
bool
) – If True, adds 2D AEQD x,y,z-coordinates, ground_range (gr) and 2D (rays,bins)-coordinates for easy georeferencing (eg. cartopy)standard (
str
) –none - data is read as verbatim as possible, no metadata
odim - data is read, odim metadata added to datasets
cf-mandatory - data is read according to cfradial2 standard importing mandatory metadata
cf-full - data is read according to cfradial2 standard importing all available cfradial2 metadata (not fully implemented)
dim0 (
str
) –- name of the ray-dimension of DataArrays and Dataset:
time - cfradial2 standard
azimuth - better for working with xarray
- __init__(filename=None, flavour=None, **kwargs)[source]#
Initialize xarray structure from hdf5 data structure.
- Parameters:
- Keyword Arguments:
decode_times (
bool
) – If True, decode cf times to np.datetime64. Defaults to True.decode_coords (
bool
) – If True, use the ‘coordinates’ attribute on variable to assign coordinates. Defaults to True.mask_and_scale (
bool
) – If True, lazily scale (using scale_factor and add_offset) and mask (using _FillValue). Defaults to True.chunks (
int
ordict
, optional) – If chunks is provided, it used to load the new dataset into dask arrays. chunks={} loads the dataset with dask using a single chunk for all arrays.georef (
bool
) – If True, adds 2D AEQD x,y,z-coordinates, ground_range (gr) and 2D (rays,bins)-coordinates for easy georeferencing (eg. cartopy)standard (
str
) –none - data is read as verbatim as possible, no metadata
odim - data is read, odim metadata added to datasets
cf-mandatory - data is read according to cfradial2 standard importing mandatory metadata
cf-full - data is read according to cfradial2 standard importing all available cfradial2 metadata (not fully implemented)
dim0 (
str
) –- name of the ray-dimension of DataArrays and Dataset:
time - cfradial2 standard
azimuth - better for working with xarray
Methods
__init__
([filename, flavour])Initialize xarray structure from hdf5 data structure.
assign_data
(filename[, flavour])Assign xarray dataset from hdf5 data structure.
assign_root
()clear
()georeference
([sweeps])Georeference sweeps
get
(k[,d])items
()keys
()pop
(k[,d])If key is not found, d is returned if given, otherwise KeyError is raised.
popitem
()as a 2-tuple; but raise KeyError if D is empty.
setdefault
(k[,d])to_cfradial2
(filename)Save volume to CfRadial2.0 compliant file.
to_odim
(filename)Save volume to ODIM_H5/V2_2 compliant file.
update
([E, ]**F)If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v
values
()Attributes
Conventions
Return CF/ODIM Conventions.
location
Return location of data source.
root
Return root dataset.
sweep
Return sweep dimension count.
sweep_angles
sweep_names
sweeps
Return zip sweep names, sweep_angles
version
Return CF/ODIM version