爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 6877|回复: 4

[作图] NCL出图有一张多余空白页

[复制链接]
发表于 2015-10-26 21:46:29 | 显示全部楼层 |阅读模式

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

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

x
用NCL画FNL环流形势,并用overlay将风场叠加,但是Fram(wks)没起作用,还是什么其它原因,导致出图时,前面总是多出一张空白图,不知道是什么原因呢,还请各位在神指导!脚本如下:

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
begin
  fi  = addfile("./fnl_20140928_00_00.grib2","r")
  hgt=fi->HGT_P0_L100_GLL0(13,:,:)
  u  =fi->UGRD_P0_L100_GLL0 (13,:,:)
  v  =fi->VGRD_P0_L100_GLL0 (13,:,:)
  printMinMax (hgt, True)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  wks_type="pdf"
  wks_name="500hpa"
  wks = gsn_open_wks(wks_type,wks_name)
  gsn_define_colormap(wks,"gui_default")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  res = True
  res@gsnDraw = False
  res@gsnFrame= False
  
  res@mpMinLatF = 3
  res@mpMaxLatF = 80
  res@mpMinLonF = 43
  res@mpMaxLonF = 165
  res@mpFillOn               = False   
  res@mpGeophysicalLineColor = "Black"
  res@mpNationalLineColor    = "Black"
  res@mpUSStateLineColor     = "Black"
  res@mpGridLineColor        = "Black"
  res@mpLimbLineColor        = "Black"
  res@mpPerimLineColor       = "Black"
  res@mpOutlineBoundarySets  ="National"
  res@mpDataBaseVersion="MediumRes"   
  res@mpDataSetName="Earth..4"         
  res@mpOutlineSpecifiers = "China:states"  
  res@cnFillOn = False   
  res@cnLinesOn = True
  res@cnLineLabelsOn = True  
  res@cnInfoLabelOn = False ; set false will not set an information label
  res@cnLevelSelectionMode = "ManualLevels"
  res@cnMinLevelValF = 4700
  res@cnMaxLevelValF = 6000
  res@cnLevelSpacingF = 20
  res@gsnSpreadColors = True ; 6.1.0
  res@lbBoxLinesOn = False ; Label bar
  res@lbLabelAutoStride     = True            
  base = gsn_csm_contour_map(wks, hgt, res)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
resvc=True
  resvc@gsnDraw = False

  resvc@vcRefMagnitudeF = 30.0
  resvc@vcRefLengthF    = 0.045
  resvc@vcMinDistanceF  = 0.019
  resvc@vcGlyphStyle    ="CurlyVector"
  resvc@gsnLeftString   =""
  resvc@gsnRightString  =""
  plot=gsn_csm_vector(wks,u,v,resvc)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   overlay(base,plot)  
   draw(base)
   frame(wks)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
end   

密码修改失败请联系微信:mofangbao
发表于 2015-10-27 08:02:55 | 显示全部楼层
resvc@gsnFrame= False
密码修改失败请联系微信:mofangbao
回复 支持 1 反对 0

使用道具 举报

发表于 2015-10-27 08:05:08 | 显示全部楼层
frame(wks)删掉试试~
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2015-10-27 11:17:33 | 显示全部楼层

楼上正解,厉害,赞!{:eb508:}{:eb508:}
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2015-10-27 11:18:50 | 显示全部楼层
deeli 发表于 2015-10-27 08:05
frame(wks)删掉试试~

试过了,如楼上所说,设置resvc@gsnFrame= False可以解决空白页,谢谢哈
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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