气象等高线地图/位势高度

等高线作业画破防了,去ECMWF上面下了个ERA5的再分析数据,感觉还不错

ERA5:Search results (copernicus.eu)

import xarray as xr
import matplotlib.pyplot as plt
import cartopy.crs as ccrs

data = xr.open_dataset('finale.nc')  # 替换为你的文件路径

geopotential_500hPa = data['z']  # 假设数据集中名为'z'的变量包含位势高度

# 读取经纬度
lon = data.longitude
lat = data.latitude

# 设置图大小/参数
plt.figure(figsize=(18, 10), dpi=400)
ax = plt.axes(projection=ccrs.PlateCarree())
contour = plt.contour(lon, lat, geopotential_500hPa.isel(time=0), levels=20, transform=ccrs.PlateCarree())  # 假设你只有一个时间步长

# 海岸线
ax.coastlines()

# 添加经纬度标注
gl = ax.gridlines(crs=ccrs.PlateCarree(), draw_labels=True, linewidth=1, color='gray', alpha=0.5, linestyle='--')
gl.xlabels_top = False
gl.ylabels_right = False
gl.xlabel_style = {'size': 10, 'color': 'black'}
gl.ylabel_style = {'size': 10, 'color': 'black'}

# 添加等高线标注
plt.clabel(contour, inline=True, fontsize=8, fmt='%1.0f')

# 标注生成图片
plt.xlabel('Longitude')
plt.ylabel('Latitude')
plt.title('500hPa Geopotential Height Contour')
plt.grid(True)
plt.show()
暂无评论

发送评论 编辑评论


|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