[数据来源] 新版本全球水深地形高程数据集ETOPO 2022数据,直接python读取

[复制链接]
美国国家环境信息中心2022年发布了新版本全球水深地形高程数据集ETOPO 2022。ETOPO全球地形模型集成了来自区域和全球数据集的地形、测深和海岸线数据,从而能够对地球表面的地球物理特征进行全面、高分辨率的渲染。该模型旨在支持海啸预测、建模和预警,以及海洋环流建模和地球可视化。目前的版本ETOPO 2022有冰面和基岩版本,描绘了覆盖格陵兰岛和南极洲的冰盖顶层或下面的基岩。有关更多信息,请发送电子邮件:dem.info@noaa.gov.ETOPO 2022,一个具有15弧秒(450米)分辨率的全球地形模型,无缝集成地形和测深数据。ETOPO 2022模型结合使用了来自美国国家和全球来源的众多机载激光雷达、卫星衍生地形和船载测深数据集。ETOPO 2022使用来自NASA的ICESat-2和其他经过审查的数据源的裸地地形数据来独立验证输入数据集和最终的ETOPO 2022模型。ETOPO 2022有“冰面”(南极和格陵兰冰原顶部)和“基岩”(冰原底部)版本。Ice surface_elevationf包含“冰面”(南极和格陵兰冰原顶部)Bedrock elevation仅包含基岩”(冰原底部)ETOPO 2022官网免费下载链接:
游客,如果您要查看本帖隐藏内容请回复

