爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 5497|回复: 2

[作图] 用ncl画wrfout降雨图没有坐标轴

[复制链接]

新浪微博达人勋

发表于 2019-5-14 10:02:22 | 显示全部楼层 |阅读模式

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

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

x
编写了ncl脚本,用来画wrfout的降雨图但是没有坐标轴,尝试了网上说的很多种方法也没有用。苦恼求解....
脚本如下:

Inter.000002.png
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2019-5-14 10:04:39 | 显示全部楼层
脚本如下:
    res = True
    res@tiMainString = "WRF-Inter"
    res@gsnAddCyclic  = False      
    res@mpDataSetName         = "Earth..4"   ; This new database contains
    ; divisions for other countries.
    res@mpDataBaseVersion     = "MediumRes"  ; Medium resolution database
    res@mpOutlineOn           = True         ; Turn on map outlines
    res@mpOutlineSpecifiers   = (/"China:states","Taiwan"/)       ;China:states

    res@mpMinLatF             =  38.7         
    res@mpMaxLatF             =  40.4
    res@mpMinLonF             =  121
    res@mpMaxLonF             =  123.5

    res@tmYLOn               = True   ; Turn off left tickmarks
    res@tmYROn               = False    ; Turn on right tickmarks
    res@tmXTOn               = False   ; Turn off top tickmarks
    res@tmXBOn               = True   ; Turn off top tickmarks
    res@tmYLLabelsOn         = True   ; Turn off left labels
    res@tmYRLabelsOn         = False    ; Turn on right labels

    res@mpGeophysicalLineThicknessF= 2.      ; double the thickness of geophysical boundaries
    res@mpNationalLineThicknessF= 2.         ; double the thickness of national boundaries

    res@mpProjection = "LambertConformal"   
    res@mpLambertMeridianF = 122.5
    res@mpLimitMode = "LatLon"
    res@mpLambertParallel1F = .001      
    res@mpLambertParallel2F = 89.999    ;Default: 89.999

    res@mpAreaMaskingOn = True
    res@mpMaskAreaSpecifiers = (/"China:states","Taiwan"/)   ;China:states
    res@mpOceanFillColor = 0   
    res@mpInlandWaterFillColor = 0  

    res@cnFillOn      = True
    res@cnLinesOn     = False        
    res@cnLineLabelsOn = False
    res@cnFillDrawOrder = "PreDraw"         ; draw contours first

    res@cnLevelSelectionMode = "ExplicitLevels"       ; set explicit contour levels
    res@cnLevels    = (/.1,5.,10.,25.,38.,50.,63.,75.,100.,125./) ; set levels
    res@cnFillColors = (/0,2,3,4,5,6,7,8,9,10,11/) ; set the colors to be used

    res@lbLabelBarOn = True      
    res@lbLabelStrings = (/".1","5","10","25","38","50","63","75","100","125"/)
    res@vpXF = 0.2
    res@vpYF = 0.8
    res@vpWidthF  = 0.6              ; height and width of plot
    res@vpHeightF = 0.6

    res@tiMainFont            = "helvetica"
    res@tiMainOffsetYF        = 0.02  ;set place for main title along Y,offset
    res@tiMainFontHeightF     = 0.02   ;set main title font size
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2019-5-14 16:35:31 | 显示全部楼层
给数据加上一个属性,属性是二维经纬度值
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

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