社区所有版块导航
Python
python开源   Django   Python   DjangoApp   pycharm  
DATA
docker   Elasticsearch  
aigc
aigc   chatgpt  
WEB开发
linux   MongoDB   Redis   DATABASE   NGINX   其他Web框架   web工具   zookeeper   tornado   NoSql   Bootstrap   js   peewee   Git   bottle   IE   MQ   Jquery  
机器学习
机器学习算法  
Python88.com
反馈   公告   社区推广  
产品
短视频  
印度
印度  
Py学习  »  Python

详解双偏振气象雷达反射率因子衰减订正方法(附python代码)

气象学家 • 2 年前 • 3237 次点击  

1 背景

  多普勒天气雷达能提供高时空分辨率的观测,是观测强对流的重要手段之一。移动式多普勒天气雷达用于观测对流风暴已有十多年了,主要包括S、X和C波段的雷达。然而,散射模拟表明,X波段雷达由于雨水对回波产生的衰减至少比S波段的衰减大一个数量级,比C波段的衰减大几倍。不仅仅是反射率因子Z,衰减效应对极化变量也有影响。如果不考虑衰减的影响,X波段雷达数据的定量化应用效果将大打折扣。

  一般来说,对于常规多普勒天气雷达(单偏振),利用衰减和反射率因子的关系来进行衰减订正,如HB方法、MK方法。对于双偏振天气雷达,可以引入一个独立的变量来订正或者进行约束,主流方法包括DP方法、ZPHI方法和SCWC方法。

  话不多说,本文将针对Z的衰减订正进行几种常见方法的介绍以及代码实现,并根据测试结果进行简单讨论。

2 方法

  雷达实测和固有的反射率因子关系可以表示为:

是衰减后的(即,测量到的)是单程的specific attenuation(单位:dB/km),r为距离(km)。为双程的路径积分衰减(path integrated attenuation, 单位:dB)。下标H和V分别表示水平和垂直通道。同样地, 观测到的的计算公式如下:

为双程的路径积分衰减(dB),

2.1 HB逐门订正方法:来自Hitschfeld and Bordan (1954)。

其中,的单位是dB/km,的单位是单位是dBZ。这个关系易受其他因素影响,常不稳定,如校准calibration、部分波束遮挡partial beam blockage。系数a和b是需要由雨滴谱观测数据进行回波模拟进行拟合而来,没有这个数据的时候先根据默认系数来计算就好:对于C波段,根据wradlib库,a=1.67e-4, b=0.7;对于X波段,根据Delrieu et al (1997)的图3,计算出来a=1.409e-4,b=0.76。

  由于HB方法是没有约束的逐门订正,系数a和b值的不准确、雷达的误校或雷达罩引起的衰减等误差会累积,出现数值不稳定。

def calc_attenuation_hb(gateset, a=1.67e-4, b=0.7, gate_length=1.0):
    """Gate-by-Gate forward correction as described in :cite:`Kraemer2008`
    Parameters
    ----------
    gateset : :class:`numpy:numpy.ndarray`
        Multidimensional array, where the range gates (over which iteration has
        to be performed) are supposed to vary along the last array-dimension.
        Data has to be provided in decibel representation of reflectivity
        [dBZ].
    a : float
        proportionality factor of the k-Z relation (:math:`k=a \\cdot Z^{b}`).
        Per default set to 1.67e-4.
    b : float
        exponent of the k-Z relation ( :math:`k=a \\cdot Z^{b}` ). Per default
        set to 0.7.
    gate_length : float
        length of a range gate [km]. Per default set to 1.0.
    Returns
    -------
    pia : :class:`numpy:numpy.ndarray`
        Array with the same shape as ``gateset`` containing the calculated path
        integrated attenuation [dB] for each range gate.
    """

    gateset = np.where(np.isnan(gateset), -999, gateset)
    pia = np.zeros(gateset.shape)
    for gate in range(gateset.shape[-1] - 1):
        k = (
            a
            * idecibel(gateset[..., gate] + pia[..., gate]) ** b
            * 2.0
            * gate_length
        )
        pia[..., gate + 1] = pia[..., gate] + k
    pia = np.where(np.isnan(pia), 0, pia)
    return pia

