How to perform attenuation correction without NCP field

Hello,
I am to perform attenuation correction using the raw RHI dataset in (netCDF) format, but in the metadata, there is no normalized coherent power (NCP) product. How do I go about fixing it in the data to perform the attenuation correction? I attached the code below.

Attenuation correction Using raw netCDF dataset

att = pyart.correct.calculate_attenuation(
radar, 0,
refl_field=“reflectivity”,
ncp_field=‘norm_coherent_power’,
rhv_field=“cross_correlation_ratio”,
phidp_field=“differential_phase”,)
spec_at, cor_z, cor_zdr =att
radar.add_field(‘corrected_reflectivtiy’,cor_z)
radar.add_field(‘specific_attenuation’,spec_at)
radar.add_field(‘corrected_differential_reflectivity’,cor_zdr)

https://docs.wradlib.org/en/latest/notebooks/attenuation/wradlib_attenuation.html

2 Likes

If you wish to use pyart rather than the implementation in wradlib you will need to provide a field to use as the ncp_field in the function. From looking at the source code the ncp_field is used as a gatefilter, with all gates with a NCP below a threshold (0.5 by default) excluded from the calculation.

If you don’t have NCP values for the netCDF dataset one option would be to add a dummy field to the radar object where all gates are set to higher than the threshold used, thereby ignoring the filter (instead only rhv would be used). Another option would be to pass the rhv_field used to the ncp_field parameter and make sure the ncp_min argument is set to the same or a higher value than the rhv_min argument, in effect ignoring it’s impact by duplicating it as a filter. The following should work, based on your code example:

**Attenuation correction Using raw netCDF dataset**
att = pyart.correct.calculate_attenuation(
radar, 0,
refl_field=“reflectivity”,
ncp_field=‘cross_correlation_ratio’,
ncp_min=0.8,
rhv_field=“cross_correlation_ratio”,
rhv_min=0.8,
phidp_field=“differential_phase”,)
spec_at, cor_z, cor_zdr =att
radar.add_field(‘corrected_reflectivtiy’,cor_z)
radar.add_field(‘specific_attenuation’,spec_at)
radar.add_field(‘corrected_differential_reflectivity’,cor_zdr)
1 Like