请选择 进入手机版 | 继续访问电脑版
爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 8413|回复: 0

[作图] 求助,为什么画涡度场的时候写了高度场就报错

[复制链接]

新浪微博达人勋

发表于 2020-11-24 17:04:30 | 显示全部楼层 |阅读模式

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

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

x
求助,为什么画涡度场的时候写了高度场就报错,不写上500hpa就好了(标红部分),我想画500hPa涡度场的图。始终没找到问题所在呀,小白求助!!!
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"
begin
;************************************************
; variable and file handling
;************************************************
  fu  = addfile("E:/hyd/uwnd.2020.nc","r")                             ; open netcdf file
  fv = addfile("E:/hyd/vwnd.2020.nc", "r")
  u   = fu->uwnd(203:203,{500},:,:)                                          ; pull u off file
  v   = fv->vwnd(203:203,{500},:,:)                                           ; pull v off file
;************************************************
; calculate vorticity on a Gaussian Grid
; scale for visual convenience
;************************************************
  scale = 1.e05                                 
  vrt   = u                                      ; retain coordinates
  vrt   = uv2vrG_Wrap(u,v) * scale
  vrt@long_name = "vorticity"
  vrt@units     = "scaled"
;************************************************
; create plot
;************************************************
  wks  = gsn_open_wks("eps","E:/hyd/vort")              ; send graphics to PNG file

  res                   = True                   ; plot mods desired
  res@cnFillOn          = True                   ; turn on color
  res@cnFillPalette     = "BlWhRe"               ; set color map
  res@cnLinesOn         = False                  ; no contour lines

  res@mpMinLatF            = 0      ; range to zoom in on
  res@mpMaxLatF            = 60
  res@mpMinLonF            = 60
  res@mpMaxLonF            = 150

  res@cnLevelSelectionMode = "ManualLevels"       ; set manual contour levels
  res@cnMinLevelValF       = -4                   ; set min contour level
  res@cnMaxLevelValF       =  4                   ; set max contour level
  res@cnLevelSpacingF      =  0.5                 ; set contour spacing


  plot = gsn_csm_contour_map(wks,vrt(0,2,:,:),res) ; create plot  
;************************************************
end

密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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