Skip to content

Radar Composite Conversion of x, y into latitude and longitude #1762

Answered by dopplershift
frontogenesis asked this question in Q&A
Discussion options

You must be logged in to vote

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.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@frontogenesis
Comment options

@ahuang11
Comment options

Answer selected by frontogenesis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants