Radar Retrievals (pyart.retrieve
)¶
Radar retrievals.
Radar retrievals¶
kdp_maesaka (radar[, gatefilter, method, …]) |
Compute the specific differential phase (KDP) from corrected (e.g., unfolded) total differential phase data based on the variational method outlined in Maesaka et al. |
kdp_schneebeli (radar[, gatefilter, …]) |
Estimates Kdp with the Kalman filter method by Schneebeli and al. |
kdp_vulpiani (radar[, gatefilter, …]) |
Estimates Kdp with the Vulpiani method for a 2D array of psidp measurements with the first dimension being the distance from radar and the second dimension being the angles (azimuths for PPI, elev for RHI).The input psidp is assumed to be pre-filtered (for ex. |
kdp_leastsquare_single_window (radar[, …]) |
Compute the specific differential phase (KDP) from differential phase data using a piecewise least square method. |
kdp_leastsquare_double_window (radar[, …]) |
Compute the specific differential phase (KDP) from differential phase data using a piecewise least square method. |
calculate_snr_from_reflectivity (radar[, …]) |
Calculate the signal to noise ratio, in dB, from the reflectivity field. |
calculate_velocity_texture (radar[, …]) |
Derive the texture of the velocity field. |
compute_ccor (radar[, filt_field, …]) |
Computes the clutter correction ratio (CCOR), i.e. |
compute_snr (radar[, refl_field, …]) |
Computes SNR from a reflectivity field and the noise in dBZ. |
compute_l (radar[, rhohv_field, l_field]) |
Computes Rhohv in logarithmic scale according to L=-log10(1-RhoHV). |
compute_cdr (radar[, rhohv_field, zdr_field, …]) |
Computes the Circular Depolarization Ratio. |
compute_noisedBZ (nrays, noisedBZ_val, …[, …]) |
Computes noise in dBZ from reference noise value. |
compute_radial_noise_hs (radar[, ind_rmin, …]) |
Computes radial noise in dBm from signal power using the algorithm from Hildebrand and Sekhon 1974 |
compute_radial_noise_ivic (radar[, …]) |
Computes radial noise in dBm from signal power using the algorithm described in Ivic et al. |
compute_signal_power (radar[, lmf, attg, …]) |
Computes received signal power OUTSIDE THE RADOME in dBm from a reflectivity field. |
compute_rcs (radar[, kw2, pulse_width, …]) |
Computes the radar cross-section (assuming a point target) from radar reflectivity. |
compute_rcs_from_pr (radar[, lmf, attg, …]) |
Computes the radar cross-section (assuming a point target) from radar reflectivity by first computing the received power and then the RCS from it. |
compute_vol_refl (radar[, kw, freq, …]) |
Computes the volumetric reflectivity from the effective reflectivity factor |
compute_bird_density (radar[, sigma_bird, …]) |
Computes the bird density from the volumetric reflectivity |
fetch_radar_time_profile (sonde_dset, radar) |
Extract the correct profile from a interpolated sonde. |
map_profile_to_gates (profile, heights, radar) |
Given a profile of a variable map it to the gates of radar assuming 4/3Re. |
steiner_conv_strat (grid[, dx, dy, intense, …]) |
Partition reflectivity into convective-stratiform using the Steiner et al. |
hydroclass_semisupervised (radar[, …]) |
Classifies precipitation echoes following the approach by Besic et al (2016). |
get_freq_band (freq) |
Returns the frequency band name (S, C, X, …). |
texture_of_complex_phase (radar[, …]) |
Calculate the texture of the differential phase field. |
grid_displacement_pc (grid1, grid2, field, level) |
Calculate the grid displacement using phase correlation. |
grid_shift (grid, advection[, trim_edges, …]) |
Shift a grid by a certain number of pixels. |
est_rain_rate_zpoly (radar[, refl_field, …]) |
Estimates rainfall rate from reflectivity using a polynomial Z-R relation developed at McGill University. |
est_rain_rate_z (radar[, alpha, beta, …]) |
Estimates rainfall rate from reflectivity using a power law. |
est_rain_rate_kdp (radar[, alpha, beta, …]) |
Estimates rainfall rate from kdp using alpha power law. |
est_rain_rate_a (radar[, alpha, beta, …]) |
Estimates rainfall rate from specific attenuation using alpha power law. |
est_rain_rate_zkdp (radar[, alphaz, betaz, …]) |
Estimates rainfall rate from a blending of power law r-kdp and r-z relations. |
est_rain_rate_za (radar[, alphaz, betaz, …]) |
Estimates rainfall rate from a blending of power law r-alpha and r-z relations. |
est_rain_rate_hydro (radar[, alphazr, …]) |
Estimates rainfall rate using different relations between R and the polarimetric variables depending on the hydrometeor type. |
est_wind_vel (radar[, vert_proj, vel_field, …]) |
Estimates wind velocity. |
est_vertical_windshear (radar[, az_tol, …]) |
Estimates wind shear. |
atmospheric_gas_att (freq, elev, rng) |
Computes the one-way atmospheric gas attenuation [dB] according to the empirical formula in Doviak and Zrnic (1993) pp 44. |
get_coeff_attg (freq) |
get the 1-way gas attenuation for a particular frequency |
est_wind_profile (radar[, npoints_min, …]) |
Estimates the vertical wind profile using VAD techniques |
detect_ml (radar[, gatefilter, fill_value, …]) |
Detects the melting layer (ML) using the reflectivity and copolar correlation coefficient. |
melting_layer_giangrande (radar[, nVol, …]) |
Detects the melting layer following the approach by Giangrande et al (2008) |
melting_layer_hydroclass (radar[, …]) |
Using the results of the hydrometeor classification by Besic et al. |
_get_res_vol_sides (radar) |
Computes the height of the lower left and upper right points of the range resolution volume. |
velocity_azimuth_display (radar[, vel_field, …]) |
Velocity azimuth display. |
quasi_vertical_profile (radar[, …]) |
Quasi Vertical Profile. |
compute_qvp (radar, field_names[, ref_time, …]) |
Computes quasi vertical profiles. |
compute_rqvp (radar, field_names[, ref_time, …]) |
Computes range-defined quasi vertical profiles. |
compute_evp (radar, field_names, lon, lat[, …]) |
Computes enhanced vertical profiles. |
compute_svp (radar, field_names, lon, lat, angle) |
Computes slanted vertical profiles. |
compute_vp (radar, field_names, lon, lat[, …]) |
Computes vertical profiles. |
compute_ts_along_coord (radar, field_name[, …]) |
Computes time series along a particular antenna coordinate, i.e. |
compute_iq (spectra, fields_in_list, …[, …]) |
Computes the IQ data from the spectra through an inverse Fourier transform |
compute_spectral_power (spectra[, units, …]) |
Computes the spectral power from the complex spectra in ADU. |
compute_spectral_noise (spectra[, units, …]) |
Computes the spectral noise power from the complex spectra in ADU. |
compute_spectral_phase (spectra[, signal_field]) |
Computes the spectral phase from the complex spectra in ADU |
compute_spectral_reflectivity (spectra[, …]) |
Computes the spectral reflectivity from the complex spectra in ADU or from the signal power in ADU. |
compute_spectral_differential_reflectivity (spectra) |
Computes the spectral differential reflectivity from the complex spectras or the power in ADU |
compute_spectral_differential_phase (spectra) |
Computes the spectral differential reflectivity from the complex spectras in ADU or sRhoHV |
compute_spectral_rhohv (spectra[, …]) |
Computes the spectral RhoHV from the complex spectras in ADU |
compute_pol_variables (spectra, fields_list) |
Computes the polarimetric variables from the complex spectra in ADU or the spectral powers and spectral RhoHV |
compute_noise_power (spectra[, units, navg, …]) |
Computes the noise power from the complex spectra in ADU. |
compute_reflectivity (spectra[, sdBZ_field]) |
Computes the reflectivity from the spectral reflectivity |
compute_differential_reflectivity (spectra[, …]) |
Computes the differential reflectivity from the horizontal and vertical spectral reflectivity |
compute_differential_phase (spectra[, …]) |
Computes the differential phase from the spectral differential phase and the spectral reflectivity |
compute_rhohv (spectra[, use_rhohv, …]) |
Computes RhoHV from the horizontal and vertical spectral reflectivity or from sRhoHV and the spectral powers |
compute_Doppler_velocity (spectra[, sdBZ_field]) |
Computes the Doppler velocity from the spectral reflectivity |
compute_Doppler_width (spectra[, sdBZ_field]) |
Computes the Doppler width from the spectral reflectivity |
compute_reflectivity_iq (radar[, …]) |
Computes the reflectivity from the IQ signal data |
compute_st1_iq (radar[, signal_field]) |
Computes the statistical test one lag fluctuation from the horizontal or vertical channel IQ data |
compute_st2_iq (radar[, signal_field]) |
Computes the statistical test two lag fluctuation from the horizontal or vertical channel IQ data |
compute_wbn_iq (radar[, signal_field]) |
Computes the wide band noise from the horizontal or vertical channel IQ data |
compute_differential_reflectivity_iq (radar) |
Computes the differential reflectivity from the horizontal and vertical IQ data |
compute_mean_phase_iq (radar[, signal_field]) |
Computes the differential phase from the horizontal or vertical channel IQ data |
compute_differential_phase_iq (radar[, …]) |
Computes the differential phase from the horizontal and vertical channels IQ data |
compute_rhohv_iq (radar[, subtract_noise, …]) |
Computes RhoHV from the horizontal and vertical channels IQ data |
compute_Doppler_velocity_iq (radar[, …]) |
Computes the Doppler velocity from the IQ data |
compute_Doppler_width_iq (radar[, …]) |
Computes the Doppler width from the IQ data |
compute_pol_variables_iq (radar, fields_list) |
Computes the polarimetric variables from the IQ signals in ADU |
compute_spectra (radar, fields_in_list, …) |
Computes the spectra from IQ data through a Fourier transform |
-
pyart.retrieve.
atmospheric_gas_att
(freq, elev, rng)[source]¶ Computes the one-way atmospheric gas attenuation [dB] according to the empirical formula in Doviak and Zrnic (1993) pp 44. This formula is valid for elev < 10 deg and rng < 200 km so values above these will be saturated to 10 deg and 200 km respectively
Parameters: - freq : float
radar frequency [Hz]
- elev : float or array of floats
elevation angle [deg]
- rng : float or array of floats. If array must have the same size as elev
range [km]
Returns: - latm : float or array of floats
1-way gas attenuation [dB]
-
pyart.retrieve.
calculate_snr_from_reflectivity
(radar, refl_field=None, snr_field=None, toa=25000.0)[source]¶ Calculate the signal to noise ratio, in dB, from the reflectivity field.
Parameters: - radar : Radar
Radar object from which to retrieve reflectivity field.
- refl_field : str, optional
Name of field in radar which contains the reflectivity. None will use the default field name in the Py-ART configuration file.
- snr_field : str, optional
Name to use for snr metadata. None will use the default field name in the Py-ART configuration file.
- toa : float, optional
Height above which to take noise floor measurements, in meters.
Returns: - snr : field dictionary
Field dictionary containing the signal to noise ratio.
-
pyart.retrieve.
calculate_velocity_texture
(radar, vel_field=None, wind_size=4, nyq=None, check_nyq_uniform=True)[source]¶ Derive the texture of the velocity field.
Parameters: - radar: Radar
Radar object from which velocity texture field will be made.
- vel_field : str, optional
Name of the velocity field. A value of None will force Py-ART to automatically determine the name of the velocity field.
- wind_size : int, optional
The size of the window to calculate texture from. The window is defined to be a square of size wind_size by wind_size.
- nyq : float, optional
The nyquist velocity of the radar. A value of None will force Py-ART to try and determine this automatically.
- check_nyquist_uniform : bool, optional
True to check if the Nyquist velocities are uniform for all rays within a sweep, False will skip this check. This parameter is ignored when the nyq parameter is not None.
Returns: - vel_dict: dict
A dictionary containing the field entries for the radial velocity texture.
-
pyart.retrieve.
compute_Doppler_velocity
(spectra, sdBZ_field=None)[source]¶ Computes the Doppler velocity from the spectral reflectivity
Parameters: - spectra : Radar spectra object
Object containing the required fields
- sdBZ_field : str
Name of the field that contains the spectral reflectivity. None will use the default field name in the Py-ART configuration file.
Returns: - vel_dict : field dictionary
Field dictionary containing the Doppler velocity
-
pyart.retrieve.
compute_Doppler_velocity_iq
(radar, signal_field=None, direction='negative_away')[source]¶ Computes the Doppler velocity from the IQ data
Parameters: - radar : IQ radar object
Object containing the required fields
- signal_field : str
Name of the field in the radar which contains the signal. None will use the default field name in the Py-ART configuration file.
- direction : str
The convention used in the Doppler mean field. Can be negative_away or negative_towards
Returns: - vel_dict : field dictionary
Field dictionary containing the Doppler velocity
-
pyart.retrieve.
compute_Doppler_width
(spectra, sdBZ_field=None)[source]¶ Computes the Doppler width from the spectral reflectivity
Parameters: - spectra : Radar spectra object
Object containing the required fields
- sdBZ_field : str
Name of the field that contains the spectral reflectivity. None will use the default field name in the Py-ART configuration file.
Returns: - width_dict : field dictionary
Field dictionary containing the Doppler spectrum width
-
pyart.retrieve.
compute_Doppler_width_iq
(radar, subtract_noise=True, signal_field=None, noise_field=None, lag=1)[source]¶ Computes the Doppler width from the IQ data
Parameters: - radar : Radar radar object
Object containing the required fields
- subtract_noise : Bool
If True noise will be subtracted from the signals
- lag : int
Time lag used in the denominator of the computation
- signal_field, noise_field : str
Name of the field in the radar which contains the signal and noise. None will use the default field name in the Py-ART configuration file.
Returns: - width_dict : field dictionary
Field dictionary containing the Doppler spectrum width
-
pyart.retrieve.
compute_bird_density
(radar, sigma_bird=11, vol_refl_field=None, bird_density_field=None)[source]¶ Computes the bird density from the volumetric reflectivity
Parameters: - radar : Radar
radar object
- sigma_bird : float
Estimated bird radar cross-section
- vol_refl_field : str
name of the volumetric reflectivity used for the calculations
- bird_density_field : str
name of the bird density field
Returns: - bird_density_dict : dict
bird density data and metadata [birds/km^3]
-
pyart.retrieve.
compute_ccor
(radar, filt_field=None, unfilt_field=None, ccor_field=None)[source]¶ Computes the clutter correction ratio (CCOR), i.e. the ratio between the signal without Doppler filtering and the signal with Doppler filtering
Parameters: - radar : Radar
Radar object
- filt_field, unfilt_field : str
Name of Doppler filtered and unfiltered fields
- ccor_field : str
Name of the CCOR field
Returns: - ccor_dict : field dictionary
Field dictionary containing the CCOR
-
pyart.retrieve.
compute_cdr
(radar, rhohv_field=None, zdr_field=None, cdr_field=None)[source]¶ Computes the Circular Depolarization Ratio.
Parameters: - radar : Radar
Radar object.
- rhohv_field : str, optional
Name of the RhoHV field.
- zdr_field : str, optional
Name of the ZDR field.
- cdr_field : str, optional
Name of the CDR field.
Returns: - cdr : dict
CDR field.
-
pyart.retrieve.
compute_differential_phase
(spectra, sdBZ_field=None, sPhiDP_field=None)[source]¶ Computes the differential phase from the spectral differential phase and the spectral reflectivity
Parameters: - spectra : Radar spectra object
Object containing the required fields
- sdBZ_field, sPhiDP_field : str
Name of the fields that contain the spectral reflectivity and the spectral differential phase. None will use the default field name in the Py-ART configuration file.
Returns: - PhiDP_dict : field dictionary
Field dictionary containing the differential phase
-
pyart.retrieve.
compute_differential_phase_iq
(radar, phase_offset=0.0, signal_h_field=None, signal_v_field=None)[source]¶ Computes the differential phase from the horizontal and vertical channels IQ data
Parameters: - radar : IQ radar object
Object containing the required fields
- phase_offset : float
system phase offset to add
- signal_h_field, signal_v_field : str
Name of the fields that contain the H and V IQ data. None will use the default field name in the Py-ART configuration file.
Returns: - phidp_dict : field dictionary
Field dictionary containing the differential phase
-
pyart.retrieve.
compute_differential_reflectivity
(spectra, sdBZ_field=None, sdBZv_field=None)[source]¶ Computes the differential reflectivity from the horizontal and vertical spectral reflectivity
Parameters: - spectra : Radar spectra object
Object containing the required fields
- sdBZ_field, sdBZv_field : str
Name of the fields that contain the spectral reflectivity. None will use the default field name in the Py-ART configuration file.
Returns: - ZDR_dict : field dictionary
Field dictionary containing the differential reflectivity
-
pyart.retrieve.
compute_differential_reflectivity_iq
(radar, subtract_noise=False, lag=0, signal_h_field=None, signal_v_field=None, noise_h_field=None, noise_v_field=None)[source]¶ Computes the differential reflectivity from the horizontal and vertical IQ data
Parameters: - radar : IQ radar object
Object containing the required fields
- subtract_noise : Bool
If true the noise is subtracted from the power
- lag : int
Time lag used to compute the differential reflectivity
- signal_h_field, signal_v_field, noise_h_field, noise_v_field : str
Name of the signal and noise fields. None will use the default field name in the Py-ART configuration file.
Returns: - zdr_dict : field dictionary
Field dictionary containing the differential reflectivity
-
pyart.retrieve.
compute_evp
(radar, field_names, lon, lat, ref_time=None, latlon_tol=0.0005, delta_rng=15000.0, delta_azi=10, hmax=10000.0, hres=250.0, avg_type='mean', nvalid_min=1, interp_kind='none', qvp=None)[source]¶ Computes enhanced vertical profiles.
Parameters: - radar : Radar
Radar object used.
- field_names : list of str
list of field names to add to the QVP
- lat, lon : float
latitude and longitude of the point of interest [deg]
- ref_time : datetime object
reference time for current radar volume
- latlon_tol : float
tolerance in latitude and longitude in deg.
- delta_rng, delta_azi : float
maximum range distance [m] and azimuth distance [degree] from the central point of the evp containing data to average.
- hmax : float
The maximum height to plot [m].
- hres : float
The height resolution [m].
- avg_type : str
The type of averaging to perform. Can be either “mean” or “median”
- nvalid_min : int
Minimum number of valid points to accept average.
- interp_kind : str
type of interpolation when projecting to vertical grid: ‘none’, or ‘nearest’, etc. ‘none’ will select from all data points within the regular grid height bin the closest to the center of the bin. ‘nearest’ will select the closest data point to the center of the height bin regardless if it is within the height bin or not. Data points can be masked values If another type of interpolation is selected masked values will be eliminated from the data points before the interpolation
- qvp : QVP object or None
If it is not None this is the QVP object where to store the data from the current time step. Otherwise a new QVP object will be created
Returns: - qvp : qvp object
The computed enhanced vertical profile
-
pyart.retrieve.
compute_iq
(spectra, fields_in_list, fields_out_list, window=None)[source]¶ Computes the IQ data from the spectra through an inverse Fourier transform
Parameters: - spectra : Spectra radar object
Object containing the spectra
- fields_in_list : list of str
list of input spectra fields names
- fields_out_list : list of str
list with the output IQ fields names obtained from the input fields
- window : string, tupple or None
Parameters of the window used to obtain the spectra. The parameters are the ones corresponding to function scipy.signal.windows.get_window. If it is not None the inverse will be used to multiply the IQ data obtained by the IFFT
Returns: - radar : IQ radar object
radar object containing the IQ fields
-
pyart.retrieve.
compute_l
(radar, rhohv_field=None, l_field=None)[source]¶ Computes Rhohv in logarithmic scale according to L=-log10(1-RhoHV).
Parameters: - radar : Radar
Radar object.
- rhohv_field : str, optional
Name of the RhoHV field to use.
- l_field : str, optional
Name of the L field.
Returns: - l : dict
L field.
-
pyart.retrieve.
compute_mean_phase_iq
(radar, signal_field=None)[source]¶ Computes the differential phase from the horizontal or vertical channel IQ data
Parameters: - radar : IQ radar object
Object containing the required fields
- signal_field : str
Name of the field that contain the H or V IQ data. None will use the default field name in the Py-ART configuration file.
Returns: - mph_dict : field dictionary
Field dictionary containing the mean phase
-
pyart.retrieve.
compute_noise_power
(spectra, units='dBADU', navg=1, rmin=0.0, nnoise_min=1, signal_field=None)[source]¶ Computes the noise power from the complex spectra in ADU. Requires key dBADU_to_dBm_hh or dBADU_to_dBm_vv in radar_calibration if the units are to be dBm. The noise is computed using the method described in Hildebrand and Sehkon, 1974.
Parameters: - spectra : Radar spectra object
Object containing the required fields
- units : str
The units of the returned signal. Can be ‘ADU’, ‘dBADU’ or ‘dBm’
- navg : int
Number of spectra averaged
- rmin : int
Range from which the data is used to estimate the noise
- nnoise_min : int
Minimum number of samples to consider the estimated noise power valid
- signal_field : str, optional
Name of the field in radar which contains the signal. None will use the default field name in the Py-ART configuration file.
Returns: - noise_dict : field dictionary
Field dictionary containing the noise power
References
P. H. Hildebrand and R. S. Sekhon, Objective Determination of the Noise Level in Doppler Spectra. Journal of Applied Meteorology, 1974, 13, 808-811.
-
pyart.retrieve.
compute_noisedBZ
(nrays, noisedBZ_val, _range, ref_dist, noise_field=None)[source]¶ Computes noise in dBZ from reference noise value.
Parameters: - nrays : int
Number of rays in the reflectivity field.
- noisedBZ_val : float
Estimated noise value in dBZ at reference distance.
- _range : np array of floats
Range vector in m.
- ref_dist : float
Reference distance in Km.
- noise_field : str, optional
Name of the noise field.
Returns: - noisedBZ : dict
The noise field.
-
pyart.retrieve.
compute_pol_variables
(spectra, fields_list, use_pwr=False, subtract_noise=False, smooth_window=None, srhohv_field=None, pwr_h_field=None, pwr_v_field=None, signal_h_field=None, signal_v_field=None, noise_h_field=None, noise_v_field=None)[source]¶ Computes the polarimetric variables from the complex spectra in ADU or the spectral powers and spectral RhoHV
Parameters: - spectra : Radar spectra object
Object containing the required fields
- fields_list : list of str
list of fields to compute
- use_pwr : Bool
If True the polarimetric variables will be computed from the spectral power and the spectral RhoHV. Otherwise from the complex spectra
- subtract_noise : Bool
If True noise will be subtracted from the signals
- smooth_window : int or None
Size of the moving Gaussian smoothing window. If none no smoothing will be applied
- srhohv_field, pwr_h_field, pwr_v_field, signal_h_field, signal_v_field,
- noise_h_field, noise_v_field : str
Name of the fields in radar which contains the signal and noise. None will use the default field name in the Py-ART configuration file.
Returns: - radar : radar object
Object containing the computed fields
-
pyart.retrieve.
compute_pol_variables_iq
(radar, fields_list, subtract_noise=False, lag=0, direction='negative_away', phase_offset=0.0, signal_h_field=None, signal_v_field=None, noise_h_field=None, noise_v_field=None)[source]¶ Computes the polarimetric variables from the IQ signals in ADU
Parameters: - radar : IQ radar object
Object containing the required fields
- fields_list : list of str
list of fields to compute
- subtract_noise : Bool
If True noise will be subtracted from the signals
- lag : int
The time lag to use in the estimators
- direction : str
The convention used in the Doppler mean field. Can be negative_away or negative_towards
- phase_offset : float. Dataset keyword
The system differential phase offset to remove
- signal_h_field, signal_v_field, noise_h_field, noise_v_field : str
Name of the fields in radar which contains the signal and noise. None will use the default field name in the Py-ART configuration file.
Returns: - radar : radar object
Object containing the computed fields
-
pyart.retrieve.
compute_qvp
(radar, field_names, ref_time=None, angle=0.0, ang_tol=1.0, hmax=10000.0, hres=50.0, avg_type='mean', nvalid_min=30, interp_kind='none', qvp=None)[source]¶ Computes quasi vertical profiles.
Parameters: - radar : Radar
Radar object used.
- field_names : list of str
list of field names to add to the QVP
- ref_time : datetime object
reference time for current radar volume
- angle : int or float
If the radar object contains a PPI volume, the sweep number to use, if it contains an RHI volume the elevation angle.
- ang_tol : float
If the radar object contains an RHI volume, the tolerance in the elevation angle for the conversion into PPI
- hmax : float
The maximum height to plot [m].
- hres : float
The height resolution [m].
- avg_type : str
The type of averaging to perform. Can be either “mean” or “median”
- nvalid_min : int
Minimum number of valid points to accept average.
- interp_kind : str
type of interpolation when projecting to vertical grid: ‘none’, or ‘nearest’, etc. ‘none’ will select from all data points within the regular grid height bin the closest to the center of the bin. ‘nearest’ will select the closest data point to the center of the height bin regardless if it is within the height bin or not. Data points can be masked values If another type of interpolation is selected masked values will be eliminated from the data points before the interpolation
- qvp : QVP object or None
If it is not None this is the QVP object where to store the data from the current time step. Otherwise a new QVP object will be created
Returns: - qvp : qvp object
The computed QVP object
-
pyart.retrieve.
compute_radial_noise_hs
(radar, ind_rmin=0, nbins_min=1, max_std_pwr=2.0, pwr_field=None, noise_field=None, get_noise_pos=False)[source]¶ Computes radial noise in dBm from signal power using the algorithm from Hildebrand and Sekhon 1974
Parameters: - radar: radar object
radar object containing the signal power in dBm
- ind_rmin: int
index of the gate nearest to the radar where start looking for noisy gates
- nbins_min: int
min number of noisy gates to consider the estimation valid
- max_std_pwr: float
max standard deviation of the noise power to consider the noise valid
- pwr_field: str
Name of the input signal power field
- noise_field: str
name of the noise field to use
- get_noise_pos : bool
If true an additional field with gates containing noise according to the algorithm is produced
Returns: - noise_dict : dict
the noise field in dBm
- noise_pos_dict : dict or None
a dictionary containing a field where the gates with noise are set to 2 and those without are set to 1 (0 reserved)
References
P. H. Hildebrand and R. S. Sekhon, Objective Determination of the Noise Level in Doppler Spectra. Journal of Applied Meteorology, 1974, 13, 808-811.
-
pyart.retrieve.
compute_radial_noise_ivic
(radar, npulses_ray=30, flat_reg_wlen=96, ngates_min=800, iterations=10, pwr_field=None, noise_field=None, get_noise_pos=False)[source]¶ Computes radial noise in dBm from signal power using the algorithm described in Ivic et al. 2013
Parameters: - radar: radar object
radar object containing the signal power in dBm
- npulses_ray : int
Default number of pulses used in the computation of the ray. If the number of pulses is not in radar.instrument_parameters this will be used instead
- flat_reg_wlen : int
number of gates considered to find flat regions. The number represents 8 km length with a 83.3 m resolution
- ngates_min: int
minimum number of gates with noise to consider the retrieval valid
- iterations: int
number of iterations in step 7
- pwr_field: str
Name of the input signal power field
- noise_field: str
name of the noise field to use
- get_noise_pos : bool
If true an additional field with gates containing noise according to the algorithm is produced
Returns: - noise_dict : dict
the noise field in dBm
- noise_pos_dict : dict
the position of the noisy gates
- get_noise_pos : bool
If true an additional field with gates containing noise according to the algorithm is produced
References
I.R. Ivic, C. Curtis and S.M. Torres, Radial-Based Noise Power Estimation for Weather Radars. Journal of Atmospheric and Oceanic Technology, 2013, 30, 2737-2753.
-
pyart.retrieve.
compute_rcs
(radar, kw2=0.93, pulse_width=None, beamwidth=None, freq=None, refl_field=None, rcs_field=None)[source]¶ Computes the radar cross-section (assuming a point target) from radar reflectivity.
Parameters: - radar : Radar
radar object
- kw2 : float
water constant
- pulse_width : float
pulse width [s]
- beamwidth : float
beamwidth [degree]
- freq : float
radar frequency [Hz]. If none it will be obtained from the radar metadata
- refl_field : str
name of the reflectivity used for the calculations
- rcs_field : str
name of the RCS field
Returns: - rcs_dict : dict
RCS field and metadata
-
pyart.retrieve.
compute_rcs_from_pr
(radar, lmf=None, attg=None, radconst=None, tx_pwr=None, antenna_gain=None, lrx=0.0, ltx=0.0, lradome=0.0, freq=None, refl_field=None, rcs_field=None, neglect_gas_att=False)[source]¶ Computes the radar cross-section (assuming a point target) from radar reflectivity by first computing the received power and then the RCS from it.
Parameters: - radar : Radar
radar object
- lmf : float
matched filter losses. If None it will be obtained from the attribute radar_calibration of the radar object
- attg : float
1-way gas attenuation
- radconst : float
radar constant
- tx_pwr : float
radar transmitted power [dBm]
- antenna_gain : float
antenna gain [dB]. If None it will be obtain from the instrument_parameters attribute of the radar object
- lrx : float
receiver losses from the antenna feed to the reference point (positive value) [dB]
- lradome : float
1-way losses due to the radome (positive value) [dB]
- freq : float
radar frequency [Hz]. If none it will be obtained from the radar metadata
- refl_field : str
name of the reflectivity used for the calculations
- rcs_field : str
name of the RCS field
- neglect_gas_att : bool
Whether to neglect or not gas attenuation in the estimation of the RCS
Returns: - rcs_dict : dict
RCS field and metadata
-
pyart.retrieve.
compute_reflectivity
(spectra, sdBZ_field=None)[source]¶ Computes the reflectivity from the spectral reflectivity
Parameters: - spectra : Radar spectra object
Object containing the required fields
- sdBZ_field : str
Name of the field that contains the spectral reflectivity. None will use the default field name in the Py-ART configuration file.
Returns: - dBZ_dict : field dictionary
Field dictionary containing the reflectivity
-
pyart.retrieve.
compute_reflectivity_iq
(radar, subtract_noise=False, signal_field=None, noise_field=None)[source]¶ Computes the reflectivity from the IQ signal data
Parameters: - radar : IQ radar object
Object containing the required fields
- subtract_noise : Bool
If true the noise is subtracted from the power
- signal_field, noise_field : str
Name of the signal and noise fields. None will use the default field name in the Py-ART configuration file.
Returns: - dBZ_dict : field dictionary
Field dictionary containing the reflectivity
-
pyart.retrieve.
compute_rhohv
(spectra, use_rhohv=False, subtract_noise=False, srhohv_field=None, pwr_h_field=None, pwr_v_field=None, signal_h_field=None, signal_v_field=None, noise_h_field=None, noise_v_field=None)[source]¶ Computes RhoHV from the horizontal and vertical spectral reflectivity or from sRhoHV and the spectral powers
Parameters: - spectra : Radar spectra object
Object containing the required fields
- use_rhohv : Bool
If true the RhoHV will be computed from sRho_hv. Otherwise it will be computed using the complex spectra
- subtract_noise : Bool
If True noise will be subtracted from the signals
- srhohv_field, pwr_h_field, pwr_v_field, signal_h_field, signal_v_field,
- noise_h_field, noise_v_field : str
Name of the fields in radar which contains the signal and noise. None will use the default field name in the Py-ART configuration file.
Returns: - RhoHV_dict : field dictionary
Field dictionary containing the RhoHV
-
pyart.retrieve.
compute_rhohv_iq
(radar, subtract_noise=False, lag=0, signal_h_field=None, signal_v_field=None, noise_h_field=None, noise_v_field=None)[source]¶ Computes RhoHV from the horizontal and vertical channels IQ data
Parameters: - radar : IQ radar object
Object containing the required fields
- subtract_noise : Bool
If True noise will be subtracted from the signals
- lag : int
Time lag used in the computation
- signal_h_field, signal_v_field, noise_h_field, noise_v_field : str
Name of the fields in radar which contains the signal and noise. None will use the default field name in the Py-ART configuration file.
Returns: - rhohv_dict : field dictionary
Field dictionary containing the RhoHV
-
pyart.retrieve.
compute_rqvp
(radar, field_names, ref_time=None, hmax=10000.0, hres=2.0, avg_type='mean', nvalid_min=30, interp_kind='nearest', rmax=50000.0, weight_power=2.0, qvp=None)[source]¶ Computes range-defined quasi vertical profiles.
Parameters: - radar : Radar
Radar object used.
- field_names : list of str
list of field names to add to the QVP
- ref_time : datetime object
reference time for current radar volume
- hmax : float
The maximum height to plot [m].
- hres : float
The height resolution [m].
- avg_type : str
The type of averaging to perform. Can be either “mean” or “median”
- nvalid_min : int
Minimum number of valid points to accept average.
- interp_kind : str
type of interpolation when projecting to vertical grid: ‘none’, or ‘nearest’, etc. ‘none’ will select from all data points within the regular grid height bin the closest to the center of the bin. ‘nearest’ will select the closest data point to the center of the height bin regardless if it is within the height bin or not. Data points can be masked values If another type of interpolation is selected masked values will be eliminated from the data points before the interpolation
- rmax : float
ground range up to which the data is intended for use [m].
- weight_power : float
Power p of the weighting function 1/abs(grng-(rmax-1))**p given to the data outside the desired range. -1 will set the weight to 0.
- qvp : QVP object or None
If it is not None this is the QVP object where to store the data from the current time step. Otherwise a new QVP object will be created
Returns: - qvp : qvp object
The computed range defined quasi vertical profile
-
pyart.retrieve.
compute_signal_power
(radar, lmf=None, attg=None, radconst=None, lrx=0.0, lradome=0.0, refl_field=None, pwr_field=None)[source]¶ Computes received signal power OUTSIDE THE RADOME in dBm from a reflectivity field.
Parameters: - radar : Radar
radar object
- lmf : float
matched filter losses
- attg : float
1-way gas attenuation
- radconst : float
radar constant
- lrx : float
receiver losses from the antenna feed to the reference point (positive value) [dB]
- lradome : float
1-way losses due to the radome (positive value) [dB]
- refl_field : str
name of the reflectivity used for the calculations
- pwr_field : str
name of the signal power field
Returns: - s_pwr_dict : dict
power field and metadata
-
pyart.retrieve.
compute_snr
(radar, refl_field=None, noise_field=None, snr_field=None)[source]¶ Computes SNR from a reflectivity field and the noise in dBZ.
Parameters: - radar : Radar
Radar object
- refl_field : str, optional
Name of the reflectivity field to use.
- noise_field : str, optional
Name of the noise field to use.
- snr_field : str, optional
Name of the SNR field.
Returns: - snr : dict
The SNR field.
-
pyart.retrieve.
compute_spectra
(radar, fields_in_list, fields_out_list, window=None)[source]¶ Computes the spectra from IQ data through a Fourier transform
Parameters: - radar : radar object
Object containing the IQ data
- fields_in_list : list of str
list of input IQ data fields names
- fields_out_list : list of str
list with the output spectra fields names obtained from the input fields
- window : string, tupple or None
Parameters of the window used to obtain the spectra. The parameters are the ones corresponding to function scipy.signal.windows.get_window. If None no window will be used
Returns: - spectra : spectra radar object
radar object containing the spectra fields
-
pyart.retrieve.
compute_spectral_differential_phase
(spectra, use_rhohv=False, srhohv_field=None, signal_h_field=None, signal_v_field=None)[source]¶ Computes the spectral differential reflectivity from the complex spectras in ADU or sRhoHV
Parameters: - spectra : Radar spectra object
Object containing the required fields
- use_rhohv : Bool
If true sRhoHV is going to be used to compute the differential phase. Otherwise the complex signals are used
- signal_h_field, signal_v_field : str
Name of the fields in radar which contains the signal. None will use the default field name in the Py-ART configuration file.
Returns: - sPhiDP_dict : field dictionary
Field dictionary containing the spectral differential phase
-
pyart.retrieve.
compute_spectral_differential_reflectivity
(spectra, compute_power=True, subtract_noise=False, smooth_window=None, pwr_h_field=None, pwr_v_field=None, signal_h_field=None, signal_v_field=None, noise_h_field=None, noise_v_field=None)[source]¶ Computes the spectral differential reflectivity from the complex spectras or the power in ADU
Parameters: - spectra : Radar spectra object
Object containing the required fields
- compute_power : Bool
If True the signal power will be computed. Otherwise the field given by the user will be used
- subtract_noise : Bool
If True noise will be subtracted from the signals
- smooth_window : int or None
Size of the moving Gaussian smoothing window. If none no smoothing will be applied
- pwr_h_field, pwr_v_field, signal_h_field, signal_v_field, noise_h_field,
- noise_v_field : str
Name of the fields in radar which contains the signal and noise. None will use the default field name in the Py-ART configuration file.
Returns: - sZDR_dict : field dictionary
Field dictionary containing the spectral differential reflectivity
-
pyart.retrieve.
compute_spectral_noise
(spectra, units='dBADU', navg=1, rmin=0.0, nnoise_min=1, signal_field=None)[source]¶ Computes the spectral noise power from the complex spectra in ADU. Requires key dBADU_to_dBm_hh or dBADU_to_dBm_vv in radar_calibration if the units are to be dBm. The noise is computed using the method described in Hildebrand and Sehkon, 1974.
Parameters: - spectra : Radar spectra object
Object containing the required fields
- units : str
The units of the returned signal. Can be ‘ADU’, ‘dBADU’ or ‘dBm’
- navg : int
Number of spectra averaged
- rmin : int
Range from which the data is used to estimate the noise
- nnoise_min : int
Minimum number of samples to consider the estimated noise power valid
- signal_field : str, optional
Name of the field in radar which contains the signal. None will use the default field name in the Py-ART configuration file.
Returns: - noise_dict : field dictionary
Field dictionary containing the spectral noise power
References
P. H. Hildebrand and R. S. Sekhon, Objective Determination of the Noise Level in Doppler Spectra. Journal of Applied Meteorology, 1974, 13, 808-811.
-
pyart.retrieve.
compute_spectral_phase
(spectra, signal_field=None)[source]¶ Computes the spectral phase from the complex spectra in ADU
Parameters: - spectra : Radar spectra object
Object containing the required fields
- signal_field : str, optional
Name of the field in radar which contains the signal. None will use the default field name in the Py-ART configuration file.
Returns: - phase_dict : field dictionary
Field dictionary containing the spectral phase
-
pyart.retrieve.
compute_spectral_power
(spectra, units='dBADU', subtract_noise=False, smooth_window=None, signal_field=None, noise_field=None)[source]¶ Computes the spectral power from the complex spectra in ADU. Requires key dBADU_to_dBm_hh or dBADU_to_dBm_vv in radar_calibration if the units are to be dBm
Parameters: - spectra : Radar spectra object
Object containing the required fields
- units : str
The units of the returned signal. Can be ‘ADU’, ‘dBADU’ or ‘dBm’
- subtract_noise : Bool
If True noise will be subtracted from the signal
- smooth_window : int or None
Size of the moving Gaussian smoothing window. If none no smoothing will be applied
- signal_field, noise_field : str, optional
Name of the fields in radar which contains the signal and noise. None will use the default field name in the Py-ART configuration file.
Returns: - pwr_dict : field dictionary
Field dictionary containing the spectral power
-
pyart.retrieve.
compute_spectral_reflectivity
(spectra, compute_power=True, subtract_noise=False, smooth_window=None, pwr_field=None, signal_field=None, noise_field=None)[source]¶ Computes the spectral reflectivity from the complex spectra in ADU or from the signal power in ADU. Requires keys dBADU_to_dBm_hh or dBADU_to_dBm_vv in radar_calibration if the to be computed
Parameters: - spectra : Radar spectra object
Object containing the required fields
- compute_power : Bool
If True the signal power will be computed. Otherwise the field given by the user will be used
- subtract_noise : Bool
If True noise will be subtracted from the signal
- smooth_window : int or None
Size of the moving Gaussian smoothing window. If none no smoothing will be applied
- pwr_field, signal_field, noise_field : str, optional
Name of the fields in radar which contains the signal power, complex signal and noise. None will use the default field name in the Py-ART configuration file.
Returns: - sdBZ_dict : field dictionary
Field dictionary containing the spectral reflectivity
-
pyart.retrieve.
compute_spectral_rhohv
(spectra, subtract_noise=False, signal_h_field=None, signal_v_field=None, noise_h_field=None, noise_v_field=None)[source]¶ Computes the spectral RhoHV from the complex spectras in ADU
Parameters: - spectra : Radar spectra object
Object containing the required fields
- subtract_noise : Bool
If True noise will be subtracted from the signals
- signal_h_field, signal_v_field, noise_h_field, noise_v_field : str
Name of the fields in radar which contains the signal and noise. None will use the default field name in the Py-ART configuration file.
Returns: - sRhoHV_dict : field dictionary
Field dictionary containing the spectral RhoHV
-
pyart.retrieve.
compute_st1_iq
(radar, signal_field=None)[source]¶ Computes the statistical test one lag fluctuation from the horizontal or vertical channel IQ data
Parameters: - radar : IQ radar object
Object containing the required fields
- signal_field : str
Name of the field that contain the H or V IQ data. None will use the default field name in the Py-ART configuration file.
Returns: - st1_dict : field dictionary
Field dictionary containing the st1
-
pyart.retrieve.
compute_st2_iq
(radar, signal_field=None)[source]¶ Computes the statistical test two lag fluctuation from the horizontal or vertical channel IQ data
Parameters: - radar : IQ radar object
Object containing the required fields
- signal_field : str
Name of the field that contain the H or V IQ data. None will use the default field name in the Py-ART configuration file.
Returns: - st2_dict : field dictionary
Field dictionary containing the st2
-
pyart.retrieve.
compute_svp
(radar, field_names, lon, lat, angle, ref_time=None, ang_tol=1.0, latlon_tol=0.0005, delta_rng=15000.0, delta_azi=10, hmax=10000.0, hres=250.0, avg_type='mean', nvalid_min=1, interp_kind='none', qvp=None)[source]¶ Computes slanted vertical profiles.
Parameters: - radar : Radar
Radar object used.
- field_names : list of str
list of field names to add to the QVP
- lat, lon : float
latitude and longitude of the point of interest [deg]
- angle : int or float
If the radar object contains a PPI volume, the sweep number to use, if it contains an RHI volume the elevation angle.
- ref_time : datetime object
reference time for current radar volume
- ang_tol : float
If the radar object contains an RHI volume, the tolerance in the elevation angle for the conversion into PPI
- latlon_tol : float
tolerance in latitude and longitude in deg.
- delta_rng, delta_azi : float
maximum range distance [m] and azimuth distance [degree] from the central point of the evp containing data to average.
- hmax : float
The maximum height to plot [m].
- hres : float
The height resolution [m].
- avg_type : str
The type of averaging to perform. Can be either “mean” or “median”
- nvalid_min : int
Minimum number of valid points to accept average.
- interp_kind : str
type of interpolation when projecting to vertical grid: ‘none’, or ‘nearest’, etc. ‘none’ will select from all data points within the regular grid height bin the closest to the center of the bin. ‘nearest’ will select the closest data point to the center of the height bin regardless if it is within the height bin or not. Data points can be masked values If another type of interpolation is selected masked values will be eliminated from the data points before the interpolation
- qvp : QVP object or None
If it is not None this is the QVP object where to store the data from the current time step. Otherwise a new QVP object will be created
Returns: - qvp : qvp object
The computed slanted vertical profile
-
pyart.retrieve.
compute_ts_along_coord
(radar, field_name, mode='ALONG_AZI', fixed_range=None, fixed_azimuth=None, fixed_elevation=None, ang_tol=1.0, rng_tol=50.0, value_start=None, value_stop=None, ref_time=None, acoord=None)[source]¶ Computes time series along a particular antenna coordinate, i.e. along azimuth, elevation or range
Parameters: - radar : Radar
Radar object used.
- field_name : str
Name of the field
- mode : str
coordinate to extract data along. Can be ALONG_AZI, ALONG_ELE or ALONG_RNG
- fixed_range, fixed_azimuth, fixed_elevation : float
The fixed range [m], azimuth [deg] or elevation [deg] to extract. In each mode two of these parameters have to be defined. If they are not defined they default to 0.
- ang_tol, rng_tol : float
The angle tolerance [deg] and range tolerance [m] around the fixed range or azimuth/elevation
- value_start, value_stop : float
The minimum and maximum value at which the data along a coordinate start and stop
- ref_time : datetime object
reference time for current radar volume
- acoord : acoord object or None
If it is not None this is the object where to store the data from the current time step. Otherwise a new acoord object will be created
Returns: - acoord : acoord object
The computed data along a coordinate
-
pyart.retrieve.
compute_vol_refl
(radar, kw=0.93, freq=None, refl_field=None, vol_refl_field=None)[source]¶ Computes the volumetric reflectivity from the effective reflectivity factor
Parameters: - radar : Radar
radar object
- kw : float
water constant
- freq : None or float
radar frequency
- refl_field : str
name of the reflectivity used for the calculations
- vol_refl_field : str
name of the volumetric reflectivity
Returns: - vol_refl_dict : dict
volumetric reflectivity and metadata in 10log10(cm^2 km^-3)
-
pyart.retrieve.
compute_vp
(radar, field_names, lon, lat, ref_time=None, latlon_tol=0.0005, hmax=10000.0, hres=50.0, interp_kind='none', qvp=None)[source]¶ Computes vertical profiles.
Parameters: - radar : Radar
Radar object used.
- field_names : list of str
list of field names to add to the QVP
- lat, lon : float
latitude and longitude of the point of interest [deg]
- ref_time : datetime object
reference time for current radar volume
- latlon_tol : float
tolerance in latitude and longitude in deg.
- hmax : float
The maximum height to plot [m].
- hres : float
The height resolution [m].
- interp_kind : str
type of interpolation when projecting to vertical grid: ‘none’, or ‘nearest’, etc. ‘none’ will select from all data points within the regular grid height bin the closest to the center of the bin. ‘nearest’ will select the closest data point to the center of the height bin regardless if it is within the height bin or not. Data points can be masked values If another type of interpolation is selected masked values will be eliminated from the data points before the interpolation
- qvp : QVP object or None
If it is not None this is the QVP object where to store the data from the current time step. Otherwise a new QVP object will be created
Returns: - qvp : qvp object
The computed vertical profile
-
pyart.retrieve.
compute_wbn_iq
(radar, signal_field=None)[source]¶ Computes the wide band noise from the horizontal or vertical channel IQ data
Parameters: - radar : IQ radar object
Object containing the required fields
- signal_field : str
Name of the field that contain the H or V IQ data. None will use the default field name in the Py-ART configuration file.
Returns: - wbn_dict : field dictionary
Field dictionary containing the wide band noise
-
pyart.retrieve.
detect_ml
(radar, gatefilter=None, fill_value=None, refl_field=None, rhohv_field=None, ml_field=None, ml_pos_field=None, iso0_field=None, max_range=20000, detect_threshold=0.02, interp_holes=False, max_length_holes=250, check_min_length=True, get_iso0=False)[source]¶ Detects the melting layer (ML) using the reflectivity and copolar correlation coefficient. Internally it uses RHIs
Returns: - ml_obj : radar-like object
A radar-like object containing the field melting layer height with the bottom (at range position 0) and top (at range position one) of the melting layer at each ray
- ml_dict : dict
A dictionary containg the position of the range gate respect to the melting layer and metadata
- iso0_dict : dict or None
A dictionary containing the distance respect to the melting layer and metadata
- all_ml : dict
Dictionary containing internal parameters in polar and cartesian coordinates
-
pyart.retrieve.
est_rain_rate_a
(radar, alpha=None, beta=None, a_field=None, rr_field=None)[source]¶ Estimates rainfall rate from specific attenuation using alpha power law.
Parameters: - radar : Radar
Radar object.
- alpha, beta : floats, optional
Factor (alpha) and exponent (beta) of the power law. If not set the factors are going to be determined according to the radar frequency.
- a_field : str, optional
Name of the specific attenuation field to use.
- rr_field : str, optional
Name of the rainfall rate field.
Returns: - rain : dict
Field dictionary containing the rainfall rate.
References
Diederich M., Ryzhkov A., Simmer C., Zhang P. and Tromel S., 2015: Use of Specific Attenuation for Rainfall Measurement at X-Band Radar Wavelenghts. Part I: Radar Calibration and Partial Beam Blockage Estimation. Journal of Hydrometeorology, 16, 487-502.
Ryzhkov A., Diederich M., Zhang P. and Simmer C., 2014: Potential Utilization of Specific Attenuation for Rainfall Estimation, Mitigation of Partial Beam Blockage, and Radar Networking. Journal of Atmospheric and Oceanic Technology, 31, 599-619.
-
pyart.retrieve.
est_rain_rate_hydro
(radar, alphazr=0.0376, betazr=0.6112, alphazs=0.1, betazs=0.5, alphaa=None, betaa=None, mp_factor=0.6, refl_field=None, a_field=None, hydro_field=None, rr_field=None, master_field=None, thresh=None, thresh_max=False)[source]¶ Estimates rainfall rate using different relations between R and the polarimetric variables depending on the hydrometeor type.
Parameters: - radar : Radar
Radar object.
- alphazr, betazr : floats, optional
Factor (alpha) and exponent (beta) of the z-r power law for rain.
- alphazs, betazs : floats, optional
Factor (alpha) and exponent (beta) of the z-s power law for snow.
- alphaa, betaa : floats, optional
Factor (alpha) and exponent (beta) of the a-r power law. If not set the factors are going to be determined according to the radar frequency.
- mp_factor : float, optional
Factor applied to z-r relation in the melting layer.
- refl_field : str, optional
Name of the reflectivity field to use.
- a_field : str, optional
Name of the specific attenuation field to use.
- hydro_field : str, optional
Name of the hydrometeor classification field to use.
- rr_field : str, optional
Name of the rainfall rate field.
- master_field : str, optional
Name of the field that is going to act as master. Has to be either refl_field or kdp_field. Default is refl_field.
- thresh : float, optional
Value of the threshold that determines when to use the slave field.
- thresh_max : Bool, optional
If true the master field is used up to the thresh value maximum. Otherwise the master field is not used below thresh value.
Returns: - rain : dict
Field dictionary containing the rainfall rate.
-
pyart.retrieve.
est_rain_rate_kdp
(radar, alpha=None, beta=None, kdp_field=None, rr_field=None)[source]¶ Estimates rainfall rate from kdp using alpha power law.
Parameters: - radar : Radar
Radar object.
- alpha, beta : floats, optional
Factor (alpha) and exponent (beta) of the power law. If not set the factors are going to be determined according to the radar frequency.
- kdp_field : str, optional
Name of the specific differential phase field to use.
- rr_field : str, optional
Name of the rainfall rate field.
Returns: - rain : dict
Field dictionary containing the rainfall rate.
-
pyart.retrieve.
est_rain_rate_z
(radar, alpha=0.0376, beta=0.6112, refl_field=None, rr_field=None)[source]¶ Estimates rainfall rate from reflectivity using a power law.
Parameters: - radar : Radar
Radar object.
- alpha, beta : floats, optional
Factor (alpha) and exponent (beta) of the power law.
- refl_field : str, optional
Name of the reflectivity field to use.
- rr_field : str, optional
Name of the rainfall rate field.
Returns: - rain : dict
Field dictionary containing the rainfall rate.
-
pyart.retrieve.
est_rain_rate_za
(radar, alphaz=0.0376, betaz=0.6112, alphaa=None, betaa=None, refl_field=None, a_field=None, rr_field=None, master_field=None, thresh=None, thresh_max=True)[source]¶ Estimates rainfall rate from a blending of power law r-alpha and r-z relations.
Parameters: - radar : Radar
Radar object
- alphaz, betaz : floats, optional
Factor (alpha) and exponent (beta) of the z-r power law.
- alphaa,betaa : floats, optional
Factor (alpha) and exponent (beta) of the a-r power law. If not set the factors are going to be determined according to the radar frequency.
- refl_field : str, optional
Name of the reflectivity field to use.
- a_field : str, optional
Name of the specific attenuation field to use.
- rr_field : str, optional
Name of the rainfall rate field.
- master_field : str, optional
Name of the field that is going to act as master. Has to be either refl_field or kdp_field. Default is refl_field.
- thresh : float, optional
Value of the threshold that determines when to use the slave field.
- thresh_max : Bool, optional
If true the master field is used up to the thresh value maximum. Otherwise the master field is not used below thresh value.
Returns: - rain_master : dict
Field dictionary containing the rainfall rate.
-
pyart.retrieve.
est_rain_rate_zkdp
(radar, alphaz=0.0376, betaz=0.6112, alphakdp=None, betakdp=None, refl_field=None, kdp_field=None, rr_field=None, master_field=None, thresh=None, thresh_max=True)[source]¶ Estimates rainfall rate from a blending of power law r-kdp and r-z relations.
Parameters: - radar : Radar
Radar object.
- alphaz, betaz : floats, optional
Factor (alpha) and exponent (beta) of the z-r power law.
- alphakdp, betakdp : floats, optional
Factor (alpha) and exponent (beta) of the kdp-r power law. If not set the factors are going to be determined according to the radar frequency.
- refl_field : str, optional
Name of the reflectivity field to use.
- kdp_field : str, optional
Name of the specific differential phase field to use.
- rr_field : str, optional
Name of the rainfall rate field.
- master_field : str, optional
Name of the field that is going to act as master. Has to be either refl_field or kdp_field. Default is refl_field.
- thresh : float, optional
Value of the threshold that determines when to use the slave field [mm/h].
- thresh_max : Bool, optional
If true the master field is used up to the thresh value maximum. Otherwise the master field is not used below thresh value.
Returns: - rain_master : dict
Field dictionary containing the rainfall rate.
-
pyart.retrieve.
est_rain_rate_zpoly
(radar, refl_field=None, rr_field=None)[source]¶ Estimates rainfall rate from reflectivity using a polynomial Z-R relation developed at McGill University.
Parameters: - radar : Radar
Radar object.
- refl_field : str, optional
Name of the reflectivity field to use.
- rr_field : str, optional
Name of the rainfall rate field.
Returns: - rain : dict
Field dictionary containing the rainfall rate.
-
pyart.retrieve.
est_vertical_windshear
(radar, az_tol=0.5, wind_field=None, windshear_field=None)[source]¶ Estimates wind shear.
Parameters: - radar : Radar
Radar object
- az_tol : float
azimuth tolerance to consider gate on top of selected one
- wind_field : str
name of the horizontal wind velocity field
- windshear_field : str
name of the vertical wind shear field
Returns: - windshear : dict
Field dictionary containing the wind shear field
-
pyart.retrieve.
est_wind_profile
(radar, npoints_min=6, azi_spacing_max=45.0, vel_diff_max=10.0, sign=1, rad_vel_field=None, u_vel_field=None, v_vel_field=None, w_vel_field=None, vel_est_field=None, vel_std_field=None, vel_diff_field=None)[source]¶ Estimates the vertical wind profile using VAD techniques
Parameters: - radar : Radar
Radar object
- npoints_min : int
Minimum number of points in the VAD to retrieve wind components. 0 will retrieve them regardless
- azi_spacing_max : float
Maximum spacing between valid gates in the VAD to retrieve wind components. 0 will retrieve them regardless.
- vel_diff_max : float
Maximum velocity difference allowed between retrieved and measured radial velocity at each range gate. Gates exceeding this threshold will be removed and VAD will be recomputed. If -1 there will not be a second pass.
- sign : int, optional
Sign convention which the radial velocities in the volume created from the sounding data will will. This should match the convention used in the radar data. A value of 1 represents when positive values velocities are towards the radar, -1 represents when negative velocities are towards the radar.
- rad_vel_field : str
name of the measured radial velocity field
- u_vel_field, v_vel_field, w_vel_field : str
names of the 3 wind components fields
- vel_est_field : str
name of the retrieved radial Doppler velocity field
- vel_std_field : str
name of the standard deviation of the velocity retrieval field
- vel_diff_field : str
name of the diference between retrieved and measured radial velocity field
Returns: - wind : dict
Field dictionary containing the estimated wind velocity
-
pyart.retrieve.
est_wind_vel
(radar, vert_proj=False, vel_field=None, wind_field=None)[source]¶ Estimates wind velocity. Projects the radial wind component to the horizontal or vertical of the azimuth plane. It assumes that the orthogonal component is negligible.
- The horizontal wind component is given by:
- v = v_r*cos(el)-v_el*sin(el)+v_az
- where:
- v_r is the radial wind component (measured by the radar) v_el is the perpendicular wind component in the azimuth plane. v_az is the horizontal component perpendicular to the radial direction and the azimuth plane el is the elevation
- The horizontal wind component in the azimuth plane is given by:
- v_h = v_r*cos(el) - v_el*sin(el)
- which since we do not know v_el we assume:
- v_h ~ v_r*cos(el)
This assumption holds for small elevation angles
- The vertical wind component in the azimuth plane is given by:
- v_h = v_r*sin(el) - v_el*cos(el)
- which since we do not know v_el we assume:
- v_h ~ v_r*sin(el)
This assumption holds for angles close to 90 deg
Parameters: - radar : Radar
Radar object
- vert_proj : Boolean
If true estimates the vertical projection, otherwise the horizontal
- vel_field : str
name of the velocity field
- wind_field : str
name of the velocity field
Returns: - wind : dict
Field dictionary containing the estimated wind velocity
-
pyart.retrieve.
fetch_radar_time_profile
(sonde_dset, radar, time_key='time', height_key='height', nvars=None)[source]¶ Extract the correct profile from a interpolated sonde.
This is an ARM specific method which extract the correct profile out of netCDF Variables from a Interpolated Sonde VAP for the volume start time of a radar object.
Parameters: - sonde_dset : Dataset
Interpolate sonde Dataset.
- radar : Radar
Radar object from which the nearest profile will be found.
- time_key : string, optional
Key to find a CF startard time variable.
- height_key : string, optional
Key to find profile height data.
- nvars : list, optional
NetCDF variable to generated profiles for. If None (the default) all variables with dimension of time, height will be found in ncvars.
Returns: - return_dic : dict
Profiles at the start time of the radar.
-
pyart.retrieve.
get_coeff_attg
(freq)[source]¶ get the 1-way gas attenuation for a particular frequency
Parameters: - freq : float
radar frequency [Hz]
Returns: - attg : float
1-way gas attenuation
-
pyart.retrieve.
get_freq_band
(freq)[source]¶ Returns the frequency band name (S, C, X, …).
Parameters: - freq : float
Radar frequency [Hz].
Returns: - freq_band : str
Frequency band name.
-
pyart.retrieve.
grid_displacement_pc
(grid1, grid2, field, level, return_value='pixels')[source]¶ Calculate the grid displacement using phase correlation.
See: http://en.wikipedia.org/wiki/Phase_correlation
Implementation inspired by Christoph Gohlke: http://www.lfd.uci.edu/~gohlke/code/imreg.py.html
Note that the grid must have the same dimensions in x and y and assumed to have constant spacing in these dimensions.
Parameters: - grid1, grid2 : Grid
Py-ART Grid objects separated in time and square in x/y.
- field : string
Field to calculate advection from. Field must be in both grid1 and grid2.
- level : integer
The vertical (z) level of the grid to use in the calculation.
- return_value : str, optional
‘pixels’, ‘distance’ or ‘velocity’. Distance in pixels (default) or meters or velocity vector in m/s.
Returns: - displacement : two-tuple
Calculated displacement in units of y and x. Value returned in integers if pixels, otherwise floats.
-
pyart.retrieve.
grid_shift
(grid, advection, trim_edges=0, field_list=None)[source]¶ Shift a grid by a certain number of pixels.
Parameters: - grid: Grid
Py-ART Grid object.
- advection : two-tuple of floats
Number of Pixels to shift the image by.
- trim_edges: integer, optional
Edges to cut off the grid and axes, both x and y. Defaults to zero.
- field_list : list, optional
List of fields to include in new grid. None, the default, includes all fields from the input grid.
Returns: - shifted_grid : Grid
Grid with fields shifted and, if requested, subset.
-
pyart.retrieve.
hydroclass_semisupervised
(radar, mass_centers=None, weights=array([1., 1., 1., 0.75, 0.5 ]), value=50.0, refl_field=None, zdr_field=None, rhv_field=None, kdp_field=None, temp_field=None, iso0_field=None, hydro_field=None, entropy_field=None, temp_ref='temperature', compute_entropy=False, output_distances=False, vectorize=False)[source]¶ Classifies precipitation echoes following the approach by Besic et al (2016).
Parameters: - radar : radar
Radar object.
- mass_centers : ndarray 2D, optional
The centroids for each variable and hydrometeor class in (nclasses, nvariables).
- weights : ndarray 1D, optional
The weight given to each variable.
- value : float
The value controlling the rate of decay in the distance transformation
- refl_field, zdr_field, rhv_field, kdp_field, temp_field, iso0_field : str
Inputs. Field names within the radar object which represent the horizonal reflectivity, the differential reflectivity, the copolar correlation coefficient, the specific differential phase, the temperature and the height respect to the iso0 fields. A value of None for any of these parameters will use the default field name as defined in the Py-ART configuration file.
- hydro_field : str
Output. Field name which represents the hydrometeor class field. A value of None will use the default field name as defined in the Py-ART configuration file.
- temp_ref : str
the field use as reference for temperature. Can be either temperature or height_over_iso0
- compute_entropy : bool
If true, the entropy is computed
- output_distances : bool
If true, the normalized distances to the centroids for each hydrometeor are provided as output
- vectorize : bool
If true, a vectorized version of the class assignation is going to be used
Returns: - fields_dict : dict
Dictionary containing the retrieved fields
References
Besic, N., Figueras i Ventura, J., Grazioli, J., Gabella, M., Germann, U., and Berne, A.: Hydrometeor classification through statistical clustering of polarimetric radar measurements: a semi-supervised approach, Atmos. Meas. Tech., 9, 4425-4445, doi:10.5194/amt-9-4425-2016, 2016
-
pyart.retrieve.
kdp_leastsquare_double_window
(radar, swind_len=11, smin_valid=6, lwind_len=31, lmin_valid=16, zthr=40.0, phidp_field=None, refl_field=None, kdp_field=None, vectorize=False)[source]¶ Compute the specific differential phase (KDP) from differential phase data using a piecewise least square method. For optimal results PhiDP should be already smoothed and clutter filtered out.
Parameters: - radar : Radar
Radar object.
- swind_len : int
The lenght of the short moving window.
- smin_valid : int
Minimum number of valid bins to consider the retrieval valid when using the short moving window
- lwind_len : int
The lenght of the long moving window.
- lmin_valid : int
Minimum number of valid bins to consider the retrieval valid when using the long moving window
- zthr : float
reflectivity value above which the short window is used
- phidp_field : str
Field name within the radar object which represent the differential phase shift. A value of None will use the default field name as defined in the Py-ART configuration file.
- refl_field : str
Field name within the radar object which represent the reflectivity. A value of None will use the default field name as defined in the Py-ART configuration file.
- kdp_field : str
Field name within the radar object which represent the specific differential phase shift. A value of None will use the default field name as defined in the Py-ART configuration file.
- vectorize : bool
whether to use a vectorized version of the least square method
Returns: - kdp_dict : dict
Retrieved specific differential phase data and metadata.
-
pyart.retrieve.
kdp_leastsquare_single_window
(radar, wind_len=11, min_valid=6, phidp_field=None, kdp_field=None, vectorize=False)[source]¶ Compute the specific differential phase (KDP) from differential phase data using a piecewise least square method. For optimal results PhiDP should be already smoothed and clutter filtered out.
Parameters: - radar : Radar
Radar object.
- wind_len : int
The lenght of the moving window.
- min_valid : int
Minimum number of valid bins to consider the retrieval valid
- phidp_field : str
Field name within the radar object which represent the differential phase shift. A value of None will use the default field name as defined in the Py-ART configuration file.
- kdp_field : str
Field name within the radar object which represent the specific differential phase shift. A value of None will use the default field name as defined in the Py-ART configuration file.
- vectorize : bool
whether to use a vectorized version of the least square method
Returns: - kdp_dict : dict
Retrieved specific differential phase data and metadata.
-
pyart.retrieve.
kdp_maesaka
(radar, gatefilter=None, method='cg', backscatter=None, Clpf=1.0, length_scale=None, first_guess=0.01, finite_order='low', fill_value=None, proc=1, psidp_field=None, kdp_field=None, phidp_field=None, debug=False, verbose=False, **kwargs)[source]¶ Compute the specific differential phase (KDP) from corrected (e.g., unfolded) total differential phase data based on the variational method outlined in Maesaka et al. (2012). This method assumes a monotonically increasing propagation differential phase (PHIDP) with increasing range from the radar, and therefore is limited to rainfall below the melting layer and/or warm clouds at weather radar frequencies (e.g., S-, C-, and X-band). This method currently only supports radar data with constant range resolution.
Following the notation of Maesaka et al. (2012), the primary control variable k is proportional to KDP,
k**2 = 2 * KDP * drwhich, because of the square, assumes that KDP always takes a positive value.
Parameters: - radar : Radar
Radar containing differential phase field.
- gatefilter : GateFilter
A GateFilter indicating radar gates that should be excluded when analysing differential phase measurements.
- method : str, optional
Type of scipy.optimize method to use when minimizing the cost functional. The default method uses a nonlinear conjugate gradient algorithm. In Maesaka et al. (2012) they use the Broyden-Fletcher- Goldfarb-Shanno (BFGS) algorithm, however for large functional size (e.g., 100K+ variables) this algorithm is considerably slower than a conjugate gradient algorithm.
- backscatter : optional
Define the backscatter differential phase. If None, the backscatter differential phase is set to zero for all range gates. Note that backscatter differential phase can be parameterized using attentuation corrected differential reflectivity.
- Clpf : float, optional
The low-pass filter (radial smoothness) constraint weight as in equation (15) of Maesaka et al. (2012).
- length_scale : float, optional
Length scale in meters used to bring the dimension and magnitude of the low-pass filter cost functional in line with the observation cost functional. If None, the length scale is set to the range resolution.
- first_guess : float, optional
First guess for control variable k. Since k is proportional to the square root of KDP, the first guess should be close to zero to signify a KDP field close to 0 deg/km everywhere. However, the first guess should not be exactly zero in order to avoid convergence criteria after the first iteration. In fact it is recommended to use a value closer to one than zero.
- finite_order : ‘low’ or ‘high’, optional
The finite difference accuracy to use when computing derivatives.
- maxiter : int, optional
Maximum number of iterations to perform during cost functional minimization. The maximum number of iterations are only performed if convergence criteria are not met. For variational schemes such as this one, it is generally not recommended to try and achieve convergence criteria since the values of the cost functional and/or its gradient norm are somewhat arbitrary.
- fill_value : float, optional
Value indicating missing or bad data in differential phase field.
- proc : int, optional
The number of parallel threads (CPUs) to use. Currently no multiprocessing capability exists.
- psidp_field : str, optional
Total differential phase field. If None, the default field name must be specified in the Py-ART configuration file.
- kdp_field : str, optional
Specific differential phase field. If None, the default field name must be specified in the Py-ART configuration file.
- phidp_field : str, optional
Propagation differential phase field. If None, the default field name must be specified in the Py-ART configuration file.
- debug : bool, optional
True to print debugging information, False to suppress.
- verbose : bool, optional
True to print relevant information, False to suppress.
Returns: - kdp_dict : dict
Retrieved specific differential phase data and metadata.
- phidpf_dict, phidpr_dict : dict
Retrieved forward and reverse direction propagation differential phase data and metadata.
References
Maesaka, T., Iwanami, K. and Maki, M., 2012: “Non-negative KDP Estimation by Monotone Increasing PHIDP Assumption below Melting Layer”. The Seventh European Conference on Radar in Meteorology and Hydrology.
-
pyart.retrieve.
kdp_schneebeli
(radar, gatefilter=None, fill_value=None, psidp_field=None, kdp_field=None, phidp_field=None, band='C', rcov=0, pcov=0, prefilter_psidp=False, filter_opt=None, parallel=True)[source]¶ Estimates Kdp with the Kalman filter method by Schneebeli and al. (2014) for a set of psidp measurements.
Parameters: - radar : Radar
Radar containing differential phase field.
- gatefilter : GateFilter, optional
A GateFilter indicating radar gates that should be excluded when analysing differential phase measurements.
- fill_value : float, optional
Value indicating missing or bad data in differential phase field, if not specified, the default in the Py-ART configuration file will be used.
- psidp_field : str, optional
Total differential phase field. If None, the default field name must be specified in the Py-ART configuration file.
- kdp_field : str, optional
Specific differential phase field. If None, the default field name must be specified in the Py-ART configuration file.
- phidp_field : str, optional
Propagation differential phase field. If None, the default field name must be specified in the Py-ART configuration file.
- band : char, optional
Radar frequency band string. Accepted “X”, “C”, “S” (capital or not). The band is used to compute intercepts -c and slope b of the delta = b*Kdp+c relation.
- rcov : 3x3 float array, optional
Measurement error covariance matrix.
- pcov : 4x4 float array, optional
Scaled state transition error covariance matrix.
- prefilter_psidp : bool, optional
If set, the psidp measurements will first be filtered with the filter_psidp method, which can improve the quality of the final Kdp.
- filter_opt : dict, optional
The arguments for the prefilter_psidp method, if empty, the defaults arguments of this method will be used.
- parallel : bool, optional
Flag to enable parallel computation (one core for every psidp profile).
Returns: - kdp_dict : dict
Retrieved specific differential phase data and metadata.
- kdp_std_dict : dict
Estimated specific differential phase standard dev. data and metadata.
- phidpr_dict,: dict
Retrieved differential phase data and metadata.
References
Schneebeli, M., Grazioli, J., and Berne, A.: Improved Estimation of the Specific Differential Phase SHIFT Using a Compilation of Kalman Filter Ensembles, IEEE T. Geosci. Remote Sens., 52, 5137-5149, doi:10.1109/TGRS.2013.2287017, 2014.
-
pyart.retrieve.
kdp_vulpiani
(radar, gatefilter=None, fill_value=None, psidp_field=None, kdp_field=None, phidp_field=None, band='C', windsize=10, n_iter=10, interp=False, prefilter_psidp=False, filter_opt=None, parallel=False)[source]¶ Estimates Kdp with the Vulpiani method for a 2D array of psidp measurements with the first dimension being the distance from radar and the second dimension being the angles (azimuths for PPI, elev for RHI).The input psidp is assumed to be pre-filtered (for ex. with the filter_psidp function)
Parameters: - radar : Radar
Radar containing differential phase field.
- gatefilter : GateFilter, optional
A GateFilter indicating radar gates that should be excluded when analysing differential phase measurements.
- fill_value : float, optional
Value indicating missing or bad data in differential phase field, if not specified, the default in the Py-ART configuration file will be used
- psidp_field : str, optional
Total differential phase field. If None, the default field name must be specified in the Py-ART configuration file.
- kdp_field : str, optional
Specific differential phase field. If None, the default field name must be specified in the Py-ART configuration file.
- phidp_field : str, optional
Propagation differential phase field. If None, the default field name must be specified in the Py-ART configuration file.
- band : char, optional
Radar frequency band string. Accepted “X”, “C”, “S” (capital or not). It is used to set default boundaries for expected values of Kdp.
- windsize : int, optional
Size in # of gates of the range derivative window. Should be even.
- n_iter : int, optional
Number of iterations of the method. Default is 10.
- interp : bool, optional
If True, all the nans are interpolated.The advantage is that less data are lost (the iterations in fact are “eating the edges”) but some non-linear errors may be introduced.
- prefilter_psidp : bool, optional
If set, the psidp measurements will first be filtered with the filter_psidp method, which can improve the quality of the final Kdp.
- filter_opt : dict, optional
The arguments for the prefilter_psidp method, if empty, the defaults arguments of this method will be used.
- parallel : bool, optional
Flag to enable parallel computation (one core for every psidp profile).
Returns: - kdp_dict : dict
Retrieved specific differential phase data and metadata.
- phidpr_dict,: dict
Retrieved differential phase data and metadata.
References
Gianfranco Vulpiani, Mario Montopoli, Luca Delli Passeri, Antonio G. Gioia, Pietro Giordano, and Frank S. Marzano, 2012: On the Use of Dual-Polarized C-Band Radar for Operational Rainfall Retrieval in Mountainous Areas. J. Appl. Meteor. Climatol., 51, 405-425, doi: 10.1175/JAMC-D-10-05024.1.
-
pyart.retrieve.
map_profile_to_gates
(profile, heights, radar, toa=None, profile_field=None, height_field=None)[source]¶ Given a profile of a variable map it to the gates of radar assuming 4/3Re.
Parameters: - profile : array
Profile array to map.
- heights : array
Monotonically increasing heights in meters with same shape as profile.
- radar : Radar
Radar to map to.
- toa : float, optional
Top of atmosphere, where to use profile up to. If None check for mask and use lowest element, if no mask uses whole profile.
- height_field : str, optional
Name to use for height field metadata. None will use the default field name from the Py-ART configuration file.
- profile_field : str, optional
Name to use for interpolate profile field metadata. None will use the default field name from the Py-ART configuration file.
Returns: - height_dict, profile_dict : dict
Field dictionaries containing the height of the gates and the profile interpolated onto the radar gates.
-
pyart.retrieve.
melting_layer_giangrande
(radar, nVol=3, maxh=6000.0, hres=50.0, rmin=1000.0, elmin=4.0, elmax=10.0, rhomin=0.75, rhomax=0.94, zhmin=20.0, hwindow=500.0, mlzhmin=30.0, mlzhmax=50.0, mlzdrmin=1.0, mlzdrmax=5.0, htol=500.0, ml_bottom_diff_max=1000.0, time_accu_max=1800.0, nml_points_min=None, wlength=20.0, percentile_bottom=0.3, percentile_top=0.9, interpol=True, time_nodata_allowed=3600.0, refl_field=None, zdr_field=None, rhv_field=None, temp_field=None, iso0_field=None, ml_field=None, ml_pos_field=None, temp_ref=None, get_iso0=False, ml_global=None)[source]¶ Detects the melting layer following the approach by Giangrande et al (2008)
Parameters: - radar : radar
radar object
Returns: - ml_obj : radar-like object
A radar-like object containing the field melting layer height with the bottom (at range position 0) and top (at range position one) of the melting layer at each ray
- ml_dict : dict
A dictionary containg the position of the range gate respect to the melting layer and metadata
- iso0_dict : dict or None
A dictionary containing the distance respect to the melting layer and metadata
- ml_global : dict or None
stack of previous volume data to introduce some time dependency. Its max size is controlled by the nVol parameter. It is always in (pseudo-)RHI mode.
Other Parameters: - nVol : int
Number of volume scans to aggregate
- maxh : float
Maximum possible height of the melting layer [m MSL]
- hres : float
Step of the height of the melting layer [m]
- rmin : float
Minimum range from radar where to look for melting layer contaminated range gates [m]
- elmin, elmax : float
Minimum and maximum elevation angles where to look for melting layer contaminated range gates [degree]
- rhomin, rhomax : float
min and max rhohv to consider pixel potential melting layer pixel
- zhmin : float
Minimum reflectivity level of a range gate to consider it a potential melting layer gate [dBZ]
- hwindow : float
Maximum distance (in range) from potential melting layer gate where to look for a maximum [m]
- mlzhmin, mlzhmax : float
Minimum and maximum values that a peak in reflectivity within the melting layer may have to consider the range gate melting layer contaminated [dBZ]
- mlzdrmin, mlzdrmax : float
Minimum and maximum values that a peak in differential reflectivity within the melting layer may have to consider the range gate melting layer contaminated [dB]
- htol : float
maximum distance from the iso0 coming from model allowed to consider the range gate melting layer contaminated [m]
- ml_bottom_dif_max : float
Maximum distance from the bottom of the melting layer computed in the previous time step to consider a range gate melting layer contaminated [m]
- time_accu_max : float
Maximum time allowed to accumulate data from consecutive scans [s]
- nml_points_min : int
minimum number of melting layer points to consider valid melting layer detection
- wlength : float
length of the window to select the azimuth angles used to compute the melting layer limits at a particular azimuth [degree]
- percentile_bottom, percentile_top : float [0,1]
percentile of ml points above which is considered that the bottom of the melting layer starts and the top ends
- interpol : bool
Whether to interpolate the obtained results in order to get a value for each azimuth
- time_nodata_allowed : float
The maximum time allowed for no data before considering the melting layer not valid [s]
- refl_field, zdr_field, rhv_field, temp_field, iso0_field : str
Inputs. Field names within the radar object which represent the horizonal reflectivity, the differential reflectivity, the copolar correlation coefficient, the temperature and the height respect to the iso0 fields. A value of None for any of these parameters will use the default field name as defined in the Py-ART configuration file.
- ml_field : str
Output. Field name which represents the melting layer field. A value of None will use the default field name as defined in the Py-ART configuration file.
- ml_pos_field : str
Output. Field name which represents the melting layer top and bottom height field. A value of None will use the default field name as defined in the Py-ART configuration file.
- temp_ref : str
the field use as reference for temperature. Can be temperature or height_over_iso0. If None, it excludes model data from the algorithm.
- get_iso0 : bool
returns height w.r.t. freezing level top for each gate in the radar volume.
- ml_global :
stack of previous volume data to introduce some time dependency. Its max size is controlled by the nVol parameter. It is always in (pseudo-)RHI mode.
References
Giangrande, S.E., Krause, J.M., Ryzhkov, A.V.: Automatic Designation of the Melting Layer with a Polarimetric Prototype of the WSR-88D Radar, J. of Applied Meteo. and Clim., 47, 1354-1364, doi:10.1175/2007JAMC1634.1, 2008
-
pyart.retrieve.
melting_layer_hydroclass
(radar, hydro_field=None, ml_field=None, ml_pos_field=None, iso0_field=None, force_continuity=True, dist_max=350.0, get_iso0=False)[source]¶ Using the results of the hydrometeor classification by Besic et al. estimates the position of the range gates respect to the melting layer, the melting layer top and bottom height and the distance of the range gate with respect to the freezing level.
Parameters: - radar : Radar
Radar object. Must have and hydrometeor classification field
- hydro_field : str
Name of the hydrometeor classification field. A value of None will use the default field name as defined in the Py-ART configuration file.
- ml_field, ml_pos_field, iso0_field : str
Name of the melting layer, melting layer heightand iso0 field. A value of None for any of these parameters will use the default field names as defined in the Py-ART configuration file.
- force_continuity : Bool
If True, the melting layer is forced to be continuous in range
- dist_max : float
The maximum distance between range gates flagged as inside the melting layer to consider them as gates in the melting layer.
Returns: - ml_obj : radar-like object
A radar-like object containing the field melting layer height with the bottom (at range position 0) and top (at range position one) of the melting layer at each ray
- ml_dict : dict
A dictionary containg the position of the range gate respect to the melting layer and metadata
- iso0_dict : dict or None
A dictionary containing the distance respect to the melting layer and metadata
-
pyart.retrieve.
quasi_vertical_profile
(radar, desired_angle=None, fields=None, gatefilter=None)[source]¶ Quasi Vertical Profile.
Creates a QVP object containing fields from a radar object that can be used to plot and produce the quasi vertical profile
Parameters: - radar : Radar
Radar object used.
- field : string
Radar field to use for QVP calculation.
- desired_angle : float
Radar tilt angle to use for indexing radar field data. None will result in wanted_angle = 20.0
Returns: - qvp : Dictonary
A quasi vertical profile object containing fields from a radar object
Other Parameters: - gatefilter : GateFilter
A GateFilter indicating radar gates that should be excluded from the import qvp calculation
References
Troemel, S., M. Kumjian, A. Ryzhkov, and C. Simmer, 2013: Backscatter differential phase - estimation and variability. J Appl. Meteor. Clim.. 52, 2529 - 2548.
Troemel, S., A. Ryzhkov, P. Zhang, and C. Simmer, 2014: Investigations of backscatter differential phase in the melting layer. J. Appl. Meteorol. Clim. 54, 2344 - 2359.
Ryzhkov, A., P. Zhang, H. Reeves, M. Kumjian, T. Tschallener, S. Tromel, C. Simmer, 2015: Quasi-vertical profiles - a new way to look at polarimetric radar data. Submitted to J. Atmos. Oceanic Technol.
-
pyart.retrieve.
steiner_conv_strat
(grid, dx=None, dy=None, intense=42.0, work_level=3000.0, peak_relation='default', area_relation='medium', bkg_rad=11000.0, use_intense=True, fill_value=None, refl_field=None)[source]¶ Partition reflectivity into convective-stratiform using the Steiner et al. (1995) algorithm.
Parameters: - grid : Grid
Grid containing reflectivity field to partition.
- dx, dy : float, optional
The x- and y-dimension resolutions in meters, respectively. If None the resolution is determined from the first two axes values.
- intense : float, optional
The intensity value in dBZ. Grid points with a reflectivity value greater or equal to the intensity are automatically flagged as convective. See reference for more information.
- work_level : float, optional
The working level (separation altitude) in meters. This is the height at which the partitioning will be done, and should minimize bright band contamination. See reference for more information.
- peak_relation : ‘default’ or ‘sgp’, optional
The peakedness relation. See reference for more information.
- area_relation : ‘small’, ‘medium’, ‘large’, or ‘sgp’, optional
The convective area relation. See reference for more information.
- bkg_rad : float, optional
The background radius in meters. See reference for more information.
- use_intense : bool, optional
True to use the intensity criteria.
- fill_value : float, optional
Missing value used to signify bad data points. A value of None will use the default fill value as defined in the Py-ART configuration file.
- refl_field : str, optional
Field in grid to use as the reflectivity during partitioning. None will use the default reflectivity field name from the Py-ART configuration file.
Returns: - eclass : dict
Steiner convective-stratiform classification dictionary.
References
Steiner, M. R., R. A. Houze Jr., and S. E. Yuter, 1995: Climatological Characterization of Three-Dimensional Storm Structure from Operational Radar and Rain Gauge Data. J. Appl. Meteor., 34, 1978-2007.
-
pyart.retrieve.
velocity_azimuth_display
(radar, vel_field=None, z_want=None, gatefilter=None)[source]¶ Velocity azimuth display.
Creates a VAD object containing U Wind, V Wind and height that can then be used to plot and produce the velocity azimuth display.
Parameters: - radar : Radar
Radar object used.
- vel_field : string, optional
Velocity field to use for VAD calculation.
- z_want : array, optional
Heights for where to sample vads from. None will result in np.linespace(0, 10000, 100).
- gatefilter : GateFilter, optional
A GateFilter indicating radar gates that should be excluded from the import vad calculation.
Returns: - vad: HorizontalWindProfile
A velocity azimuth display object containing height, speed, direction, u_wind, v_wind from a radar object.