-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xradar and pyart fillvalue discrepancy when working with ODIM #122
Comments
Sorry for the delay here. Rainbow does not have a notion of But nevertheless this example revealed a bug in the order of applying the val = value.sortby(dim0).values
fillval = _fillvalue * scale_factor
fillval += add_offset
val[np.isnan(val)] = fillval
val = (val - add_offset) / scale_factor In general it is a major pain point, that several radar data formats only have You can specify |
Xref #103 |
Hi all, This 'bug' seems to be still apparent in
Thanks, |
@BerendWijers Please check if #173 fixes your issue. Thanks! |
@kmuehlbauer it does! Thank you! |
Great, I'll try to finish #173 and let others have a look there. |
Description
I am trying to convert some RAINBOW RB5 data to ODIM for further processing using pyart (the RB5 volumes can't be imported directly due to the variable number of range bins between sweeps not being supported by the pyart package). Anyway, the export and import both work fine in general, however, there is a problem when filling the missing values using the
fillvalue
/undetect
. Here is a plot obtained from the RB5 volume converted using xradar to ODIM, then loaded and plotted through pyart.The red areas on the plot should be masked, however they show up as areas of high reflectivity.
What I Did
Plot showing the unmasked sweep data.
My temporary solution
I have modified the lines around:
https://github.com/openradar/xradar/blob/5d6a3b86b94860aaf966b47eedff24b8b61ed566/xradar/io/export/odim.py#L113C29-L113C29
from
to
as the pyart import seems to expect the exact value that is not transformed to create the mask.
After this change, the plot in pyart seems as expected, with the correct mask:
Is this a bug or am I misunderstanding the usage of fillval in the ODIM format?
The text was updated successfully, but these errors were encountered: