wradlib.dp.unfold_phi

Contents

wradlib.dp.unfold_phi#

wradlib.dp.unfold_phi(phidp, rho, *, width=5, copy=False, thr_sphidp=5, thr_rho=0.9)[source]#
wradlib.dp.unfold_phi(obj: Dataset, **kwargs)

Unfold differential phase (\(\Phi_{DP}\)) along the range dimension using a gate-wise phase-unfolding procedure adapted from [Wang et al., 2009].

This routine detects reliable weather gates, constructs a local reference phase profile, and corrects wrapped negative phase values by adding 360° where needed.

Parameters:
  • phidp (numpy.ndarray) – Differential phase array (…, nr), where the last dimension is range.

  • rho (numpy.ndarray) – Copolar correlation coefficient array with the same shape as phidp.

  • width (int, optional) – Number of gates used for local stability and slope checks. Default is 5.

  • thr_sphidp (float, optional) – Maximum allowed local standard deviation of \(\Phi_{DP}\) used when detecting the beginning of the valid \(\Phi_{DP}\) profile. Default is 5°.

  • thr_rho (float, optional) – Minimum required \(\rho_{HV}\) within the stability window. Default is 0.9.

  • copy (bool, optional) – If True, operate on a copy of phidp and leave the original phidp array unchanged.

Returns:

phidp (numpy.ndarray) – Unfolded \(\Phi_{DP}\) array with the same shape as the input.

Notes

  • Accepts arbitrarily dimensioned arrays, but the last dimension must be range.

  • Uses the fast Fortran-based implementation if the speedup module is compiled.

  • The algorithm follows the logic described by [Wang et al., 2009]:

    • The beginning of the valid \(\Phi_{DP}\) profile is identified using a stability criterion based on the local standard deviation of \(\Phi_{DP}\) and sufficiently high \(\rho_{HV}\).

    • A reference \(\Phi_{DP}\) is initialised from the mean phase over the first reliable gates.

    • At each subsequent gate, local phase variability and the local \(\Phi_{DP}\) gradient are checked before updating the reference.

    • If the observed phase falls more than 80° below the reference and is negative, 360° is added to unfold the phase.