2.2 MK方法

  针对HB的不稳定问题,可设置一个最大的允许修正量对此进行约束。Jacobi and Heistermann (2016)比较了3种对HB方法进行约束的方案,发现MK(modified Kraemer)方法最好。其调整了幂律关系的参数,使整个数据订正后的反射率不超过59 dBZ,PIA上限设为20 dB。

  MK方法(Jacobi and Heistermann 2016)是基于Hitschfeld and Bordan(1954)迭代方法的逐门衰减订正,有两个约束条件:允许的最大为59 dBZ,最大PIA为20 dB,以避免过订正。代码见wradlib库的函数atten.correct_attenuation_constrained。在不符合上述约束条件的情况下,用于计算衰减的相邻波束的数量sector_thr的默认值为10。

  代码的整体的思路是:先赋一个a和b的初值(a_max, b_max),如果订正后的数值超过了阈值,比如说反射率太强超过了59 dBZ,这样的径向如果很多,那就调整系数重新来一次,直到满足条件为止。系数调整的策略是由a_max逐步降低到a_min,b_max逐渐降低到b_min,降低的步长由n_a和n_b决定。MK方法的空间复杂度是HB方法的n_a*n_b倍。

2.3 DP方法

  双极化雷达则可以使用相位观测来估计PIA。这种方法的优点是可以用一个独立的变量来估计PIA,从而避免了依靠自身来订正 带来的不稳定问题。此外,与信号的相位而非振幅有关,不受雷达罩衰减、部分光束阻挡和硬件校准误差的影响。

  DP衰减订正方法公式如下:

其中,单位deg/km,单位dB/deg,单位dB/km。上述表达式常被认为是线性的,即,这在大部分气象雷达波段都是合理的。式中系数与雨滴谱分布DSD、温度和滴谱大小-形状关系有关。由05-07年的2D滴谱仪数据、T矩阵计算出的散射幅度(温度10°C、波长3.22 cm的情况下)、Brandesetal(2002)给出的滴谱的size–shape relation,分别为0.313和0.0483。在Park et al(2005)进行的X波段雷达模拟中,随着雨滴形状的变化差异很大,其数值在0.173-0.315 dB/deg的范围内变化(本文参考CHUVA feild campaign,时,取0.219)。根据Overeem et al (2021),C波段为$0.081。

  DP方法中不准确的也会导致PIA的误差在径向求和过程中积累。

def pia_from_kdp(kdp, dr, gamma=0.313):
    """Retrieving path integrated attenuation from specific differential \
    phase (Kdp).
    The default value of gamma is based on :cite:`Carey2000`.
    Parameters
    ----------
    kdp : :class:`numpy:numpy.ndarray`
       array specific differential phase
       Range dimension must be the last dimension.
    dr : float
        gate length (km)
    gamma : float
       linear coefficient (default value: 0.08 for C band) in the relation between
       Kdp phase and specific attenuation (alpha)
       0.313 for X band
    Returns
    -------
    output : :class:`numpy:numpy.ndarray`
        array of same shape as kdp containing the path integrated attenuation
    """

    alpha = gamma * kdp
    pia = 2 * np.cumsum(alpha, axis=-1) * dr #进行累加求和,即积分
    return pia

2.4 ZPHI方法

  ZPHI方法通过雨区的总变化来约束,然后根据径向上的分布来分摊这个衰减(Bringi and Chandrasekar2001),因此会比HB方法稳定得多,其名称“ZPHI”也是因为既用到了Z又用到PHI来进行约束。ZPHI需要两个先验值:关系中的系数[,见式(4)]和关系中的指数[b,见式(3)]。Gorgucci and Chandrasekar (2005) 和Tabary et al (2011)表明ZPHI方法一般比DP表现更好。

  ZPHI方法的整体思路是,将DP方法计算出的衰减按照Z值分配到各距离库上,具体是为每个径向求解关系中的系数a(公式3)。推导过程如下:  最终记到下面这个公式就好:

其中,a是针对每个方位角单独计算的,是这个方位角上最远的PIA对应的距离库,是根据DP方法计算出来的。

  对于,ZPHI算法通过归一化的截距参数建立了的关系:。其中,根据Testud et al(2000),X波段,  

