Geostationary projection of cartopy produces displaced data

Asked

Viewed 23 times

1

Hello!

I am trying to plot a geostationary satellite data (MSG-SEVIRI) using cartopy projection ccrs.Geostationary. The data format is grb. However, my code is generating a wrong result. The data seems to be misplaced relative to the map.

Go below, my code:

   

    import pygrib
    import numpy as np
    import matplotlib.pyplot as plt
    from pyresample import geometry
    from pyresample import create_area_def
    import cartopy.crs as ccrs
    from numpy import unravel_index
    
    grbs=pygrib.open('MSG4-SEVI-MSGAESE-0100-0100-20180228000000.000000000Z-20180228001825- 
    1415948.grb')
    
    grb = grbs.select(name='Aerosol optical thickness at 0.635 um')[0]
    maxt = grb.values
    #lats, lons = grb.latlons()
    
    lon=np.linspace(float(67.5), float(-67.5), len(maxt))
    lat=np.linspace(float(-67.5), float(67.5), len(maxt))
    ## OS valores -67.5 and 67.5 values eu peguei aqui: 
     https://navigator.eumetsat.int/product/EO:EUM:DAT:MSG:AES

    a, b = np.meshgrid(lon, lat)
       
    plt.figure(figsize=(10, 10))
    ax=plt.axes(projection= ccrs.Geostationary(satellite_height=35786000))
    ax.set_global()
    ax.coastlines()
    ax.contourf(a, b, maxt, transform=ccrs.PlateCarree())  
    plt.show()

And the result: inserir a descrição da imagem aqui

Do you realize that the data contour doesn’t match the borders of the countries? This is very visible if we look at the bottom of the image, in the south of the African continent.

  Does anyone know how I can fix this?  

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.