Search code examples
pythongdalnetcdfcdo-climatepyproj

Remap data from Polar Stereographic projection to Lat-Lon


I have a NetCDF file with storm track density data over south polar stereographic projection. Both X and Y coordinates range from -1.924274 to 1.88504 (I don't know the units here). The link for the .nc file is here.

When I open the file with Xarray and plot the data, I have the following: enter image description here

Is there any way to remap this to lat-lon grid in Python or CDO? Thanks!


Solution

  • You can probably do this using my package nctoolkit (https://nctoolkit.readthedocs.io/en/latest/), which uses CDO as a back end.

    import nctoolkit as nc
    data = nc.open_data("infile.nc")
    data.to_latlon(lon = [lon_min, lon_max], lat = [lat_min, lat_max])
    data.plot()
    

    You will need to define lon_min etc.