请选择 进入手机版 | 继续访问电脑版
爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 41318|回复: 25

[求助] 使用windspharm计算速度势函数和辐合辐散风出现问题,看起来是边缘计算出错?

[复制链接]

新浪微博达人勋

发表于 2021-2-2 15:03:04 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
# The standard interface requires that latitude and longitude be the leading
# dimensions of the input wind components, and that wind components must be
# either 2D or 3D arrays. The data read in is 3D and has latitude and
# longitude as the last dimensions. The bundled tools can make the process of
# re-shaping the data a lot easier to manage.
uwnd, uwnd_info = prep_data(U_data[:,::-1,:], 'tyx')
vwnd, vwnd_info = prep_data(V_data[:,::-1,:], 'tyx')
u200wnd, uwnd200_info = prep_data(U200_data[:,::-1,:], 'tyx')
v200wnd, vwnd200_info = prep_data(V200_data[:,::-1,:], 'tyx')
# It is also required that the latitude dimension is north-to-south. Again the
# bundled tools make this easy.
lat_ns=lats[::-1]
lats, uwnd, vwnd = order_latdim(lat_ns[8:45], uwnd, vwnd)
lats200, u200wnd, v200wnd = order_latdim(lat_ns[:45], u200wnd, v200wnd)
# Create a VectorWind instance to handle the computations.
w = VectorWind(uwnd, vwnd)
w200 = VectorWind(u200wnd, v200wnd)
# Compute components of rossby wave source: absolute vorticity, divergence,
# irrotational (divergent) wind components, gradients of absolute vorticity.
# eta = w.absolutevorticity()
# div = w.divergence()
uchi, vchi = w.irrotationalcomponent()
u200chi, v200chi = w200.irrotationalcomponent()
# Compute the streamfunction and velocity potential. Also use the bundled
# tools to re-shape the outputs to the 4D shape of the wind components as they
# were read off files.#画图只使用vp
sf, vp = w.sfvp()
sf = recover_data(sf, uwnd_info)
vp = recover_data(vp, uwnd_info)
uchi = recover_data(uchi,uwnd_info)
vchi = recover_data(vchi,vwnd_info)

sf200, vp200 = w200.sfvp()
sf200 = recover_data(sf200, uwnd200_info)
vp200 = recover_data(vp200, uwnd200_info)
u200chi = recover_data(u200chi,uwnd200_info)
v200chi = recover_data(v200chi,vwnd200_info)
#转换纬度为从南到北
vp=vp[:,::-1,:]
uchi=uchi[:,::-1,:]
vchi=vchi[:,::-1,:]

vp200=vp200[:,::-1,:]
u200chi=u200chi[:,::-1,:]
v200chi=v200chi[:,::-1,:]

uchi,lons_c = add_cyclic_point(uchi, lons[20:97])
vchi,lons_c = add_cyclic_point(vchi, lons[20:97])
vp,lons_c = add_cyclic_point(vp, lons[20:97])

u200chi,lons_c200 = add_cyclic_point(u200chi, lons[:97])
v200chi,lons_c200 = add_cyclic_point(v200chi, lons[:97])
vp200,lons_c200 = add_cyclic_point(vp200, lons[:97])

dv&vp.png
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2021-9-1 13:16:14 | 显示全部楼层
流星大气 发表于 2021-9-1 12:45
你是在wsl下安装的吗

不是,直接是Windows
密码修改失败请联系微信:mofangbao
回复 支持 1 反对 0

使用道具 举报

新浪微博达人勋

发表于 2021-8-11 18:14:42 | 显示全部楼层
楼主,想问一下C:\Users\hp\Desktop、1.png你在什么通道成功安装windspharm库包的呀,我用anadonda安装一直显示安装失败
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2021-8-15 09:39:29 | 显示全部楼层
amandine 发表于 2021-8-11 18:14
楼主,想问一下你在什么通道成功安装windspharm库包的呀,我用anadonda安装一直显示安装失败

windspharm需要在linux环境下安装
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2021-8-29 22:17:40 | 显示全部楼层
流星大气 发表于 2021-8-15 09:39
windspharm需要在linux环境下安装

好的,谢谢楼主回复。但是我在windows下也安装成功啦
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2021-8-30 22:27:11 | 显示全部楼层
amandine 发表于 2021-8-29 22:17
好的,谢谢楼主回复。但是我在windows下也安装成功啦

windows怎么装的,我怎么安装失败
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2021-9-1 12:45:21 | 显示全部楼层
amandine 发表于 2021-8-29 22:17
好的,谢谢楼主回复。但是我在windows下也安装成功啦

你是在wsl下安装的吗
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2021-9-1 17:17:06 | 显示全部楼层
zjc130 发表于 2021-9-1 13:16
不是,直接是Windows

我用Windows一直安装不成功欸
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2021-9-2 14:27:11 | 显示全部楼层
谢君行 发表于 2021-9-1 17:17
我用Windows一直安装不成功欸

我在wsl安装成功了, Windows上是安装不了的
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2021-9-4 14:44:39 来自手机 | 显示全部楼层
zjc130 发表于 2021-09-01 13:16
不是,直接是Windows

厉害

                               
登录/注册后可看大图
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表