爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 14750|回复: 3

[作图] NCL利用wrfout文件插值做500hap相对涡度,求助!!!!!!!!!!

[复制链接]
发表于 2021-4-3 10:51:54 | 显示全部楼层 |阅读模式

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

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

x
NCL利用wrfout文件插值做500hap相对涡度,求助!!!!!!!!!!


代码如下:
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"

begin

  a = addfile("wrfout_d02_2017-08-11_120000.nc","r")

  wks = gsn_open_wks("png","2017-08-11_120000")

; Set some basic resources
  res = True
  res@MainTitle                   = "relative vorticity"

  pltres = True
  mpres = True


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; What times and how many time steps are in the data set?
  ;times  = wrf_user_getvar(a,"times",-1) ; get times in the file
  ;ntimes = dimsizes(times)         ; number of times in the file

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; do it = 0,ntimes-1,2             ; TIME LOOP

;print("Working on time: " + times(it) )
;  res@TimeLabel = times(it)   ; Set Valid time to use on plots


  ; Get the data
u   = wrf_user_getvar(a,"ua",0)
v   = wrf_user_getvar(a,"va",0)

p=wrf_user_getvar(a,"pressure",0)

lat=a->XLAT(0,:,0)
lon=a->XLONG(0,0,:)

  ; Interpolate to pressure

u_plane = wrf_user_intrp3d(u,p,"h",500,0.,False)
v_plane = wrf_user_intrp3d(v,p,"h",500,0.,False)
vr = uv2vr_cfd (u_plane,v_plane,lat,lon, 2)


    ; Plotting options
      opts = res                        
      opts@cnFillOn = True  
      opts@gsnSpreadColorEnd = -3  ; End third from the last color in color map
      opts@ContourParameters = (/ 0., 5., 1./)
      contour = wrf_contour(a,wks,vr,opts)
      delete(opts)

    ; MAKE PLOTS                                       

      plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres)


  ;end do        ; END OF TIME LOOP

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

end


好像没有经过插值一样

好像没有经过插值一样
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2021-4-3 12:48:43 | 显示全部楼层
{:eb302:}{:eb302:}{:eb302:}{:eb302:}{:eb302:}{:eb302:}
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

发表于 2021-5-24 12:35:58 | 显示全部楼层
ding ding ding
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

发表于 2021-7-10 20:03:26 | 显示全部楼层
这个单位是什么啊
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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