matplotlib.mlab.griddata very slow and returns array of nan when valid data is input

后端 未结 4 718
予麋鹿
予麋鹿 2021-02-10 00:23

I am trying to map an irregularly gridded dataset (raw satellite data) with associated latitudes and longitudes to a regularly gridded set of latitudes and longitudes given by <

4条回答
  •  南笙
    南笙 (楼主)
    2021-02-10 01:06

    If you use pclormesh, you don't have to do any sort of interpolation. pcolormesh would gladly accept the data structure the way you have given here:

    from mpl_toolkits.basemap import Basemap
    m = Basemap(-----)
    x,y = m(datalon, datalat)
    m.pcolormesh(x,y,var)
    plt.show()
    

    kindly use this and tell me if this works or not.

    However, there is some problem in pcolormesh when there is overlap of the orbit data. Please refer to this question of mine, you may find something useful.

    Using pcolormesh for plotting an orbit data

提交回复
热议问题