pylawr.functions.input#
- pylawr.functions.input.read_dwd_hdf5(file_handler, grid=None)[source]#
Read in DWD data in HDF5 format. This function also can be used to read in any OPERA Data Information Model (ODIM) conform HDF5 data, but there is no guarantee that this works for any data.
- Parameters
file_handler (filelike object) – This file handler is passed to
DWDHDF5Handlerand this file handler has to be open.grid (child of
BaseGridor None, optional) – This grid is used to set coordinates of read in reflectivity. If no grid is given, a :py:class:~pylawr.grid.polar.PolarGrid` with default arguments is initialized. Default is None.
- Returns
read_refl (
xarray.DataArray) – Read-in logarithmic reflectivity. The beam expansion is corrected and added as tag.grid (child of
BaseGridor None) – This grid was used to set grid coordinates of returned reflectivity.
- pylawr.functions.input.read_lawr_ascii(file_handler, grid=None)[source]#
Read in ascii-data from X-band local area weather radars of the University Hamburg.
- Parameters
file_handler (file handler object) – This file handler is used to read in the data. This file handler needs to be opened.
grid (child of
BaseGridor None, optional) – This grid is used to set coordinates of read in reflectivity. If no grid is given, a :py:class:~pylawr.grid.polar.PolarGrid` with default arguments is initialized. Default is None.
- Returns
read_refl (
xarray.DataArray) – Read-in logarithmic reflectivity. The beam expansion is corrected and added as tag.grid (child of
BaseGridor None) – This grid was used to set grid coordinates of returned reflectivity.
- pylawr.functions.input.read_lawr_nc_level0(file_path, grid=None, height=95, azi_offset=0.0, beam_ele=3.0, keep_attrs=True)[source]#
Read in NETCDF level 0 data from X-band local area weather radars of the University Hamburg.
- Parameters
grid (child of
BaseGridor None, optional) – This grid is used to set coordinates of read in reflectivity. If no grid is given, a :py:class:~pylawr.grid.polar.PolarGrid` with the arguments specified in level 0 data is initialized. Default is None.height (float, optional) – The heigth of the radar. The height is not specified in level 0 data. Default is 95 m.
azi_offset (float, optional) – The azimuth offset in degrees used for :py:class:~pylawr.grid.polar.PolarGrid`. Default is 0.
beam_ele (float, optional) – The beam elevation in degrees used for :py:class:~pylawr.grid.polar.PolarGrid`. Default is 3. The usage of the beam elevation given by level 0 data is not recommended.
keep_attrs (bool, optional) – If the original attributes of the level 0 file will be kept. Default is True.
- Returns
read_refl (
xarray.DataArray) – Read-in logarithmic reflectivity. The beam expansion is corrected and added as tag.grid (child of
PolarGrid) – This grid is specified in level 0 data of reflectivity
- pylawr.functions.input.read_lawr_nc_new(file_path, grid=None)[source]#
Read in LAWR data in NetCDF format. This function can be used to read in NetCDF data, which was previously saved with this software package. This function opens file path as
Dataset, where thenreflectivitiyis used as variable. If a grid is given, then the grid is set and returned. In the future, the grid will be inferred from NetCDF file.- Parameters
- Returns
read_refl (
xarray.DataArray) – Read-in logarithmic reflectivity. The beam expansion is corrected and added as tag.grid (child of
BaseGridor None) – This grid was used to set grid coordinates of returned reflectivity.
- pylawr.functions.input.read_lawr_nc_old(file_path, grid=None, height=95)[source]#
Read in NETCDF level 1 data from X-band local area weather radars of the University Hamburg. The highest processed reflectivity will be returned (beam expansion corrected, clutter and noise removed, X-Band-Correction and C-Band-Correction is applied).
- Parameters
grid (child of
BaseGridor None, optional) – This grid is used to set coordinates of read in reflectivity. If no grid is given, a :py:class:~pylawr.grid.polar.PolarGrid` with the default arguments is initialized. Default is None.height (float) – The heigth of the radar. The height is not specified in level 1 data. Default is 95 m.
- Returns
read_refl (
xarray.DataArray) – Read-in logarithmic reflectivity. The beam expansion is corrected, clutter and noise is removed. The old C-Band-Correction is applied. Some tags are added.grid (child of
PolarGrid) – This grid is specified in level 0 data of reflectivity