【发布时间】:2021-08-10 02:00:38
【问题描述】:
我是一名 Python 初学者,我使用 cartopy 将我的数据指向地理坐标。但是,我想在地磁坐标中绘制我的数据。我看到cartopy中有一个旋转杆选项。我不确定的是:如果我使用磁北极的位置(纬度和经度)来旋转两极,那会给我正确的结果吗?因为,北方和南极彼此不对称(由于太阳风的影响),但地理两极是对称的。据我了解,cartopy 中的旋转极点选项会根据给定的新极点位置对称地移动地理极点。
此外,地球上地磁北极的纬度和经度每年都在变化。所以,我想,磁北极的位置应该针对我们感兴趣的每个日期单独更新。这些值可以从多个地方获得,所以这不是问题。
来到我的实际问题:我应该在下面的代码中进行哪些更改才能在地磁坐标中正确绘制我的数据?在这种情况下,cartopy 中的旋转杆选项会起作用吗?也感谢任何有关处理此类问题的其他方法的建议。
这是我用来绘制地理坐标的:
# set the map coverage:
extent = [-90, -60, 30, 60]
central_lon = np.mean(extent[:2])
central_lat = np.mean(extent[2:])
fig2 = plt.figure(figsize=(7, 7))
ax2 = plt.axes(projection=ccrs.Orthographic(central_longitude=central_lon, central_latitude=central_lat))
ax2.set_extent(extent, ccrs.PlateCarree())
ax2.add_feature(cartopy.feature.OCEAN, color='white', alpha=1, zorder=0)
ax2.add_feature(cartopy.feature.LAND, edgecolor='white',
color='silver', alpha=0.3, zorder=10)
ax2.add_feature(cartopy.feature.LAKES, color='white', alpha=1, zorder=0)
# plot the pointing direction.
for i in range (0,ind1):
# downsampling to every 10th arrow ([::10])
L=i*10
# Orientation (X body vector)
if 360+lon[L] > 360+OLon: # if spacecraft is in the east
ax2.quiver(np.array([lon[L]]), np.array([lat[L]]),
np.array([-XV[L][2]]), np.array([XV[L][1]]),
color='black', scale=7, width=.006, axes=ax2,
transform=ccrs.PlateCarree(), angles = "xy", zorder=20)
ax2.text(-0.09, 0.5, 'Geographic Latitude', fontsize=14, va='bottom', ha='center',
rotation='vertical', rotation_mode='anchor',
transform=ax2.transAxes)
ax2.text(0.5, -0.12, 'Geographic Longitude', fontsize=14, va='bottom', ha='center',
rotation='horizontal', rotation_mode='anchor',
transform=ax2.transAxes)
【问题讨论】:
-
如果您在 v 小范围内绘制数据以进行可视化,
the north and south magnetic poles are not symmetric to each other的事实并不重要。 -
但是,当我想制作全局情节时,差异会有所不同吗? @swatchai
标签: python-3.x coordinate-systems cartopy