Clutter correction method

I want to correct ground based clutter using srtm data . I have done beam blockage estimation using wradlib . now i want to mask from my radar data . so what should i do ?

https://openradarscience.org/ams-open-radar-2023/notebooks/wradlib/wradlib_data_quality.html

i was using that method but following errors are coming .
swp = vol[sweep_number]
clmap = swp.reflectivity_hh_clut.pipe(
extract_clutter, wsize=5, thrsnorain=0.0, tr1=21.0, n_p=23, tr2=1.3, rm_nans=False
)
swp = swp.assign({“CMAP”: clmap})
display(swp)

output:
AttributeError Traceback (most recent call last)
Cell In[14], line 2
1 swp = vol[sweep_number]
----> 2 clmap = swp.reflectivity_hh_clut.pipe(
3 extract_clutter, wsize=5, thrsnorain=0.0, tr1=21.0, n_p=23, tr2=1.3, rm_nans=False
4 )
5 swp = swp.assign({“CMAP”: clmap})
6 display(swp)

File ~\anaconda3\envs\pyart_env\lib\site-packages\xarray\core\common.py:272, in AttrAccessMixin.getattr(self, name)
270 with suppress(KeyError):
271 return source[name]
→ 272 raise AttributeError(
273 f"{type(self).name!r} object has no attribute {name!r}"
274 )

AttributeError: ‘Dataset’ object has no attribute ‘reflectivity_hh_clut’

i have checked there is no reflectivity_hh_clut variable in my radar dataset(TERLS C band RADAR). how to get this variable .

Hi @Jagdish_jena,

welcome to openradar discourse.

The reflectivity_hh_clut is the radar reflectivity moment in the above used dataset. You would need to use a reflectivity moment from your dataset.

HTH,
Kai

reflectivity_hh_clut is replaced with DBZ, but I am facing this issue

‘str’ object has no attribute ‘sel’

This error implies that “vol” is a string. Run type(vol) to see the output. But “sel” is xarray dataset/data array attribute, so for this code to work, the “vol” is supposed to be some xarray data structure. There is probably some minor error in your previous code.

Thank you , i have tried this and got result . but i want save this result how can i do that.
i have a file with dimension time * range =3960*1600 . The code you have mentioned is taking one sweep at a time . i want to save all sweeps in attributecorrected_dbz and then save it into cfradial file with other attributes. so that i can use in titan for further processing. how can i do that .

@Jagdish_jena Can you share the code how you’re reading in your data?


cmap
here you can see cmap attribute is saved for a single sweep

pbb is also saved for single sweep which i have fixed at top of the code .
my doubt is how can i save cmap and pbb for all sweeps in a single dataset . which i can convert into radar nc format. if my input dimension of attribute is 39601600 . the code should give output a nc file with orginal dimension and should contain cmap and pbb in dimenison 39601600

@Jagdish_jena

Output to CfRadial1 is currently not implemented in xradar. But there is an enhancement proposal by @syedhamidali Cf/Radial1 writer · Issue #124 · openradar/xradar · GitHub.

  • Kai
2 Likes

Thank You. it worked

1 Like

Hi @SAMA, @Jagdish_jena
Have a look at this notebook, I think it should work for now using wradlib and pyart in combination.
Notebook

1 Like

hey iam having error : module ‘wradlib’ has no attribute ‘clutter’ when iam doing gabella clutter remove in my cfardial files,can you help me with this

“wrl.classify.clutter. filter… or wrl.classify.filter…” command will the rigth one for this problem

1 Like

wrl.classify.filter_gabella is the right one for the problem (sorry for the late reply)

1 Like