4.7.3. thuner.data.gridrad

Process GridRad data.

Functions

get_gridrad_filepaths(options)

Get the start and end dates for the cases in the GridRad-Severe dataset (doi.org/10.5065/2B46-1A97).

open_gridrad(path, dataset_options)

Open a GridRad netcdf file, converting variables with an "Index" dimension back to 3D

convert_gridrad(time, filepath, ...)

Convert gridrad data to the standard format.

filter(ds[, weight_thresh, ...])

Filter a GridRad dataset.

remove_speckles(ds[, window_size, ...])

Remove speckles in GridRad data.

remove_low_level_clutter(ds[, variables])

Remove low level clutter from GridRad data.

remove_clutter_below_anvils(ds[, variables])

Remove clutter below anvils in GridRad data.

remove_clutter(ds[, variables, low_level, ...])

Remove clutter from GridRad data.

pydantic model thuner.data.gridrad.GridRadSevereOptions[source]

Bases: BaseDatasetOptions

Options for GridRad Severe datasets.

Fields:
Validators:
  • _check_filepaths » all fields

  • _check_times » all fields

field dataset_id: str = 'ds841.6'

UCAR RDA dataset ID.

field event_start: str [Required]

Event start date.

field obs_thresh: int = 2

Observation count threshold for filtering.

field type: Literal['GridRadSevereOptions'] = 'GridRadSevereOptions'
field version: str = 'v4_2'

GridRad version.

convert_dataset(time, filepath, track_options, grid_options)[source]

Convert GridRad dataset.

get_filepaths()[source]

Get the filepaths for the GridRad dataset assuming filenames and directory structure match the remote location.

thuner.data.gridrad.convert_gridrad(time, filepath, track_options, dataset_options, grid_options)[source]

Convert gridrad data to the standard format.

thuner.data.gridrad.filter(ds, weight_thresh=1.2, echo_frac_thresh=0.3, refl_thresh=0, obs_thresh=2, variables=None)[source]

Filter a GridRad dataset. Based on code from the GridRad website https://gridrad.org/software.html and edits by Stacey Hitchcock.

Parameters:
  • ds (xarray.Dataset) – The GridRad dataset.

  • weight_thresh (float, optional) – The bin weight threshold. Default is 1.5.

  • echo_frac_thresh (float, optional) – The echo fraction threshold. Default is 0.6.

  • refl_thresh (float, optional) – The reflectivity threshold. Default is 0.

  • obs_thresh (int, optional) – The number of observations. Default is 3.

Returns:

ds – The filtered GridRad dataset

Return type:

xarray.Dataset

thuner.data.gridrad.get_gridrad_filepaths(options)[source]

Get the start and end dates for the cases in the GridRad-Severe dataset (doi.org/10.5065/2B46-1A97).

thuner.data.gridrad.open_gridrad(path, dataset_options)[source]

Open a GridRad netcdf file, converting variables with an “Index” dimension back to 3D

thuner.data.gridrad.remove_clutter(ds, variables=None, low_level=True, below_anvil=False)[source]

Remove clutter from GridRad data. Based on code from the GridRad website https://gridrad.org/software.html and edits by Stacey Hitchcock.

Parameters:
  • ds (xarray.Dataset) – The GridRad dataset.

  • variables (list, optional) – The variables to remove clutter from. Default is [“Reflectivity”].

Returns:

ds – The GridRad dataset with clutter removed.

Return type:

xarray.Dataset

thuner.data.gridrad.remove_clutter_below_anvils(ds, variables=None)[source]

Remove clutter below anvils in GridRad data. Based on code from the GridRad website https://gridrad.org/software.html and edits by Stacey Hitchcock.

thuner.data.gridrad.remove_low_level_clutter(ds, variables=None)[source]

Remove low level clutter from GridRad data. Based on code from the GridRad website https://gridrad.org/software.html and edits by Stacey Hitchcock.

thuner.data.gridrad.remove_speckles(ds, window_size=5, coverage_thresh=0.32, variables=None)[source]

Remove speckles in GridRad data. Based on code from the GridRad website https://gridrad.org/software.html and edits by Stacey Hitchcock. Modified from the original to use xr.rolling instead of np.roll to correctly handle edges and corners.