爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
楼主: 极地冷高压

[作图] NCL绘图怎么去掉左上角和右上角的标记

[复制链接]

新浪微博达人勋

 楼主| 发表于 2016-1-2 19:42:44 | 显示全部楼层
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("/cygdrive/d/fnl/fnl_20151209_00_00.grib2","r")
  

  d1        = f1->UGRD_P0_L100_GLL0(:,:,:)
  d2        = f1->VGRD_P0_L100_GLL0(:,:,:)
  d3        = f1->RH_P0_L100_GLL0(:,:,:)
  d4        = f1->ABSV_P0_L100_GLL0(:,:,:)
  lat       = f1->lat_0(:)
  lon       = f1->lon_0(:)
  vor=uv2vr_cfd(d1(12,:,:),d2(12,:,:),lat,lon,2)
; mm        = sqrt(d1^2+d2^2)                            全风场
  ;exit
;***********************************************
;  creat plot
;***********************************************
  wks = gsn_open_wks("pdf" ,"STORM")
  gsn_define_colormap(wks,"BlWhRe")
;================================================
  res                                = True            
  res@gsnMaximize                    = True
  res@gsnDraw                        = False
  res@gsnFrame                       = False
  ;res@cnFillOn                       = True
  ;res@cnFillPalette                  ="BlWhRe"
;>--------------------------------------------<
;  set for the map
;>--------------------------------------------<
  res@mpMinLatF                      = 10.                        
  res@mpMaxLatF                      = 40.
  res@mpMinLonF                      = 80.
  res@mpMaxLonF                      = 130.
; res@cnLevelSelectionMode           ="ManualLevels"
; res@cnMinLevelValF                 =-5
; res@cnMaxLevelValF                 = 5
;  res@cnLevelSpacingF                =50
;>--------------------------------------------<
;  set for plot (fillcontour)
;>--------------------------------------------<

  res@lbLabelBarOn                   = True
  res@cnFillOn                       = True  
  
  res@gsnLeftString                  = " "
  res@gsnRightString                 = " "                                      

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

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

  plot = gsn_csm_contour_map_ce(wks,vor,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@gsnFrame                = False            ; so we can draw time stamp
  vcres@vcRefAnnoOrthogonalPosF = 0.0             ; move ref vector up
  vcres@vcRefMagnitudeF         = 10.0             ; define vector ref mag
  vcres@vcRefLengthF            = 0.045            ; define length of vec ref
  vcres@vcGlyphStyle            = "CurlyVector"    ; turn on curly vectors
  vcres@vcMinDistanceF          = 0.017
  vcres@vcRefAnnoOn             = True                                             ; turn on the vector arrow
  vcres@vcVectorDrawOrder           = "PostDraw"
  
   res@gsnLeftString                  = ""
  res@gsnRightString                 = ""     
  
  plot1=gsn_csm_vector(wks,d1(13,:,:),d2(13,:,:),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
res@gsnLeftString                  = ""
  res@gsnRightString                 = ""  
;chinamap                            = add_china_map(wks,plot1,cnres)
  overlay(plot,plot1)
  draw (plot)
;  frame(wks)
end
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2016-1-2 19:57:14 | 显示全部楼层
res@gsnLeftString                  = ""
  res@gsnRightString                 = ""     
  
  plot1=gsn_csm_vector(wks,d1(13,:,:),d2(13,:,:),vcres)
绘图接口的设置是vcres, 对应
vcres@gsnLeftString                  = ""
  vcres@gsnRightString                 = ""     

看来你需要一点基本功啊
  

密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2016-1-2 20:07:00 | 显示全部楼层
先驱vx 发表于 2016-1-2 19:34
对应Res,  调整属性

已经解决啦非常感谢啊
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2016-1-2 20:38:03 | 显示全部楼层
先驱vx 发表于 2016-1-2 19:57
res@gsnLeftString                  = ""
  res@gsnRightString                 = ""     
  

是的是的,以前用的是GRADS,现在上班了想写篇好点的论文,刚开始学习NCL,非常感谢啊
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2016-1-3 09:10:29 | 显示全部楼层
互帮互助,学习学习
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2016-8-22 20:05:57 | 显示全部楼层
I don't think gsnLeftString comes into play with the wrf_xxx
functions.
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2017-6-27 11:21:56 | 显示全部楼层
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

新浪微博达人勋

发表于 2017-6-27 12:02:02 | 显示全部楼层
hhhhhhhhhhhhhhhhhhhhhhhh
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2017-6-27 12:02:14 | 显示全部楼层
hhhhhhhhhhhhhhhhhhhhhhh
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2017-6-27 12:02:21 | 显示全部楼层
hhhhhhhhhhhhhhhhhhhhhhhhhhhhh
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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