Radar Composite Conversion of x, y into latitude and longitude #1762
Answered
by
dopplershift
frontogenesis
asked this question in
Q&A
Answered by
dopplershift
Mar 12, 2021
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 ( |
2 replies
Answer selected by
frontogenesis
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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_crscan give you the proper object) to transform that pair to x,y, and then use that to select into your data.