Skip to content

Transforming NARR LCC coordinate system to Lat Lon #2648

Discussion options

You must be logged in to vote

Hi,

Thanks for sharing your code, it was helpful. You are close. This line:
lots_of_data = xr.open_dataset(ds[d].access_urls['OPENDAP']).metpy.parse_cf()

actually adds a Coordinate Reference System (CRS) to your lots_of_data variable, and this is the key to unlocking the rest of the puzzle. Here's what that looks like:

>>> lots_of_data.metpy.parse_cf().metpy_crs
<xarray.DataArray 'metpy_crs' ()>
array(<metpy.plots.mapping.CFProjection object at 0x7fc9ecdf9790>,
      dtype=object)
Coordinates:
    metpy_crs  object Projection: lambert_conformal_conic

From the documentation here:
https://unidata.github.io/MetPy/latest/tutorials/xarray_tutorial.html#coordinates-and-coordinate-reference-sys…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rubenjbehnke
Comment options

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