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

Site-coordinates at Sweep-Level #48

Closed kmuehlbauer closed 1 year ago

kmuehlbauer commented 1 year ago

In CfRadial2-standard the sweep-groups do not contain the site-coordinates (latitude/longitude/altitude). Although that makes perfectly sense when reading the whole DataTree, it might be not as perfect for the single-sweep reading via xr.open_dataset. The site-coordinates (at least latitude and altitude) might be used for georeferencing.

I'd suggest to enable the xarray-backends to add the site-coordinates to the returned Dataset. We have at least the following options:

Thoughts?

mgrover1 commented 1 year ago

I like the idea of keeping that at the root level... we can add an attribute perhaps? But keeping at the root dataset level makes sense

kmuehlbauer commented 1 year ago

@mgrover1 Yes, they should definitely stay at the root group. And they should not show up in sweep groups inside DataTree.

But it would be great if they could show up when single sweeps are read via xr.open_dataset.

I'll create a PR with a proposal.