vlouf/dealias

Large artifacts in dealiasing

Closed this issue · 1 comments

Hello there,

I've recently discovered this library, and I've been trying to use it with Py-ART. I've thrown together this code that I assume would be a correct implementation of UNRAVEL:

import matplotlib.pyplot as plt
import numpy as np
import pyart
from pyart.correct import dealias_region_based
from unravel import *


# read in file
radar = pyart.io.read_nexrad_archive('KTLX20130520_201643_V06.gz')

radar = radar.extract_sweeps([1]) # extract velocity sweep

corr_vel = unravel_3D_pyart(radar, velname='velocity', dbzname='reflectivity')
theCorrVel = dealias_region_based(radar)
theCorrVel['data'] = corr_vel # comment this line of code to plot Py-ART's dealiased data instead

radar.add_field('dealiased_velocity', theCorrVel, True)

rmin = radar.fields['dealiased_velocity']['valid_min']
rmax = radar.fields['dealiased_velocity']['valid_max']

fig = plt.figure(figsize=[10, 7])
display = pyart.graph.RadarDisplay(radar)
display.plot('dealiased_velocity', vmin=rmin, vmax=rmax, cmap='pyart_balance')
plt.show()

Here is a link to the NEXRAD radar file I'm using (KTLX20130520_201643_V06.gz - the 2013 Moore tornado). It's a direct download link to the file from NOAA's AWS explorer: https://noaa-nexrad-level2.s3.amazonaws.com/index.html

When I use Py-ART's region based algoritm (dealias_region_based), I get a correctly dealiased field:

Screen Shot 2023-01-25 at 6 34 06 PM

However, when I use UNRAVEL's unravel_3D_pyart function, I get large artifacts:

Screen Shot 2023-01-25 at 6 32 45 PM

Am I using or implementing UNRAVEL incorrectly? If so, could you correct my code? Or is this an issue with the algorithm itself, e.g. it doesn't do well for areas of rotation?

I would appreciate any information you have about this.

vlouf commented

Your implementation of Unravel is correct, it just seems to fail on that case (which happens some times). Try using with strategy='long_range', to see if it works better for that specific case:

unravel_3D_pyart(radar, velname='velocity', dbzname='reflectivity', strategy='long_range')

Probably on your case study the region_based technique from PyART is going to work better though. Hope it helps!