def pia_ZPHI(gateset, kdp, dr, b = 0.76, gamma = 0.313, debug = False):
    """Retrieving path integrated attenuation using ZPHI methodwhich \
    constrains PIA_H by the total change in φDP along a radial through a rain cell. 
    The attenuation is then apportioned according to the distribution of Z_H along the radial. 
    The default value of gamma is based on :cite:`FIGURE 6.21 in book  by Zhang`.
    Parameters
    ----------
    gateset : :py:class:`numpy:numpy.ndarray`
        multidimensional array. 
        The range gates (over which iteration has to
        be performed) are supposed to vary along the *last* dimension.
        The azimuth are supposed to vary along the 2nd last dimension. 
        so, e.g., for a set of `l` radar images stored in
        polar form with `m` azimuths and `n` range-bins the input array's
        shape should be either (l,m,n).
        data has to be provided in decibel representation of reflectivity [dBZ]
    kdp : :class:`numpy:numpy.ndarray`
        array specific differential phase
        Range dimension must be the last dimension.
    dr : float
        gate length (km)
    gamma : float
        linear coefficient (default value: 0.08 for C band, 0.313 for X band) 
        in the relation between Kdp phase and specific attenuation (alpha)
    b : float
        exponent of the k-Z relation ( :math:`k=a \\cdot Z^{b}` ). Per default
        set to 0.76.
    """


    gateset = np.where(np.isnan(gateset), -999, gateset)
    alpha = gamma * kdp
    pia = 2 * np.cumsum(alpha, axis=-1) * dr
    pia = np.where(np.isnan(pia), 0, pia) # needed?
    rN = np.argmax(pia, axis = -1
    # solving `a` assuming that the attenuation is apportioned according to the distribution of ZH along the radial.
    a, numerator, denominator = np.zeros(gateset.shape[:-1]), np.zeros(gateset.shape[:-1]), np.zeros(gateset.shape[:-1])

    for iray in range(gateset.shape[-2] - 1):

        if rN[iray] > 0:
            numerator[iray] =  1 - np.exp( -0.23 * b * pia[iray,rN[iray]]) 
            tmp = 0.46 * b * np.cumsum(np.power( idecibel(gateset[iray,0:rN[iray]]), b ), axis = -1) * dr
            denominator[iray] = tmp[-1]
            if denominator[iray] > 100:
                a[iray] = numerator[iray] / denominator[iray] #a越大,衰减越厉害
            if debug:
                print('iray is %i, range : %i, last echo : %.1f, coefficient a : %.5f ' \
                    %(iray, rN[iray], idecibel(gateset[iray,0:rN[iray]][-1]), a[iray]) )

    pia = np.zeros(gateset.shape)
    for iray in range(gateset.shape[-2] - 1):
        for gate in range(gateset.shape[-1] - 1):
            k = (
                a[iray]
                * idecibel(gateset[iray, gate] + pia[iray, gate]) ** b
                * 2.0
                * dr
            )
            pia[iray, gate + 1] = pia[iray, gate] + k
    pia = np.where(np.isnan(pia), 0, pia)
    return a, pia

2.5 自适应约束算法(self-consistent with constraints, SCWC, Bringi et al 2001)

  ZPHI方法中用到的系数还是固定的。然而,不同降水微物理过程对应的变化很大。为了解决这个问题,SCWC方法通过的约束求解出最优的

  具体方法是,对于每个方位角的,重构(reconstruct)

其中,由ZPHI方法计算而来。

  对观测的和重构的之间的绝对误差 进行极小化,即可求得的最优解。由Park et al(2005),的取值范围设为0.13-0.35,步长可以设为0.01。

  整体思路:ZPHI方法中由DP方法中的可以计算出HB方法中的系数a,根据系数a和b(b是给定的)计算出的PIA来重构 ,如果与实际观测的最接近,那么这个就是最优的。




    
def pia_scwc(gateset, kdp, phi_dp, dr, gamma_max = 0.35, gamma_min = 0.13 , delta_gamma = 0.01, b = 0.76):
    """
    calculate the Path Integrated Attenuation using self-consistent with constraint method.
    Parameters
    ----------
    gateset : :py:class:`numpy:numpy.ndarray`
        multidimensional array. 
        The range gates (over which iteration has to
        be performed) are supposed to vary along the *last* dimension.
        The azimuth are supposed to vary along the 2nd last dimension. 
        so, e.g., for a set of `l` radar images stored in
        polar form with `m` azimuths and `n` range-bins the input array's
        shape should be either (l,m,n).
        data has to be provided in decibel representation of reflectivity [dBZ]
    kdp : :class:`numpy:numpy.ndarray`
        array specific differential phase
        Range dimension must be the last dimension.
    phi_dp : :class:`numpy:numpy.ndarray`
        array differential_phase
        should be the reconstructed phi_dp (filetered), phi_dp[0]should be 0.
    dr : float
        gate length (km)
    gamma_max : float
        iterate from gamma_max to gamma_min with the step of delta_gamma, to find the 
        optimal gamma, which is the linear coefficient in the relation between 
        Kdp phase and specific attenuation
    b : float
        exponent of the A-Z relation ( :math:`A=a \\cdot Z^{b}` ). Per default
        set to 0.76.
    Returns
    -------
    gamma_opt : :class:`numpy:numpy.ndarray`
        the coefficient of the A-K_DP retation (math: `A-\gamma*K_DP`) for all irays. 
    a_opt : 
        the coefficient a of the A-Z retation (math: `A=a \\cdot Z^{b}`) for all irays. 
    pia : :class:`numpy:numpy.ndarray`
        array of same shape as kdp containing the path integrated attenuation
    """

    gateset = np.where(np.isnan(gateset), -999, gateset)
    alpha = gamma_max * kdp
    pia = 2 * np.cumsum(alpha, axis=-1) * dr
    pia = np.where(np.isnan(pia), 0, pia) # needed?
    rN = np.argmax(pia, axis = -1

    tot_abs_err_min, gamma_opt = np.zeros( gateset.shape[0], dtype=float ),  np.zeros( gateset.shape[0], dtype=float)
    a_opt = np.zeros( gateset.shape[0], dtype=float ) # 数组开内存
    
    for gamma in np.arange(gamma_max, gamma_min, -delta_gamma):
        a, pia = pia_ZPHI(gateset, kdp, dr, b, gamma, debug = False)
        for iray in range(gateset.shape[0]):
            if (rN[iray] > 0):
                phi_rec_intg =  2 * np.nancumsum( a[iray] * np.power( idecibel((gateset + pia)[iray,0:rN[iray]-1]), b ) / gamma, axis = -1 ) * dr # np.stack([a]*ref.shape[1], axis=1)
                phi_rec = phi_rec_intg[-1]       
                tot_abs_err = np.abs( phi_rec - phi_dp[iray,rN[iray]-1] ) 
                if (tot_abs_err_min[iray] == 0 or tot_abs_err <= tot_abs_err_min[iray]):
                    gamma_opt[iray] = gamma
                    a_opt[iray] = a[iray]
                    tot_abs_err_min[iray] = tot_abs_err

    pia = np.zeros(gateset.shape)
    for iray in range(gateset.shape[0] - 1):
        for gate in range(gateset.shape[-1] - 1):
            k = (
                a_opt[iray]
                * idecibel(gateset[iray, gate] + pia[iray, gate]) ** b
                * 2.0
                * dr
            )
            pia[iray, gate + 1] = pia[iray, gate] + k
    pia = np.where(pia 0, np.nan, pia )
    pia = np.where(pia > 30, np.nan, pia )
    #pia[np.isnan(pia)] = 0
    pia = np.where(gateset -10, np.nan, pia )
    gamma_opt = np.where(gamma_opt == 0.0, np.nan, gamma_opt)
    a_opt = np.where(a_opt == 0.0, np.nan, a_opt)
    return a_opt, gamma_opt, pia

3 测试数据和结果

3.1 数据来源

  X波段双偏振天气雷达PX-1000 PECAN Observations,雷达介绍及资料下载地址:https://arrc.ou.edu/data.html。

3.2 测试结果

  PX-1000雷达测试数据的反射率因子、径向速度、差分反射率、比差分相位差概况如图1。

图1. PX-1000雷达测试数据概况

  图2展示了反射率因子观测、各衰减订正方法计算的双程路径积分衰减。
图2. 观测反射率因子(dBZ),5种方法计算的路径积分衰减(dB)

  图3为使用上述5种衰减订正方法订正后的反射率因子。
图3. 观测反射率因子和5种衰减订正方法订正后的反射率因子

  回波在-270°方向(正北为0°)回波较强,取附近几个方位角对其路径积分衰减进行可视化(图4)。
图4. 指定方位角的路径积分衰减情况

3.3 结果说明

  • HB方法很快会过订正(超过阈值后PIA被设为0)。
  • MK方法增加约束,更新了系数之后效果稳定。
  • KDP方法订正时采用固定的系数,但它随着雨滴形状的变化差异很大,因此对PIA的影响很大,这个例子中出现了明显的过订正。
  • ZPHI方法中,将KDP方法计算的总衰减以反射率的分布(准确来说,是由HB方法计算的衰减的分布)分摊到各距离门上,结果比KDP方法更合理。然而,ZPHI方法中总的PIA和KDP方法是一样的,因为它还是由决定的。
  • SCWC方法在ZPHI的基础上,对由PIA重构的与实测的差距进行极小化,获得最优的,过订正现象基本看不出来。
  • 这些订正方法用的是针对雨水的衰减系数,对于固态降水如冰雹不适用,所以需要判断0度层高度后,仅对0度层之下的降水回波进行订正。

参考资料:

  1. Jacobi, Stephan, and Maik Heistermann. "Benchmarking attenuation correction procedures for six years of single-polarized C-band weather radar observations in South-West Germany." Geomatics, Natural Hazards and Risk 7.6 (2016): 1785-1799.
  2. Zhang, Guifu. Weather radar polarimetry. Crc Press, 2016.
  3. wradlib库的atten模块:https://github.com/wradlib/wradlib/blob/main/wradlib/atten.py.
  4. Snyder, Jeffrey C., et al. "Attenuation correction and hydrometeor classification of high-resolution, X-band, dual-polarized mobile radar measurements in severe convective storms." Journal of Atmospheric and Oceanic Technology 27.12 (2010): 1979-2001.
  5. Overeem, Aart, et al. "Rainfall-induced attenuation correction for two operational dual-polarization c-band radars in the Netherlands." Journal of Atmospheric and Oceanic Technology 38.6 (2021): 1125-1142.
  6. Bringi, V. N., and V. Chandrasekar, 2001: Polarimetric Doppler Weather Radar: Principle and Applications. Cambridge Uni- versity Press, 636 pp.
  7. Gu, Ji-Young, et al. "Polarimetric attenuation correction in heavy rain at C band." Journal of Applied Meteorology and Climatology 50.1 (2011): 39-58.
  8. Ryzhkov, Alexander, et al. "Potential utilization of specific attenuation for rainfall estimation, mitigation of partial beam blockage, and radar networking." Journal of Atmospheric and Oceanic Technology 31.3 (2014): 599-619.
  9. Delrieu, G., S. Caoudal, and J. D. Creutin. "Feasibility of using mountain return for the correction of ground-based X-band weather radar data." Journal of Atmospheric and Oceanic Technology 14.3 (1997): 368-385.
  10. 可从ARRC实验室下载S、C和X的雷达样例数据进行测试:https://arrc.ou.edu/data.html.
  11. http://chuvaproject.cptec.inpe.br/portal/pdf/relatorios/a2anexo3a7.pdf 第83页的公式9.

以下没有实际参考到,但也可以进行拓展阅读^_^

  1. Lengfeld, Katharina, M. Berenguer, and D. Sempere Torres. "Intercomparison of attenuation correction algorithms for single-polarized X-band radars." Atmospheric Research 201 (2018): 116-132.
  2. 李思腾,马建立,陈明轩,李林,仰美霖,邢峰华. 2021. 网络化衰减订正方法在北京X波段网络化雷达中的应用. 气象学报,79(5):804-816.

    喜欢别忘了点赞收藏转发的呀💗

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/155914
 
3237 次点击