爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 2281|回复: 1

如何处理WEFout1000hpa的飞,压,温,湿

[复制链接]
发表于 2014-6-29 18:39:58 | 显示全部楼层 |阅读模式
NCL
系统平台:
问题截图:
问题概况: 我从官网下载了脚本,官网是850., 700., 500., 300., 100.我想叠加1000hpa,不知道如何实现,我对官网脚本修改如下,j见最下面红色字体。但出来图是这样的,寻大神解答。
我看过提问的智慧: 看过
自己思考时长(天): 2

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

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

x
本帖最后由 guarenyouji 于 2014-6-29 18:53 编辑
  1. ;   Example script to produce plots for a WRF real-data run,
  2. ;   with the ARW coordinate dynamics option.
  3. ;   Interpolating to specified pressure levels

  4. load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
  5. load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
  6. ;load "./WRFUserARW.ncl"

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


  12. ; We generate plots, but what kind do we prefer?
  13.   type = "x11"
  14. ; type = "pdf"
  15. ; type = "ps"
  16. ; type = "ncgm"
  17.   wks = gsn_open_wks(type,"plt_PressureLevel2")


  18. ; Set some basic resources
  19.   res = True
  20.   res@MainTitle = "REAL-TIME WRF"
  21.   res@Footer = False

  22.   pltres = True
  23.   mpres = True
  24.   mpres@mpGeophysicalLineColor      = "Black"
  25.   mpres@mpNationalLineColor         = "Black"
  26.   mpres@mpUSStateLineColor          = "Black"
  27.   mpres@mpGridLineColor             = "Black"
  28.   mpres@mpLimbLineColor             = "Black"
  29.   mpres@mpPerimLineColor            = "Black"
  30.   mpres@mpGeophysicalLineThicknessF = 2.0
  31.   mpres@mpGridLineThicknessF        = 2.0
  32.   mpres@mpLimbLineThicknessF        = 2.0
  33.   mpres@mpNationalLineThicknessF    = 2.0
  34.   mpres@mpUSStateLineThicknessF     = 2.0


  35. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  36. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

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

  40. ; The specific pressure levels that we want the data interpolated to.
  41.   pressure_levels = (/ 1000., 850., 700., 500., 300., 100./)   ; pressure levels to plot
  42.   nlevels         = dimsizes(pressure_levels)           ; number of pressure levels

  43. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

  44.   do it = 0,ntimes-1               ; TIME LOOP

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

  47. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  48. ; First get the variables we will need        

  49.     tc = wrf_user_getvar(a,"tc",it)        ; T in C
  50.     u  = wrf_user_getvar(a,"ua",it)        ; u averaged to mass points
  51.     v  = wrf_user_getvar(a,"va",it)        ; v averaged to mass points
  52.     p  = wrf_user_getvar(a, "pressure",it) ; pressure is our vertical coordinate
  53.     z  = wrf_user_getvar(a, "z",it)        ; grid point height
  54.     rh = wrf_user_getvar(a,"rh",it)        ; relative humidity

  55. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

  56.     do level = 0,nlevels-1                 ; LOOP OVER LEVELS

  57.       pressure = pressure_levels(level)

  58.       tc_plane = wrf_user_intrp3d(tc,p,"h",pressure,0.,False)
  59.       z_plane  = wrf_user_intrp3d( z,p,"h",pressure,0.,False)
  60.       rh_plane = wrf_user_intrp3d(rh,p,"h",pressure,0.,False)
  61.       u_plane  = wrf_user_intrp3d( u,p,"h",pressure,0.,False)
  62.       v_plane  = wrf_user_intrp3d( v,p,"h",pressure,0.,False)

  63.       u_plane = u_plane*1.94386     ; kts
  64.       v_plane = v_plane*1.94386     ; kts
  65.       u_plane@units = "kts"
  66.       v_plane@units = "kts"


  67.       ; Plotting options for T               
  68.         opts = res                          
  69.         opts@cnLineColor = "Red"
  70.         opts@ContourParameters = (/ 5.0 /)
  71.         opts@cnInfoLabelOrthogonalPosF = 0.07  ; offset second label information
  72.         opts@gsnContourLineThicknessesScale = 2.0
  73.         contour_tc = wrf_contour(a,wks,tc_plane,opts)
  74.         delete(opts)


  75.       ; Plotting options for RH               
  76.         opts = res                          
  77.         opts@cnFillOn = True  
  78.         opts@ContourParameters = (/ 10., 90., 10./)
  79.         opts@cnFillColors = (/"White","White","White", \
  80.                               "White","Chartreuse","Green",\
  81.                               "Green3","Green4", \
  82.                               "ForestGreen","PaleGreen4"/)
  83.         contour_rh = wrf_contour(a,wks,rh_plane,opts)
  84.         delete(opts)


  85.       ; Plotting options for Wind Vectors                 
  86.         opts = res         
  87.         opts@FieldTitle = "Wind"   ; overwite Field Title
  88.         opts@NumVectors = 12       ; density for wind barbs
  89.         vector = wrf_vector(a,wks,u_plane,v_plane,opts)
  90.         delete(opts)


  91.       ; Plotting options for Geopotential Heigh
  92.         opts_z = res                          
  93.         opts_z@cnLineColor = "Blue"
  94.         opts_z@gsnContourLineThicknessesScale = 3.0



  95.       ; MAKE PLOTS                                       
  96.        if ( pressure .eq. 1000 ) then    ; plot temp, rh, height, wind barbs
  97.           opts_z@ContourParameters = (/ 20.0 /)
  98.           contour_height = wrf_contour(a,wks, z_plane,opts_z)
  99.           plot = wrf_map_overlays(a,wks,(/contour_rh,contour_tc,contour_height, \
  100.                                     vector/),pltres,mpres)
  101.         end if
  102.         if ( pressure .eq. 850 ) then    ; plot temp, rh, height, wind barbs
  103.           opts_z@ContourParameters = (/ 20.0 /)
  104.           contour_height = wrf_contour(a,wks, z_plane,opts_z)
  105.           plot = wrf_map_overlays(a,wks,(/contour_rh,contour_tc,contour_height, \
  106.                                     vector/),pltres,mpres)
  107.         end if

  108.         if ( pressure .eq. 700 ) then    ; plot temp, height, wind barbs
  109.           opts_z@ContourParameters = (/ 30.0 /)
  110.           contour_height = wrf_contour(a,wks, z_plane,opts_z)
  111.           plot = wrf_map_overlays(a,wks,(/contour_tc,contour_height, \
  112.                                     vector/),pltres,mpres)
  113.         end if

  114.         if ( pressure .eq. 500 ) then    ; plot temp, height, wind barbs
  115.           opts_z@ContourParameters = (/ 60.0 /)
  116.           contour_height = wrf_contour(a,wks, z_plane,opts_z)
  117.           plot = wrf_map_overlays(a,wks,(/contour_tc,contour_height, \
  118.                                     vector/),pltres,mpres)
  119.         end if

  120.         if ( pressure .eq. 300 ) then    ; plot temp, height, wind barbs
  121.           opts_z@ContourParameters = (/ 60.0 /)
  122.           contour_height = wrf_contour(a,wks, z_plane,opts_z)
  123.           plot = wrf_map_overlays(a,wks,(/contour_tc,contour_height, \
  124.                                     vector/),pltres,mpres)
  125.         end if

  126.         if ( pressure .eq. 100 ) then    ; plot temp, height, wind barbs
  127.           opts_z@ContourParameters = (/ 15840.,16380.,60.0 /)
  128.           contour_height = wrf_contour(a,wks, z_plane,opts_z)
  129.           plot = wrf_map_overlays(a,wks,(/contour_tc,contour_height, \
  130.                                     vector/),pltres,mpres)
  131.         end if
  132.         delete(opts_z)

  133.     end do      ; END OF LEVEL LOOP

  134. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

  135.   end do        ; END OF TIME LOOP

  136. end
复制代码


JDAJJ9NJ(@J5]SQOUTHK%7R.jpg
_UUB(90)A%XFHUT~C}3ICX0.jpg
密码修改失败请联系微信:mofangbao
发表于 2014-6-29 21:10:47 | 显示全部楼层
应该是1000hpa没有数据 地表气压已经低于1000hpa了。你可以画画925试试。我有时候925hpa也出现空白区。
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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