Skip to content
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

Long processing times in hodo_plot.py due to cfradial write and read. Solution, plus possible bug in pyart code? #36

Open
lcarlaw opened this issue Aug 4, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@lcarlaw
Copy link
Collaborator

lcarlaw commented Aug 4, 2024

Writing and subsequently reading a cfradial version of the pyart radar object takes a very long time. In benchmark testing, this averaged near 35-40% of the total hodograph processing time.

The pyart.retrieve.vad_browning can evidently be run using sweeps extracted from the raw/native pyart radar object (initial data format is MSG31 binary), simply by converting radar_1sweep = ncrad.extract_sweeps([idx]) to radar_1sweep = radar.extract_sweeps([idx]), and removing the write_cfradial and read_cfradial calls. A try/except block must be added though, to handle sweeps in which not insufficient data is available which otherwise would result in a ValueError.

One minor item of note: somewhat inexplicably, there are subtle/minor differences in the data when comparing what's in the original radar object and what's read in by pyart.io.read_cfradial. This differences are clearly introduced either by write_cfradial or read_cfradial. Regardless, the differences are slight (see images below), but probably not enough to justify the significant time increase to utilize cfradial data.

Example of differences caused entirely by pyart.io.write_cfradial and/or pyart.io.read_cfradial:

Hodograph using cfradial data:
Hodograph_KLOT_20240804_163913

Hodograph using original pyart.io.read object:
Hodograph_KLOT_20240804_163913_raw

@lcarlaw lcarlaw added bug Something isn't working enhancement New feature or request labels Aug 4, 2024
@lcarlaw
Copy link
Collaborator Author

lcarlaw commented Aug 4, 2024

Commit a18887a turned off the write/read cfradial steps in favor of using the original pyart.io.read object given the substantial speed increases.

@lcarlaw lcarlaw changed the title Very long processing times in hodo_plot.py due to cfradial write and read. Solution, plus possible bug in pyart code? Long processing times in hodo_plot.py due to cfradial write and read. Solution, plus possible bug in pyart code? Aug 4, 2024
@lcarlaw lcarlaw removed the bug Something isn't working label Aug 10, 2024
@lcarlaw
Copy link
Collaborator Author

lcarlaw commented Aug 10, 2024

This is not an active bug, or enhancement area. Simply maintaining this for reference purposes in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant