openradar / xradar

A tool to work in weather radar data in xarray
https://docs.openradarscience.org/projects/xradar
MIT License
97 stars 17 forks source link

ENH: add `spatial_ref` with `pyproj` when georeferencing, add/adapt methods/tests #87

Closed kmuehlbauer closed 1 year ago

kmuehlbauer commented 1 year ago

This adds spatial_ref to the datasets when georeferencing. That way users can easily wrap this into cartopy and use this for georeferenced plotting.

kmuehlbauer commented 1 year ago

@mgrover1 I've refactored the naming per your suggestion.

codecov[bot] commented 1 year ago

Codecov Report

Merging #87 (87537e7) into main (3435b08) will decrease coverage by 0.25%. The diff coverage is 75.40%.

@@            Coverage Diff             @@
##             main      #87      +/-   ##
==========================================
- Coverage   88.00%   87.75%   -0.25%     
==========================================
  Files          18       19       +1     
  Lines        3227     3284      +57     
==========================================
+ Hits         2840     2882      +42     
- Misses        387      402      +15     
Flag Coverage Δ
unittests 87.75% <75.40%> (-0.25%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
xradar/accessors.py 59.32% <37.50%> (-8.86%) :arrow_down:
xradar/georeference/projection.py 82.75% <82.75%> (ø)
xradar/georeference/__init__.py 100.00% <100.00%> (ø)
xradar/georeference/transforms.py 100.00% <100.00%> (ø)
xradar/model.py 95.50% <100.00%> (+0.07%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

kmuehlbauer commented 1 year ago

@mgrover1 I'm ironing out the CI/doc issues. We can let this sit another while. No rush for now to get this in.

kmuehlbauer commented 1 year ago

This is the direct link to the docs with a plotting example:

https://openradar-docs--87.org.readthedocs.build/projects/xradar/en/87/notebooks/plot-ppi.html#Plot-PPI-on-map-with-cartopy

kmuehlbauer commented 1 year ago

@mgrover1 Heads-up, I've found some problems with the docs which are slightly related to this PR and I'll add that here. I'll also add some more code to model.py for the sitecoords.

kmuehlbauer commented 1 year ago

I've also found an issue that get_x_y_z didn't take the radar site altitude into account, I've fixed this too.

kmuehlbauer commented 1 year ago

@mgrover1 I'll merge tomorrow, if no-one beats me to it.

kmuehlbauer commented 1 year ago

I've rearranged/squashed the commits into two for rebase-merge. Getting this when CI is green.