请选择 进入手机版 | 继续访问电脑版
爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 5983|回复: 2

填充错位

[复制链接]

新浪微博达人勋

发表于 2014-12-21 21:45:14 | 显示全部楼层 |阅读模式

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

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

x
我只是加了一个区域的设置,为什么WRF画出来的填充图错位这么明显!?求指教

脚本一:(不设置范围,单纯WRF所模拟的范围)
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/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
begin
        a = addfile("./wrfout_d01_2014-05-22_12:00:00","r")
        cape = wrf_user_getvar(a,"cape_2d",-1)
        cape@_FillValue = 9.96921e+36
       
       
        wks = gsn_open_wks("png","wrfda_cape")
        res = True
        res@gsnDraw = False
        res@gsnFrame = False
        res@gsnPaperOrientation = "Landscape"
        res@NoHeaderFooter = True

       
        mpres = True
        mpres@gsnFrame = False
        mpres@mpGridLineDashPattern  = 2               
        mpres@mpGeophysicalLineColor = "Black"
        mpres@mpGeophysicalLineThicknessF = 2
        mpres@mpNationalLineColor    = "Black"
        mpres@mpNationalLineThicknessF    = 2
        mpres@mpGridLineColor        = "Black"
        mpres@mpGridLineThicknessF        = 2
        mpres@mpLimbLineColor        = "Black"
        mpres@mpLimbLineThicknessF        = 2
        mpres@mpPerimLineColor       = "Black"
        mpres@mpPerimLineThicknessF       = 2
        mpres@mpUSStateLineColor          = "Black"
        mpres@mpUSStateLineThicknessF     = 2
        mpres@mpDataBaseVersion           = "MediumRes"
        mpres@mpDataSetName               = "Earth..4"
        mpres@mpOutlineSpecifiers         = (/"China:states"/)
;        mpres@mpGridAndLimbOn = False

       

;        mpres@mpLeftCornerLatF = 10
;        mpres@mpRightCornerLatF = 40
;        mpres@mpLeftCornerLonF = 95
;        mpres@mpRightCornerLonF = 125       
       
        mpres@tmXTOn = False
        mpres@tmYROn = False
       
        cnres = res
        cnres@cnFillOn = True
        cnres@cnFillMode = "RasterFill"
        cnres@cnRasterSmoothingOn = True
        cnres@cnLinesOn = False       
        cnres@cnLevelSelectionMode = "ExplicitLevels"
        cnres@cnLevels = (/100,500,1000,1500,2000,2500,3000,3500,4000,4500,5000/)

                       
        contour = wrf_contour(a,wks,cape(0,0,:,:),cnres)
        plres = True
        plot = wrf_map_overlays(a,wks,contour,plres,mpres)
end



脚本二:(同样的文件,只是规定了下区域)
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/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
begin
        a = addfile("./wrfout_d01_2014-05-22_12:00:00","r")
        cape = wrf_user_getvar(a,"cape_2d",-1)
        cape@_FillValue = 9.96921e+36
       
       
        wks = gsn_open_wks("png","wrfda_cape")
        res = True
        res@gsnDraw = False
        res@gsnFrame = False
        res@gsnPaperOrientation = "Landscape"
        res@NoHeaderFooter = True

       
        mpres = True
        mpres@gsnFrame = False
        mpres@mpGridLineDashPattern  = 2               
        mpres@mpGeophysicalLineColor = "Black"
        mpres@mpGeophysicalLineThicknessF = 2
        mpres@mpNationalLineColor    = "Black"
        mpres@mpNationalLineThicknessF    = 2
        mpres@mpGridLineColor        = "Black"
        mpres@mpGridLineThicknessF        = 2
        mpres@mpLimbLineColor        = "Black"
        mpres@mpLimbLineThicknessF        = 2
        mpres@mpPerimLineColor       = "Black"
        mpres@mpPerimLineThicknessF       = 2
        mpres@mpUSStateLineColor          = "Black"
        mpres@mpUSStateLineThicknessF     = 2
        mpres@mpDataBaseVersion           = "MediumRes"
        mpres@mpDataSetName               = "Earth..4"
        mpres@mpOutlineSpecifiers         = (/"China:states"/)
;        mpres@mpGridAndLimbOn = False

       

        mpres@mpLeftCornerLatF = 10
        mpres@mpRightCornerLatF = 40
        mpres@mpLeftCornerLonF = 95
        mpres@mpRightCornerLonF = 125       
       
        mpres@tmXTOn = False
        mpres@tmYROn = False
       
        cnres = res
        cnres@cnFillOn = True
        cnres@cnFillMode = "RasterFill"
        cnres@cnRasterSmoothingOn = True
        cnres@cnLinesOn = False       
        cnres@cnLevelSelectionMode = "ExplicitLevels"
        cnres@cnLevels = (/100,500,1000,1500,2000,2500,3000,3500,4000,4500,5000/)

                       
        contour = wrf_contour(a,wks,cape(0,0,:,:),cnres)
        plres = True
        plot = wrf_map_overlays(a,wks,contour,plres,mpres)
end

由于文件超过上传大小,特链接至此



wrfda_cape.png
wrfxiao_cape.png
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-12-22 08:12:29 | 显示全部楼层
这个问题论坛已经讨论过了,仔细看下wrf_map_overlays官方文档中description部分的LatLonOverlay或ZoomIn。
再给你个链接:
http://bbs.06climate.com/forum.p ... id=27135&page=6
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 成长值: 19710
发表于 2014-12-23 00:36:08 | 显示全部楼层
longlivehj 发表于 2014-12-22 08:12
这个问题论坛已经讨论过了,仔细看下wrf_map_overlays官方文档中description部分的LatLonOverlay或ZoomIn。 ...

吓我一跳!改头像了!
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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