Julian Moore Posted January 13, 2023 Share Posted January 13, 2023 Hello, I had a couple of questions I hope someone can help with. I have been able to download some data from the mesoscale atlas, but am struggling with getting the data to position correctly. How do the south_north and west_east values relate to lat/lon, and how can we interpret them as such? I can view the associated CRS in Panoply and display the data there but when I try in anything else (using the CRS defined) everything plots in the wrong place. Best regards, Julian Link to comment
Rogier Posted January 13, 2023 Share Posted January 13, 2023 (edited) You could use the windkit package (pip install windkit) to convert to latitude longitude using the function reproject. However, it won't be a raster anymore because the coordinate spacing varies in both south-north and west-east. So you can only plot it if you keep the original projection, which is given in the variable "crs". import windkit as wk import matplotlib.pyplot as plt import xarray as xr test=xr.open_dataset("/home/rofl/newa_elev.nc").set_coords("crs") test.elevation.plot() test_latlon=wk.spatial.reproject(test,"EPSG:4326") test_latlon.elevation.plot() Edited January 13, 2023 by Rogier Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now