wradlib.dp.DpMethods#
- class wradlib.dp.DpMethods(obj)[source]#
Bases:
XarrayMethods
wradlib xarray SubAccessor methods for DualPol.
- depolarization(**kwargs)[source]#
Compute the depolarization ration.
Compute the depolarization ration using differential reflectivity \(Z_{DR}\) and crosscorrelation coefficient \(Rho_{HV}\) of a radar sweep ([Kilambi et al., 2018], [Melnikov et al., 2013], [Ryzhkov et al., 2017]).
Parameter#
obj :
xarray.Dataset
- keyword zdr
name of differential reflectivity
- kwtype zdr
- keyword rho
name crosscorrelation coefficient
- kwtype rho
- returns
depolarization (
xarray.DataArray
) – array of depolarization ratios with the same shape as input data, numpy broadcasting rules apply
- kdp_from_phidp(*, winlen=7, **kwargs)[source]#
Retrieves \(K_{DP}\) from \(Phi_{DP}\).
Parameter#
- obj
xarray.DataArray
DataArray containing differential phase
- keyword winlen
window length
- kwtype winlen
- keyword method
Defaults to ‘lanczos_conv’. Can also take one of ‘lanczos_dot’, ‘lstsq’, ‘cov’, ‘cov_nan’, ‘matrix_inv’.
- kwtype method
- keyword skipna
Defaults to True. Local Linear regression removing NaN values using valid neighbors > min_periods
- kwtype skipna
- keyword min_periods
Minimum number of valid values in moving window for linear regression. Defaults to winlen // 2 + 1.
- kwtype min_periods
- returns
out (
xarray.DataArray
) – DataArray
- obj
- process_raw_phidp_vulpiani(*, winlen=7, **kwargs)[source]#
Retrieves \(K_{DP}\) from \(Phi_{DP}\).
Parameter#
- obj
xarray.DataArray
DataArray containing differential phase
- winlenint
window length
- keyword method
Defaults to ‘lanczos_conv’. Can also take one of ‘lanczos_dot’, ‘lstsq’, ‘cov’, ‘cov_nan’, ‘matrix_inv’.
- kwtype method
- keyword skipna
Defaults to True. Local Linear regression removing NaN values using valid neighbors > min_periods
- kwtype skipna
- keyword min_periods
Minimum number of valid values in moving window for linear regression. Defaults to winlen // 2 + 1.
- kwtype min_periods
- returns
phidp (
xarray.DataArray
) – DataArraykdp (
xarray.DataArray
) – DataArray
- obj
- texture()[source]#
Compute the texture of data.
Compute the texture of the data by comparing values with a 3x3 neighborhood (based on [Gourley et al., 2007]). NaN values in the original array have NaN textures.
- Parameters
obj (
xarray.DataArray
) – DataArray- Returns
texture (
xarray.DataArray
) – DataArray
- unfold_phi_naive(**kwargs)[source]#
Unfolds differential phase by adjusting values that exceeded maximum ambiguous range.
Accepts arbitrarily dimensioned arrays, but THE LAST DIMENSION MUST BE THE RANGE.
This is the slow Python-based implementation (NOT RECOMMENDED).
The algorithm is based on the paper of [Wang et al., 2009].
- Parameters
obj (
xarray.Dataset
)- Keyword Arguments
- Returns
out (
xarray.DataArray
) – DataArray
- unfold_phi(**kwargs)[source]#
Unfolds differential phase by adjusting values that exceeded maximum ambiguous range.
Accepts arbitrarily dimensioned arrays, but THE LAST DIMENSION MUST BE THE RANGE.
This is the fast Fortran-based implementation (RECOMMENDED).
The algorithm is based on the paper of [Wang et al., 2009].
- Parameters
obj (
xarray.Dataset
)- Keyword Arguments
- Returns
out (
xarray.DataArray
) – DataArray
- unfold_phi_vulpiani(**kwargs)[source]#
Alternative phase unfolding which completely relies on \(K_{DP}\).
This unfolding should be used in oder to iteratively reconstruct \(Phi_{DP}\) and \(K_{DP}\) (see [Vulpiani et al., 2012]).
Note
\(Phi_{DP}\) is assumed to be in the interval [-180, 180] degree. From experience the window for calculation of \(K_{DP}\) should not be too large to catch possible phase wraps.
- Parameters
obj (
xarray.Dataset
) – Dataset- Keyword Arguments
- Returns
out (
xarray.DataArray
) – DataArray
|
Compute the depolarization ration. |
|
Retrieves \(K_{DP}\) from \(Phi_{DP}\). |
|
Retrieves \(K_{DP}\) from \(Phi_{DP}\). |
|
Compute the texture of data. |
|
Unfolds differential phase by adjusting values that exceeded maximum ambiguous range. |
|
Unfolds differential phase by adjusting values that exceeded maximum ambiguous range. |
|
Alternative phase unfolding which completely relies on \(K_{DP}\). |