爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 7888|回复: 1

[作图] NCL画水汽通量散度

[复制链接]
发表于 2019-4-12 13:32:22 | 显示全部楼层 |阅读模式

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

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

x
请问各位,为啥我改变u,v,q的取值范围,利用uv2dvf这个函数画出来的水汽通量散度的位置会发生改变,难道不是按照每一个小网格进行计算的吗?而且算出来的量级感觉也不对

begin
f=addfile("E:/ncl/cygwin/data/LWdata/uvq.grib","r")
U=f->U_GDS0_ISBL(82,2,{0:32},{100:120})
V=f->V_GDS0_ISBL(82,2,{0:32},{100:120})
q=f->Q_GDS0_ISBL(82,2,{0:32},{100:120})
;读取925hPa的uvq

uq = U
uq = U*q*1000/9.8

vq = V
vq = V*q*1000/9.8  ;水汽通量

qs = U
uv2dvf(uq, vq, qs)
qs = qs*1000000    ;水汽通量散度

wks=gsn_open_wks("png", "82xuvq")

res = True
res@gsnAddCyclic = False
res@gsnDraw = False
res@gsnFrame = False
res@mpOutlineOn = True


res@mpMaxLatF = 32
res@mpMinLatF = 20
res@mpMaxLonF = 120
res@mpMinLonF = 105

res1 = res
res1@vcGlyphStyle = "CurlyVector"
res1@vcLabelsUseVectorColor = False
res1@gsnSpreadColors = False
res1@lbLabelBarOn = False
res1@vcLineArrowThicknessF = 2.5
res1@vcMonoLineArrowColor=False
res1@vcRefMagnitudeF = 5
res1@vcRefLengthF = 0.045
res1@vcFillArrowHeadYF = 0.9
res1@vcLineArrowThicknessF = 5

res1@gsnLeftString = "uvq"
res1@gsnRightString = ""

plot1 = gsn_csm_vector(wks,uq,vq,res1)

res2 = res

res2@cnFillOn = True
res2@cnLineThicknesses = 5
res2@gsnFrame = False
res2@lbOrientation = "Vertical"
res2@cnLevelSelectionMode = "ExplicitLevels"
;res2@cnLevelSpacingF = 2
;res2@cnMaxLevelValF = 4
;res2@cnMinLevelValF = -4
res2@cnSmoothingOn = True
res2@cnLevels = (/-1,-2,-3,-4/)
res2@cnFillColors = (/"blue4","blue3","blue2","blue1","white"/)
res2@cnSmoothingDistanceF = 0.001
res2@gsnLeftString = ""
res2@gsnRightString = ""
plot2 = gsn_csm_contour_map(wks, qs, res2)     ;水汽通量散度


plres = True
plres@gsLineColor = "black"
plres@gsLineThicknessF = 3
pid = gsn_add_shapefile_polylines(wks, plot1, "E:/ncl/cygwin/data/chinamap/chinamap/China_GuoJieShengJie_Polyline.shp", plres)
dlres = True
dlres@gsLineColor = "black"
did = gsn_add_shapefile_polylines(wks, plot1, "E:/ncl/cygwin/data/chinamap/chinamap/China_DiQuJie_Polyline.shp", dlres)

overlay(plot2, plot1)

draw(plot2)
frame(wks)

end


密码修改失败请联系微信:mofangbao
发表于 2019-9-9 15:27:51 | 显示全部楼层
uv2dvf要求数据是全球的,没有缺测值,你改变u,v,q的取值范围当然出错啊,可以用uv2dv_cfd
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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