爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 12692|回复: 21

[作图] ncl画wrf输出风场的涡度图

[复制链接]

新浪微博达人勋

发表于 2016-8-15 17:14:49 | 显示全部楼层 |阅读模式

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

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

x
请问大家是怎么用wrfout风场数据画涡度图的,在官网上的脚本必须要求数据是经纬度一维格式的,wrf输出的数据经纬度是二维的,大神们是怎么处理的?
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2016-8-15 17:30:43 | 显示全部楼层

;   Example script to produce Vorticity plots from WRF ARW model data
;   Novemner 2008

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"

begin
;
; The WRF ARW input file.  
; This needs to have a ".nc" appended, so just do it.
  a = addfile("../wrfout_d01_2000-01-24_12:00:00.nc","r")

; We generate plots, but what kind do we prefer?; type = "x11"
; type = "pdf"
type = "ps"
; type = "ncgm"
  wks = gsn_open_wks(type,"plt_pv")

; Set some basic resources
  res = True
  res@MainTitle                   = "REAL-TIME WRF"

  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
    pvo   = wrf_user_getvar(a,"pvo",it)
    avo   = wrf_user_getvar(a,"avo",it)
    p     = wrf_user_getvar(a,"pressure",it)


  ; Interpolate to pressure
    pv_plane = wrf_user_intrp3d(pvo,p,"h",300.,0,False)
    av_plane = wrf_user_intrp3d(avo,p,"h",500.,0,False)


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

    ; MAKE PLOTS                                       
      plot = wrf_map_overlays(a,wks,(/contour_a/),pltres,mpres)
      plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres)


  end do        ; END OF TIME LOOP

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

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

新浪微博达人勋

发表于 2016-8-28 10:32:10 | 显示全部楼层
很棒,学习了
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2018-4-19 23:29:37 | 显示全部楼层
这个是绝对涡度吗?
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2019-8-11 11:30:10 | 显示全部楼层
请问相对涡度应该怎么计算呀
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2019-8-30 10:46:33 | 显示全部楼层
1649518749 发表于 2016-8-15 17:30
;   Example script to produce Vorticity plots from WRF ARW model data
;   Novemner 2008

查了这个函数,是绝对涡度哦,请问有画过相对涡度的吗?
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2019-8-30 17:00:56 | 显示全部楼层
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2019-8-30 17:03:33 | 显示全部楼层
yusw 发表于 2019-8-30 10:46
查了这个函数,是绝对涡度哦,请问有画过相对涡度的吗?

http://www.ncl.ucar.edu/Document ... -in/uv2vr_cfd.shtml
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2019-8-30 17:05:23 | 显示全部楼层
1649518749 发表于 2019-8-30 17:00
http://www.ncl.ucar.edu/Document/Functions/Built-in/uv2vr_cfd.shtml

好的 感谢!
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2019-8-31 18:27:08 | 显示全部楼层
1649518749 发表于 2019-8-30 17:03
http://www.ncl.ucar.edu/Document/Functions/Built-in/uv2vr_cfd.shtml

这个函数要求计算的uv风场,是等经纬格点的数据,wrfout输出的为等网格距的数据,直接用这个函数算不了
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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