Python读取ETOPO 2022绘制明朝DEM地形图:
[Python] 纯文本查看 复制代码
import numpy as np
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
import cartopy.feature as cfeature
from cartopy.io.shapereader import Reader
from cartopy.mpl.ticker import LongitudeFormatter,LatitudeFormatter
import xarray as xr
import rioxarray as rxr
import maskout
from matplotlib import rcParams
config = {"font.family":'Times New Roman',"font.size": 12,"mathtext.fontset":'stix'}
rcParams.update(config)
region=[70, 150, 0, 60]
filename=r'./ETOPO2022.tif'
ds = rxr.open_rasterio(filename)
lons,lats = np.meshgrid(ds['x'],ds['y'])
dem = ds[0]
# plot
fig=plt.figure(dpi=600,figsize=(16,9))
proj=ccrs.PlateCarree()
ax=fig.add_axes([0,0,0.4,0.4],projection=proj)
ax.set_extent(region, crs = proj)
ax.set_xticks(np.arange(region[0], region[1] + 1, 10), crs = proj)
ax.set_yticks(np.arange(region[-2], region[-1] + 1, 10), crs = proj)
ax.xaxis.set_major_formatter(LongitudeFormatter(zero_direction_label=False))
ax.yaxis.set_major_formatter(LatitudeFormatter())
ax.add_feature(cfeature.OCEAN.with_scale('50m'))
ax.add_feature(cfeature.LAND.with_scale('50m'))
ax.add_feature(cfeature.LAKES.with_scale('50m'))
ax.add_geometries(Reader(r'./river1.shp').geometries(),ccrs.PlateCarree(),facecolor='none',edgecolor='b',linewidth=1)
ax.add_geometries(Reader(r'./ming.shp').geometries(),ccrs.PlateCarree(),facecolor='none',edgecolor='k',linewidth=1)
ax.add_geometries(Reader(r'./henan_province.shp').geometries(),ccrs.PlateCarree(),facecolor='none',edgecolor='k',linewidth=1)
ax.add_geometries(Reader(r'./nineline.shp').geometries(),ccrs.PlateCarree(),facecolor='none',edgecolor='k',linewidth=1)
ax.add_geometries(Reader(r'./ne_10m_land.shp').geometries(),ccrs.PlateCarree(),facecolor='none',edgecolor='k',linewidth=0.2)
ax.add_geometries(Reader(r'./ne_50m_lakes.shp').geometries(),ccrs.PlateCarree(),facecolor='none',edgecolor='k',linewidth=0.2)
ax.add_geometries(Reader(r'./henan1.shp').geometries(),ccrs.PlateCarree(),facecolor='none',edgecolor='k',linewidth=1.2,zorder=1)
ax.add_geometries(Reader(r'./river1.shp').geometries(),ccrs.PlateCarree(),facecolor='none',edgecolor='b',linewidth=0.2)
ax.add_geometries(Reader(r'./ne_50m_lakes.shp').geometries(),ccrs.PlateCarree(),facecolor='none',edgecolor='k',linewidth=0.2)
ax.add_geometries(Reader(r'./1级河流.shp').geometries(),ccrs.PlateCarree(),facecolor='none',edgecolor='RoyalBlue',linewidth=0.4)
ax.add_geometries(Reader(r'./2级河流.shp').geometries(),ccrs.PlateCarree(),facecolor='none',edgecolor='DodgerBlue',linewidth=0.3)
ax.add_geometries(Reader(r'./3级河流.shp').geometries(),ccrs.PlateCarree(),facecolor='none',edgecolor='DeepSkyBlue',linewidth=0.2)
ax.add_geometries(Reader(r'./4级河流.shp').geometries(),ccrs.PlateCarree(),facecolor='none',edgecolor='SkyBlue',linewidth=0.15)
ax.add_geometries(Reader(r'./5级河流.shp').geometries(),ccrs.PlateCarree(),facecolor='none',edgecolor='LightSkyBlue',linewidth=0.05)
ax.add_geometries(Reader(r'./主要湖泊.shp').geometries(),ccrs.PlateCarree(),edgecolor='none',linewidth=0,facecolor='#BEE8FF')
c11=ax.contourf(lons,lats,dem,np.arange(0,8000,1000),extend='both',transform=ccrs.PlateCarree(),cmap='gist_rainbow',zorder=0)
maskout(c11,ax,'./ming.shp',1)
font3={'family':'SimHei','size':12,'color':'k'}
plt.ylabel("纬度",fontdict=font3)
plt.xlabel("经度",fontdict=font3)
position=fig.add_axes([0.08,0.02,0.005,0.12])#位置[左,下,右,上]
cbar=plt.colorbar(c11,cax=position,shrink=0.4,aspect=100,fraction=.03,pad=0.01)   #aspect控制bar宽度,fraction控制大小比例,pad控制与图的距离
cbar.set_ticks(np.arange(0,8000,1000))        #设置colorbar范围和刻度标记间隔
cbar.ax.tick_params(labelsize=6,direction='in',right=False)
font3={'family':'SimHei','size':12,'color':'k'}
ax.set_title('明朝DEM地形空间分布图',fontdict=font3)
ax2=fig.add_axes([0.3,0,0.4,0.4],projection=proj)
region2=[110,117,31,37]
ax2.set_extent(region2, crs = proj)
# ax.coastlines(scale, linewidth = 0.5)
ax2.set_xticks(np.arange(region2[0], region2[1] + 1, 1), crs = proj)
ax2.set_yticks(np.arange(region2[-2], region2[-1] + 1, 1), crs = proj)
ax2.xaxis.set_major_formatter(LongitudeFormatter(zero_direction_label=False))
ax2.yaxis.set_major_formatter(LatitudeFormatter())
ax2.add_feature(cfeature.OCEAN.with_scale('50m'))
ax2.add_feature(cfeature.LAND.with_scale('50m'))
ax2.add_feature(cfeature.LAKES.with_scale('50m'))
ax2.add_geometries(Reader(r'./river1.shp').geometries(),ccrs.PlateCarree(),facecolor='none',edgecolor='b',linewidth=1)
ax2.add_geometries(Reader(r'./ming.shp').geometries(),ccrs.PlateCarree(),facecolor='none',edgecolor='k',linewidth=1)
ax2.add_geometries(Reader(r'./henan_province.shp').geometries(),ccrs.PlateCarree(),facecolor='none',edgecolor='k',linewidth=1)
ax2.add_geometries(Reader(r'./nineline.shp').geometries(),ccrs.PlateCarree(),facecolor='none',edgecolor='k',linewidth=1)
ax2.add_geometries(Reader(r'./ne_10m_land.shp').geometries(),ccrs.PlateCarree(),facecolor='none',edgecolor='k',linewidth=0.2)
ax2.add_geometries(Reader(r'./ne_50m_lakes.shp').geometries(),ccrs.PlateCarree(),facecolor='none',edgecolor='k',linewidth=0.2)
ax2.add_geometries(Reader(r'./henan1.shp').geometries(),ccrs.PlateCarree(),facecolor='none',edgecolor='k',linewidth=1.2,zorder=1)
ax2.add_geometries(Reader(r'./river1.shp').geometries(),ccrs.PlateCarree(),facecolor='none',edgecolor='b',linewidth=0.2)
ax2.add_geometries(Reader(r'./ne_50m_lakes.shp').geometries(),ccrs.PlateCarree(),facecolor='none',edgecolor='k',linewidth=0.2)
ax2.add_geometries(Reader(r'./1级河流.shp').geometries(),ccrs.PlateCarree(),facecolor='none',edgecolor='RoyalBlue',linewidth=0.4)
ax2.add_geometries(Reader(r'./2级河流.shp').geometries(),ccrs.PlateCarree(),facecolor='none',edgecolor='DodgerBlue',linewidth=0.3)
ax2.add_geometries(Reader(r'./3级河流.shp').geometries(),ccrs.PlateCarree(),facecolor='none',edgecolor='DeepSkyBlue',linewidth=0.2)
ax2.add_geometries(Reader(r'./4级河流.shp').geometries(),ccrs.PlateCarree(),facecolor='none',edgecolor='SkyBlue',linewidth=0.15)
ax2.add_geometries(Reader(r'./5级河流.shp').geometries(),ccrs.PlateCarree(),facecolor='none',edgecolor='LightSkyBlue',linewidth=0.05)
ax2.add_geometries(Reader(r'./主要湖泊.shp').geometries(),ccrs.PlateCarree(),edgecolor='none',linewidth=0,facecolor='#BEE8FF')
c12=ax2.contourf(lons,lats,dem,np.arange(0,1800,200),extend='both',transform=ccrs.PlateCarree(),cmap='gist_rainbow',zorder=0)
maskout(c12,ax2,'./henan_province.shp',1)
cbar=plt.colorbar(c12,shrink=0.98,aspect=30,fraction=.03,pad=0.01)   #aspect控制bar宽度,fraction控制大小比例,pad控制与图的距离
cbar.set_ticks(np.arange(0,1800,200))         #设置colorbar范围和刻度标记间隔
cbar.ax.tick_params(labelsize=12, direction='in', right=False)
font3={'family':'SimHei','size':12,'color':'k'}
ax2.set_title('河南DEM地形空间分布图',fontdict=font3)
font3={'family':'SimHei','size':12,'color':'k'}
plt.ylabel("纬度",fontdict=font3)
plt.xlabel("经度",fontdict=font3)
ax.plot([110,117,117,110,110],[31,31,37,37,31],lw=1,transform=ccrs.PlateCarree(),color='k')
import matplotlib.patches as mpatches
trans_proj=ccrs.PlateCarree()#用于转换的原坐标
target_proj=ccrs.PlateCarree()
x=np.array([117,117])
y=np.array([37,31])
x2=np.array([110,110])
for m,n,h,j in zip(x,y,x2,y):#由于移动了中心坐标轴,此处的x转化需减去这个值
    xyA=target_proj.transform_point(m,n,trans_proj)
    xyB=[h,j]
    con=mpatches.ConnectionPatch(
    xyA=xyA,xyB=xyB,coordsA=ax.transData,coordsB=ax2.transData,color='k',ls='-')
    fig.add_artist(con)
