openradar / xradar

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

Georeferencing follow-up issue #38

Closed kmuehlbauer closed 1 year ago

kmuehlbauer commented 2 years ago

to not forget the items from #25:

mgrover1 commented 2 years ago

Thanks for putting these together @kmuehlbauer

mgrover1 commented 1 year ago

For georeferencing... @kmuehlbauer what would you think if we had an optional cartopy dependency? To deal with these projections?

kmuehlbauer commented 1 year ago

@mgrover1 Do you refer to map-making? Could you elaborate a bit more with regard to what functionality you have in mind?

mgrover1 commented 1 year ago

I am thinking in terms of projecting data as well - see the MetPy functionality here https://unidata.github.io/MetPy/latest/examples/XArray_Projections.html

kmuehlbauer commented 1 year ago

Yes, I see, they use an accessor to get a cartopy crs object.

From my perspective we would just need to add the aeqd cartopy crs to Dataset/DataArray when creating xyz-coordinates if cartopy is available.

mgrover1 commented 1 year ago

Yup! That makes sense!

mgrover1 commented 1 year ago

Sorry for the delay here @kmuehlbauer ... prepping for our ARM/ASR meeting next week.

kmuehlbauer commented 1 year ago

No worries @mgrover1. It's great we are this far already.

kmuehlbauer commented 1 year ago

From my perspective we would just need to add the aeqd cartopy crs to Dataset/DataArray when creating xyz-coordinates if cartopy is available.

@mgrover1 I've though about that the last days and tinkered a bit with pyproj. I've ended up with a workflow where we can use pyproj to:

The users would be able to wrap that into a cartopy.crs.Projection and use it for plotting with cartopy.

That would leave us with only pyproj/proj as additional dependencies. We could even make this optional. I'll see if I can workout a PR from that.

kmuehlbauer commented 1 year ago

@mgrover1 I've setup a PR with a minimal pyproj-based solution in #87.

kmuehlbauer commented 1 year ago

@mgrover1 We might close this issue and #25, as we have the basic workable georeferencing available now. WDYT?

mgrover1 commented 1 year ago

Agreed! Let's do it.