爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
楼主: 风之牧语

ncl画wrfout数据风场图

  [复制链接]
发表于 2015-2-16 18:29:46 | 显示全部楼层
需要下载附件,清谅解。
密码修改失败请联系微信:mofangbao
发表于 2015-2-16 18:30:35 | 显示全部楼层
需要下载附件,清谅解。
密码修改失败请联系微信:mofangbao
发表于 2015-2-16 18:30:49 | 显示全部楼层
需要下载附件,清谅解。
密码修改失败请联系微信:mofangbao
发表于 2015-2-16 18:31:12 | 显示全部楼层
需要下载附件,清谅解。
密码修改失败请联系微信:mofangbao
发表于 2015-2-16 18:31:43 | 显示全部楼层
需要下载附件,清谅解。
密码修改失败请联系微信:mofangbao
发表于 2015-3-20 18:48:59 | 显示全部楼层
看不懂呀,也想画个垂直风速分布
密码修改失败请联系微信:mofangbao
发表于 2015-3-26 08:09:02 | 显示全部楼层
本帖最后由 dcx 于 2015-3-26 08:14 编辑

图片1

图片1
楼主 图片2.png 你好,我现在遇到设置经纬度的问题,wrfout.nc画图,在没有设置经纬度时出来的图是第一个图。设置经纬度后成了这样第二个图..请教楼主这是怎么回事啊。谢谢。这是我的ncl
;   Example script to produce dbz plots for a WRF real-data run,
;   with the ARW coordinate dynamics option.


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/wrf/WRFUserARW.ncl"

begin
;


; The WRF ARW input file.  
; This needs to have a ".nc" appended, so just do it.
  a= addfile("/public/home/chun/Program/wrf3.5.1/WRFV3/test/em_real/2106/wrfout_d04_2014-07-23_06:00:00.nc","r")

lat2d = a->XLAT(0,:,:)
lon2d = a->XLONG(0,:,:)
type = "png"
wks = gsn_open_wks(type,"wrfoutdbz2210")


  colors= (/"white","black","white",\
        "cyan1","cyan2","cornflowerblue","green1","green2",\
         "green3","yellow","darkgoldenrod1","darkgoldenrod3",\
         "firebrick1","firebrick3", "firebrick4","darkorchid1"/)  
  gsn_define_colormap(wks, colors)                                    
; Set some basic resources
   times  = wrf_user_list_times(a)  ; get times in the file
  ntimes = dimsizes(times)         ; number of times in the file

  do it = 2,ntimes-59; TIME LOOP

     print("Working on time: " + times(it) )
     mdbz = wrf_user_getvar(a,"mdbz",it)
dbz = wrf_user_getvar(a,"dbz",it)
dbz@lat2d = lat2d
dbz@lon2d = lon2d
res = True
res@TimeLabel = times(it)   ; Set Valid time to use on plots


res@MainTitle                   = "WRFout reflectivity"

res@gsnDraw              = False
res@gsnFrame             = False

  pltres = True
  mpres = True

     opts = res                        
     opts@cnFillOn = True  
     opts@ContourParameters = (/ 0., 60., 5./)

  
  mpLimitMode="Corners"
  mpres@mpLeftCornerLatF  =  20.
  mpres@mpRightCornerLatF =  30.
  mpres@mpLeftCornerLonF  = 115.
  mpres@mpRightCornerLonF = 125.
mpProjection = "LambertConformal"
    mpres@tfDoNDCOverlay = True
;  mpres@mpMinLatF             =  20
  ; mpres@mpMaxLatF             =  30
   ;mpres@mpMinLonF             =  115
   ;mpres@mpMaxLonF             =  125


  mpres@mpGeophysicalLineColor = "Black"
  mpres@mpNationalLineColor    = "Black"
  ;mpres@mpUSStateLineColor     = "Black"
  mpres@mpGridLineColor        = "Black"
  mpres@mpLimbLineColor        = "Black"
  mpres@mpPerimLineColor       = "Black"
mpres@mpGeophysicalLineThicknessF = 2.0
mpres@mpNationalLineThicknessF = 1.5
mpres@mpUSStateLineThicknessF = 1.5
mpres@mpUSStateLineColor = "grey30"
mpres@mpGeophysicalLineColor = "grey30"
mpres@mpDataSetName = "Earth..4"
mpres@mpDataBaseVersion = "MediumRes"
mpres@mpOutlineOn = True
mpres@mpOutlineSpecifiers = (/"China:states","Taiwan"/)


   contour = wrf_contour(a,wks,dbz(1,:,:),opts)     ; plot only lowest level
     plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres)


   end do        ; END OF TIME LOOP

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
end
密码修改失败请联系微信:mofangbao
发表于 2015-4-12 19:10:10 | 显示全部楼层
看看看~~~~~~~~~~
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

发表于 2015-4-12 19:11:03 | 显示全部楼层
需要下载附件,清谅解。
密码修改失败请联系微信:mofangbao
发表于 2015-4-12 19:11:41 | 显示全部楼层
需要下载附件,清谅解。
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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