爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 14840|回复: 23

NCL画水汽通量或风矢量时的箭头问题

[复制链接]

新浪微博达人勋

发表于 2015-12-23 10:46:56 | 显示全部楼层 |阅读模式

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

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

x
NCL画水汽通量或风矢量时的箭头问题。请问在设置箭头图例时是自动生成还是需要设置,我在运用相关命令后图中还是没有箭头的图例,且想要把箭头数值改为我计算的结果,但更改mangnitudeF后没有得到官网的类似结果。
QQ截图20151223104135.jpg
uq25jul.png
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-12-23 11:06:33 | 显示全部楼层
看了下感觉没什么问题啊……你单独画一下矢量肩头看下有没有出参考箭头
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2015-12-23 13:18:48 | 显示全部楼层
lanlaniris 发表于 2015-12-23 11:06
看了下感觉没什么问题啊……你单独画一下矢量肩头看下有没有出参考箭头

单独画了也没有参考箭头,我还想是不是被bar遮住了,去掉bar也没有
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-12-23 14:07:53 | 显示全部楼层
vcres@vcLabelsOn                = True  
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-12-23 16:11:16 | 显示全部楼层
你完整的脚本贴一个上来吧
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2015-12-23 16:58:36 | 显示全部楼层
lanlaniris 发表于 2015-12-23 16:11
你完整的脚本贴一个上来吧

;dd1d2
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/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/cnmap/cnmap.ncl"

;*****************************************************************************
begin
;****************************************************************************
;  read in data
;******************************************************************************
  f1        = addfile("/home/almond/uq25febave.nc","r")
  f2        = addfile("/home/almond/vq25febave.nc","r")
  d1        = f1->qu
  d2        = f2->qv
  ;mm        = sqrt(d1^2+d2^2)                            全风场
  ;exit
;***********************************************
;  creat plot
;***********************************************
  wks = gsn_open_wks("png" ,"q25feb")
  gsn_define_colormap(wks,"BlRe")
;================================================
  res                                = True            
  res@gsnMaximize                    = True
  res@gsnDraw                        = False
  res@gsnFrame                       = False
  ;res@cnFillOn                       = True
  ;res@cnFillPalette                  ="BlWhRe"
;>--------------------------------------------<
;  set for the map
;>--------------------------------------------<
  res@mpMinLatF                      = 0.                        
  res@mpMaxLatF                      = 35.
  res@mpMinLonF                      = 80.
  res@mpMaxLonF                      = 150.
  res@cnLevelSelectionMode           ="ManualLevels"
  res@cnMinLevelValF                 =-300
  res@cnMaxLevelValF                 =300
  res@cnLevelSpacingF                =50
;>--------------------------------------------<
;  set for plot (fillcontour)
;>--------------------------------------------<

  res@lbLabelBarOn                   = True
  res@cnFillOn                       = True  
  
                                          

  res@pmTickMarkDisplayMode          = "Always"                       
  res@gsnAddCyclic                   = False

  res@cnLineLabelPlacementMode       = "Computed"
  res@cnLineLabelDensityF            = 2.0
  res@cnLabelMasking                 = True
  res@cnLineLabelBackgroundColor     = "White"
  ;;res@cnLineLabelFormat             = "@^sg"
  
  res@cnLinesOn                      = True           
  res@cnLineLabelsOn                 = True
  res@cnLineLabelInterval            = 1
  res@cnLineLabelFontHeightF         = 0.01

  plot = gsn_csm_contour_map_ce(wks,d1,res)

;>============================================================<
vcres                             = True
vcres@gsnAddCyclic                = False
vcres@gsnDraw                     = False                                          ; don't draw yet
vcres@gsnFrame                    = False                                          ; don't advance frame yet
vcres@pmTickMarkDisplayMode       = "Always"
vcres@vcLabelsOn                = True                                                   
;vcres@lbLabelBarOn                = True
vcres@vcRefMagnitudeF             = 10.0                                            ; make vectors larger
vcres@vcRefLengthF                = 0.0018                                          ; ref vec length
vcres@vcGlyphStyle                = "CurlyVector"                                   ; turn on curly vectors
vcres@vcMinDistanceF              = 0.017                                           ; thin out vectors
vcres@vcRefAnnoOn                 = False
vcres@vcMonoFillArrowFillColor    = True
vcres@vcLineArrowThicknessF       = 2.0
vcres@vcRefAnnoOn                 =False
vcres@vcVectorDrawOrder           = "PostDraw"
;vcres@tiMainString                ="vaper_flux : kg/(m*s)"
;vcres@gsnLeftString               = ti
vcres@gsnRightString              ="uwf"
plot1=gsn_csm_vector(wks,d1,d2,vcres)
;-------------------------------------------------------------<
;                      add China map
;>------------------------------------------------------------<
cnres                               = True
cnres@china                         = True        ;draw china map or not
cnres@river                         = False       ;draw changjiang&huanghe or not
cnres@province                      = True        ;draw province boundary or not
cnres@nanhai                        = False       ;draw nanhai or not
cnres@diqu                          = False       ;draw diqujie or not

chinamap                            = add_china_map(wks,plot1,cnres)
  overlay(plot,plot1)
  draw (plot)
  frame(wks)
end
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2015-12-23 16:59:04 | 显示全部楼层
海盗船长 发表于 2015-12-23 14:07
vcres@vcLabelsOn                = True

试了并没有
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-12-23 17:05:45 | 显示全部楼层
可能是vcRefAnnoOn=True才会有吧,你设置的False
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2015-12-23 18:46:05 | 显示全部楼层
lanlaniris 发表于 2015-12-23 16:11
你完整的脚本贴一个上来吧

vcRefAnnoOn=True,确实是这个问题,多谢
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2015-12-23 18:46:16 | 显示全部楼层
lanlaniris 发表于 2015-12-23 16:11
你完整的脚本贴一个上来吧

vcRefAnnoOn=True,确实是这个问题,多谢
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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