爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 8006|回复: 7

[作图] WRF模拟数据结果,画图添加底图出错,求助!

[复制链接]
发表于 2014-3-30 11:09:51 | 显示全部楼层 |阅读模式

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

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

x
warning:mpDataBaseVersion is not a valid resource in plt_Cloud_contour at this time
warning:mpDataSetName is not a valid resource in plt_Cloud_contour at this time
warning:mpOutlineOn is not a valid resource in plt_Cloud_contour at this time
我用的是NCL6.0,更新到最新版可以解决这个问题吗?

密码修改失败请联系微信:mofangbao
发表于 2014-3-30 14:28:21 | 显示全部楼层
只是warning,告诉你一些source当前不起作用,不是版本问题!
最好能把程序贴出来。
密码修改失败请联系微信:mofangbao
发表于 2014-3-30 20:25:03 | 显示全部楼层
第一个时次的数据不要用
密码修改失败请联系微信:mofangbao
发表于 2014-3-30 20:42:44 | 显示全部楼层
这几个参数对绘图函数不起作用 你可以看看wrf官网上提供的例子http://www.mmm.ucar.edu/wrf/OnLi ... CL/NCL_examples.htm
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2014-3-30 23:01:54 | 显示全部楼层
longlivehj 发表于 2014-3-30 14:28
只是warning,告诉你一些source当前不起作用,不是版本问题!
最好能把程序贴出来。

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("wrfout_d03_2012-01-13_12:00:00.nc","r")            

; We generate plots, but what kind do we prefer?
  type = "png"
; type = "pdf"
; type = "ps"
; type = "ncgm"
  wks = gsn_open_wks(type,"plt_Cloud")
  gsn_define_colormap(wks,"WhViBlGrYeOrRe")   ; overwrite the .hluresfile color map
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

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

  pltres = True ; Plot resources
  mpres  = True  ; Map resources
  mpres@mpGeophysicalLineColor = "Black"
  mpres@mpNationalLineColor    = "Black"
  mpres@mpUSStateLineColor     = "Black"
  mpres@mpGridLineColor        = "Black"
  mpres@mpLimbLineColor        = "Black"
  mpres@mpPerimLineColor       = "Black"

      

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; First get the variables we will need        

    if(isfilevar(a,"QCLOUD"))
      qc = wrf_user_getvar(a,"QCLOUD",8)
      qc = qc*1000.
      qc@units = "g/kg"   
    end if
   

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

    do level = 0,28,1      ; LOOP OVER LEVELS

      display_level = level + 1
      opts = res


      opts@cnFillOn         = True
      opts@cnLinesOn        = True
      opts@cnLineLabelsOn   = True
      ;opts@gsnAddCyclic  = False
      opts@mpDataSetName         = "Earth..4"
      opts@mpDataBaseVersion     = "HighRes"
      opts@mpOutlineOn           = True
      opts@mpOutlineBoundarySets = "AllBoundaries"

      opts@cnLineLabelFontColor = "red"
      opts@cnLineLabelFontHeightF = 0.012
      opts@cnLineLabelBackgroundColor = "white"
      opts@PlotLevelID      = "Eta Level  " + display_level

   

      if (isvar("qc"))
        contour = wrf_contour(a,wks,qc(level,:,:),opts)
        ;opts@ContourParameters = (/ 0.02, 0.4, 0.02/)
        plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres)
        delete(contour)
      end if

     

      delete(opts)

    end do      ; END OF LEVEL LOOP

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

end
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2014-3-30 23:02:57 | 显示全部楼层
longlivehj 发表于 2014-3-30 14:28
只是warning,告诉你一些source当前不起作用,不是版本问题!
最好能把程序贴出来。

程序已经贴出来了,求指导!
密码修改失败请联系微信:mofangbao
发表于 2014-3-31 08:50:57 | 显示全部楼层
本帖最后由 longlivehj 于 2014-3-31 08:52 编辑
zq200866 发表于 2014-3-30 23:02
程序已经贴出来了,求指导!

      opts@mpDataSetName         = "Earth..4"
      opts@mpDataBaseVersion     = "HighRes"
      opts@mpOutlineOn           = True
      opts@mpOutlineBoundarySets = "AllBoundaries"

把这四行的中的opts全部改成mpres就可以了。
另外,看到你的mpDataBaseVesion设置的HighRes,这个地图库需要单独下载。如果还没有下载,会出现一些警告,并且地图出不来。这时要么设置成中、低分辨率,要么下载相应地图。具体信息可以看看ncl官网关于mpDataBaseVersion的帮助。
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2014-3-31 19:31:56 | 显示全部楼层
longlivehj 发表于 2014-3-31 08:50
opts@mpDataSetName         = "Earth..4"
      opts@mpDataBaseVersion     = "HighRes"
      ...

我试试,谢谢回复!
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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