爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 6323|回复: 3

[作图] 求助!!用gsn_csm_vector_map画WRF风场

[复制链接]
发表于 2016-11-16 10:25:55 | 显示全部楼层 |阅读模式

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

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

x
求教各位大侠!不用wrf_vector, 使用gsn_csm_vector_map画WRF的10米风场,风向杆画不出来,这是咋回事啊?

脚本如下:

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
begin
  a = addfile("./wrfout_d01_2011-07-22_10:15:00.nc","r")
  figname = "wrf_spatial_uv10_barb_urban_1815LST_4"
  type = "pdf"
  u10Urban = a->U10(0,:,:)
  v10Urban = a->V10(0,:,:)
  hgt = a->HGT(0,:,:)
  u10Urban@lat2d = a->XLAT(0,:,:)
  u10Urban@lon2d = a->XLONG(0,:,:)
  u10Urban@units = "m/s"
  u10Urban@description = "10m U"
  copy_VarMeta(u10Urban,v10Urban)
  v10Urban@description = "10m V"
  copy_VarMeta(v10Urban,hgt)
  hgt@units = "m"
  hgt@description = "topography"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  wks = gsn_open_wks(type,figname)
; Set some basic resources
  res = True
  res@mpLimitMode = "LatLon"
  res@mpMinLatF = 39.6
  res@mpMaxLatF = 40.21
  res@mpMinLonF = 116.0
  res@mpMaxLonF = 116.8
;    res@tmXTOn = True
;    res@tmYROn = True
;    res@tmXTLabelsOn = True
;    res@tmYRLabelsOn = True
  res@gsnAddCyclic            = False   ; regional data
  res = res
  res@vcGlyphStyle = "WindBarb"         ; choose wind barbs
  res@vcMonoWindBarbColor = True       ; color barbs by scalar
  res@vcWindBarbScaleFactorF=10
; res@vcMinDistanceF = 0.025            ; thin out windbarbs
  res@vcWindBarbTickLengthF = 0.4       ; length of the barb tick
  res@vcWindBarbTickSpacingF = 0.2      ; distance between ticks
  res@vcRefMagnitudeF         = 3.                ; make vectors larger
  res@vcRefAnnoOn = False               ; turn off ref wind barb
  plot = gsn_csm_vector_map(wks,u10Urban,v10Urban,res)
  draw(plot)
  frame(wks)
end

)PA29[Z%G`$4NP}WFE)`M3X.png
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2016-11-16 10:32:33 | 显示全部楼层
数据print出来没有问题,用wrf_vector可以正确出图,为什么gsn_csm_vector_map不行呢?
密码修改失败请联系微信:mofangbao
发表于 2016-11-17 14:38:36 | 显示全部楼层
gsn_csm_vector
密码修改失败请联系微信:mofangbao
发表于 2016-11-17 14:44:54 | 显示全部楼层
res@gsnDraw               = False
res@gsnFrame             = False
你把这两句加上去试试看。
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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