plt.savefig('./plot280.1.png',dpi=800,bbox_inches='tight',pad_inches=0)
plt.show()
024b978b730f575a85452e112ea2af7a.jpeg
[Python] 纯文本查看 复制代码
c11=ax.contourf(lons,lats,dem,np.arange(0,8000,1000),extend='both',transform=ccrs.PlateCarree(),cmap=cmaps.MPL_terrain,zorder=0)
a6026a61af85e729ddaf631b436ea947.jpeg
[Python] 纯文本查看 复制代码
c11=ax.contourf(lons,lats,dem,np.arange(0,8000,1000),extend='both',transform=ccrs.PlateCarree(),cmap=cmaps.GMT_globe,zorder=0)
8b2b5ff01a81774713d03ae5afd5b222.jpeg
为方便大家撰写论文绘制区位图,猫猫已将ETOPO 2022全球DEM高程数据全部下载拼接并重命名为ETOPO2022.tif。
获取本文ETOPO 2022全球DEM高程数据途径:
. @8 K( d' _. A3 r
游客,如果您要查看本帖隐藏内容请回复
$ o6 p# z& S$ F  X) Y

# v3 n/ ]5 Y5 X3 J' B9 x
回复

举报 使用道具

相关帖子

全部回帖
发表于 2024-6-30 13:08:45

举报 回复 使用道具

感谢!
发表于 2024-9-29 12:58:21

举报 回复 使用道具

懒得打字?点击右侧快捷回复 【吾爱海洋论坛发文有奖】
您需要登录后才可以回帖 登录 | 立即注册
庄家真牛牛杂火锅
活跃在7 天前
快速回复 返回顶部 返回列表