Radar Composite Conversion of x, y into latitude and longitude #1762
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I think seeing the code would be needed to be sure, but the problem is that, if you're assigning lat/lons to a projected grid of data (I'm assuming your radar composite is something like MRMS, which is on a Lambert conformal projection), you end up with 2D arrays of lat/lon. Currently, xarray does not allow you to use those 2D indexes to do selection of data. The easiest way, as you alluded to, is to take your desired lat/lon pair, use Pyproj ( |
Beta Was this translation helpful? Give feedback.
I think seeing the code would be needed to be sure, but the problem is that, if you're assigning lat/lons to a projected grid of data (I'm assuming your radar composite is something like MRMS, which is on a Lambert conformal projection), you end up with 2D arrays of lat/lon. Currently, xarray does not allow you to use those 2D indexes to do selection of data.
The easiest way, as you alluded to, is to take your desired lat/lon pair, use Pyproj (
var.metpy.pyproj_crs
can give you the proper object) to transform that pair to x,y, and then use that to select into your data.