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

ADD: addition of subset_radar function in radar_utils #1227

Merged
merged 10 commits into from
Aug 12, 2022
Merged

ADD: addition of subset_radar function in radar_utils #1227

merged 10 commits into from
Aug 12, 2022

Conversation

wolfidan
Copy link
Contributor

@wolfidan wolfidan commented Jul 27, 2022

Dear Py-ART team,

In this PR I propose the addition of a cut_radar subset_radar function from our MeteoSwiss fork of the library (thanks @jfigui). It cuts a radar object to a new domain specified by bounds in range, azimuth and elevation, and returns a new object. It can be useful to make processing faster when one is interested only in a certain subdomain around the radar (typically shorter ranges and only a certain sector).
This function is used a lot in our pyrad library, which is a framework for real time radar processing that relies on PyART.
I also added a short test function that checks if a cut radar object has indeed coordinates that match with the specified bounds.
Cheers,
Daniel W.

Copy link
Collaborator

@mgrover1 mgrover1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small suggestion - other than that, looks great! Thanks for adding tests!

@@ -104,6 +104,203 @@ def to_vpt(radar, single_scan=True):
return


def cut_radar(radar, field_names, rng_min=None, rng_max=None, ele_min=None,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks great! One small suggestion - what would you think about changing the name here to subset_radar?

@wolfidan
Copy link
Contributor Author

Thanks for the feedback @mgrover1, it's done

@wolfidan wolfidan changed the title ADD: addition of cut_radar function in radar_utils ADD: addition of subset_radar function in radar_utils Jul 28, 2022
@wolfidan
Copy link
Contributor Author

Could you help me with this failing check, I have honestly no idea what failed here in the website deploy?

@mgrover1
Copy link
Collaborator

@wolfidan we updated the trmm_rsl feedstock, changing the path in our CI. I added the fix here, should fix the problem. Thanks for making those changes!

@mgrover1 mgrover1 requested a review from zssherman July 28, 2022 12:45
@zssherman
Copy link
Collaborator

@mgrover1 looks like it's still not finding trmm_rsl, the full path on condaforge has a weird extension now before the 4 and after the package name

@zssherman
Copy link
Collaborator

And it's different between osx and Linux for some reason... hmmm

@mgrover1
Copy link
Collaborator

I updated the TRMM rsl path - it was incorrect...

@wolfidan
Copy link
Contributor Author

Thanks for your help!

@zssherman zssherman closed this Aug 2, 2022
@zssherman zssherman reopened this Aug 2, 2022
@zssherman zssherman closed this Aug 2, 2022
@zssherman zssherman reopened this Aug 2, 2022
@mgrover1
Copy link
Collaborator

@zssherman I think we can go ahead and merge - let's fix the TRMM_RSL for linux in a different PR

@zssherman zssherman merged commit a623736 into ARM-DOE:main Aug 12, 2022
mgrover1 added a commit that referenced this pull request Aug 24, 2022
* add cookbook section (#1199)

* TST: Adding unitests for rain rate module. (#1200)

* fix missing < symbol in link (#1201)

* add pypi stats to readme (#1206)

* FIX: update join_radar to also append instrument parameters (#1204)

* updated join_radar to also append instrument parameters

* updated join_radar to also append instrument parameters

* add pypi stats to readme (#1206)

* updated join_radar to also append instrument parameters

* updated join_radar to also append instrument parameters

* added unittest for join_radar

Co-authored-by: Max Grover <[email protected]>

* TST: Moving tests to test module within Py-ART main directory. (#1207)

* TST: Moving pyart main module tests to test directory.

* TSTS: Move bridge and core submodules to respective test directories.

* TSTS: Moving correct and filters tests to respective tests directories.

* TST: Moving graph io and map test modules.

* TST: Moving retrieve, testing and util submodule tests.

* FIX: Remove pyargs

* FIX: Fix pytest call.

* FIX: Remove extra netcdf reference.

* MNT: Remove duplicate pytest as well.

* MNT: Changing custom config path.

* FIX: Fix for config loading and not resetting.

* TST: Adding back in test_simualted_vel.

* FIX: Fix for missing sys paths.

* FIX: Attemped PIL fix.

* MNT: Remove pillow.

* FIX: Fix for only python 3.10 being used. (#1208)

* FIX: Fix for only python 3.10 being used.

* FIX: Adding python call.

* MNT: Another attempt.

* FIX: Xarray pin removed.

* MNT: Remove cftime pin.

* MNT: Attemped fix for pil.

* MNT: Accidently removed gdal

* MNT: Pinning for now.

* MNT: Remove lib set.

* CI: Remove python 3.6 from testing.

* remove pinning for specific cftime (#1211)

* DOC: Updating Py-ART's how to release doc and removing most of ci_setup doc (#1213)

* DOC: Updating Py-ART's how to release doc and removing most of ci_setup.

* DOC: Changes reflecting review.

* ENH: Corrected Height Gates to be height above sea level (#1215)

* ENH: Corrected Height Gates to be height above sea level

* FIX: Removed character within comment line

* ENH: Updated Height Test to include altitude of radar.

* TST: Fix median filter depreciation warnings as well as more tests for simple moments. (#1214)

* TST: Fix median filter depreciation warnings as well as more tests for
simple moments.

* TST: Update values.

* MNT: Adding variables for simple moment calculation functions.

* FIX: Removal of depreciation warning for interp namespace.

* fix writing IRIS sigmet files to UF (#1216)

* FIX: join_radar also joins pulse repititon times iparam (#1218)

* Add pyrad to the readme (#1220)

* add pyrad to the readme

* move pyrad to extension section

* add space between _ and :

* FIX: Return zero phase for sweeps completely filtered out with gatefi… (#1226)

* FIX: Return zero phase for sweeps completely filtered out with gatefilter.

* FIX: Remove debug statement

* Trmm test (#1228)

* TST: To see if trmm_rsl broke.

* MNT: Forgot final else.

* MNT: Remove full path.

* add hardcoded trmm_rsl path to docs

* add missing RSL_PATH=

* upin cftime

* build docs on macos

* update to macos hash

* add macos latest runner for docs

* add macOS-latest

* move toward micromamba

* change path to micromamba

* add ls and move to mamba exe

* try pkgs dir

Co-authored-by: mgrover1 <[email protected]>
Co-authored-by: Max Grover <[email protected]>

* remove load module section (#1234)

* DOC: Updated pyart doc to include column code, fix incorrect syntax and more. (#1231)

* DOC: Updated pyart doc to include column code, incorrect syntax and
more.

* DOC: Forgot https

* MNT: Revert ssh to https

* MNT: Suggested changes.

* ADD: addition of subset_radar function in radar_utils (#1227)

* added cut_radar function in util

* added cut_radar function in util

* renamed cut_radar to subset_radar

* MNT: Update ci.yml.

* MNT: Updating environments.

* MNT: Duplicate 'latest'

* MNT: Revert back os runner check.

* MNT: Add bash to each run

Co-authored-by: zssherman <[email protected]>

* MNT: Remove trmm_rsl from CI optional, remove from debug info. (#1239)

* CI: Remove trmm_rsl from testing.

* MNT: Remove trmm_rsl from debug and install warning build message.

* CI: Remove trmm_rsl pathing from CI.

* MNT: Remove warning from setup.py

* remove trmm_rsl from doc env

* MNT: Don't code cover deprecated code.

* replace dealias with region based

* use cfradial with rhi two panel

* add new plot ppi cfradial remove old one using sigmet

* use cfradial with xsect example

Co-authored-by: mgrover1 <[email protected]>

* add tests for xradar

* make sure CI runs on the xradar branch

* add datatree as pip and fix missing import

* remove python 3.7

* fix incorrect xradar test

* update __init__.py

* remove chunk arg

Co-authored-by: Zach Sherman <[email protected]>
Co-authored-by: Daniel Wolfensberger <[email protected]>
Co-authored-by: Joe O'Brien <[email protected]>
Co-authored-by: Sam Gardner <[email protected]>
Co-authored-by: Bobby Jackson <[email protected]>
Co-authored-by: zssherman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants