pyart.map.grid_from_radars is not taking into account masked arrays... #1705
johnnypeste
started this conversation in
General
Replies: 5 comments 2 replies
|
"which are masked as FALSE (!!!) so they shouldn't be used..." @johnnypeste The mask is False for those two values, meaning they aren't mask, so they are used. Are you trying to mask out anything above 30 for that array? |
2 replies
|
the kdp is in the raw iris data. the productx from vaisala is different
Yahoo Mail: Search, organise, conquer
On Wed, 11 Dec 2024 at 18:44, Zach ***@***.***> wrote:
I'm trying to pinpoint the issue. How is specific differential phase being created? Is it present in the raw data set or is it being calculated using a function? The py-art reader will only read what's present in that raw dataset, it won't add values as such. If your looking to mask the values out, pyarts gridding function takes a gatefilter as a parameter.
You can use:
gatefilter is pyart.filter.GateFilter(radar)
gatefilter.exclude_above('specific_differential_phase', 30.0)
then add gatefilter=gatefilter in your parameters for pyart.map.grid_from_radars
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
0 replies
|
productx and pyart are different by a factor of avout 5.3 but only in kdp. in z they are the same
Yahoo Mail: Search, organise, conquer
On Wed, 11 Dec 2024 at 20:34, Joao ***@***.***> wrote:
the kdp is in the raw iris data. the productx from vaisala is different
Yahoo Mail: Search, organise, conquer
On Wed, 11 Dec 2024 at 18:44, Zach ***@***.***> wrote:
I'm trying to pinpoint the issue. How is specific differential phase being created? Is it present in the raw data set or is it being calculated using a function? The py-art reader will only read what's present in that raw dataset, it won't add values as such. If your looking to mask the values out, pyarts gridding function takes a gatefilter as a parameter.
You can use:
gatefilter is pyart.filter.GateFilter(radar)
gatefilter.exclude_above('specific_differential_phase', 30.0)
then add gatefilter=gatefilter in your parameters for pyart.map.grid_from_radars
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
0 replies
|
5.33 to be exact, which is the wavelenght in cm!! The reason why Vaisala software divides kdp by 5.33 to get decent kdp values is a mistery to me... pyart does not do that and that is why i have the infamous 32 degrees/km instead of 6 degrees/km
Yahoo Mail: Search, organise, conquer
On Wed, 11 Dec 2024 at 20:36, Joao ***@***.***> wrote:
productx and pyart are different by a factor of avout 5.3 but only in kdp. in z they are the same
Yahoo Mail: Search, organise, conquer
On Wed, 11 Dec 2024 at 20:34, Joao ***@***.***> wrote:
the kdp is in the raw iris data. the productx from vaisala is different
Yahoo Mail: Search, organise, conquer
On Wed, 11 Dec 2024 at 18:44, Zach ***@***.***> wrote:
I'm trying to pinpoint the issue. How is specific differential phase being created? Is it present in the raw data set or is it being calculated using a function? The py-art reader will only read what's present in that raw dataset, it won't add values as such. If your looking to mask the values out, pyarts gridding function takes a gatefilter as a parameter.
You can use:
gatefilter is pyart.filter.GateFilter(radar)
gatefilter.exclude_above('specific_differential_phase', 30.0)
then add gatefilter=gatefilter in your parameters for pyart.map.grid_from_radars
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
0 replies
|
Since I concluded that the problem has nothing to do with masked arrays, I'm closing this topic and I will open another one. Thanks a lot for the help |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I have a "radar" object and I want to use pyart.map.grid_from_radars ...
radar.fields['reflectivity'] and radar.fields['specific_differential_phase'] are masked arrays with different masks...
(in fact, reflectivity could have all values equal to true in the mask and specific_differential_phase could have all values equal to false in the mask)
For 2 pixels I have a very large kdp (>30 degrees/km)
kdp = radar.fields['specific_differential_phase']['data']
kdp[kdp>30] gives:
masked_array(data=[32.7059440612793, 32.7059440612793],
mask=[False, False],
fill_value=1e+20,
dtype=float32)
which are masked as FALSE (!!!) so they shouldn't be used...
However when I use:
grid = pyart.map.grid_from_radars(radar,
gridding_algo='map_gates_to_grid',
roi_func="dist_beam",
constant_roi=None,
min_radius=1000.0, h_factor=(1.0, 1.0, 1.0), nb=1.0, bsp=1.0,
grid_shape=(z_grid_points,
y_grid_points,
x_grid_points),
grid_limits=(z_grid_limits,
y_grid_limits,
x_grid_limits),
)
I will have those "BAD" values present in the grid!!
So I conclude that pyart.map.grid_from_radars is taking into account bad values (masked as false) in the interpolations...
What should I do?
All reactions