简体   繁体   English

坐标系变换

[英]Coordinate system transformation

I have data on a grid made by matlab with putpole and rotatem.我有关于由 matlab 制作的带有 putpole 和rotatem 的网格的数据。 I don't have access to the original data but would like to work with Python on it.我无权访问原始数据,但想使用 Python 处理它。 The origin of the grid is 78 and 11 degrees (star marker) but plotting with cartopy it always puts the North Pole in the middle, so my data are a little off.网格的原点是 78 度和 11 度(星标),但是用 cartopy 绘制它总是把北极放在中间,所以我的数据有点偏差。

Does someone know how to fix it?有人知道如何解决吗? I tried with the false_northing but that doesn't do anything.我尝试使用 false_northing 但这没有任何作用。 Please ignore the horrible colorbar I am just playing around trying to fix the map.请忽略我正在尝试修复地图的可怕颜色条。

    fig=plt.figure(figsize=(8,8))
    ax = fig.add_subplot(1,1,1,projection=ccrs.NorthPolarStereo())
    cmap = plt.get_cmap('jet')

    #plotting settings
    ax.set_extent([-180, 180, 40, 90], ccrs.PlateCarree())
    ax.gridlines(linewidth=2, color='k', alpha=0.7, linestyle='--')
    ax.coastlines(zorder=3)

    ZEP_coords=(78.9,11.8)
    ax.plot(ZEP_coords,'*',c='orangered', markersize=25, transform=ccrs.PlateCarree())

    data_mod, lon_mod = add_cyclic_point(a, coord=lon)
    plt.contourf(lon_mod,lat,data_mod,20,vmin=0,     vmax=0.05,cmap=cmap,transform=ccrs.PlateCarree())
    plt.colorbar()

plot how it looks like at the moment:绘制它现在的样子:

图片1

data structure and all infos I have:数据结构和我拥有的所有信息:

图像2

Instead of NorthPolarStereo , if you use Stereographic as your projection you can specify both the central latitude and longitude.而不是NorthPolarStereo ,如果您使用Stereographic作为您的投影,您可以指定中央纬度和经度。 You may also want to look at the RotatedPole projection.您可能还想查看RotatedPole投影。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM