爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 5023|回复: 1

[作图] 画的降水分布图,0值区怎么设置成白色啊

[复制链接]
发表于 2015-11-11 15:50:38 | 显示全部楼层 |阅读模式

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

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

x
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"

pfile=addfile("/data4/TRMM/2011/3B42.20110604.18.7.HDF","r")
prec1=pfile->precipitation
prec=prec1(:,::-1)  ;
lon=fspan(-179.875,179.875,1440)
lat=fspan(49.875,-49.875,400)
lon@units="degrees-east"
lat@units="degrees-north"
lon@long_name="lon"
lat@long_name="lat"
lon@axis= "X"
lat@axis= "Y"
prec!0="lon"
prec!1="lat"
prec&lon=lon
prec&lat=lat
prec@_FillValue  = -999
prec@missing_value= -999

res =True
res@cnLinesOn = False
res@cnLineLabelsOn = False
res@cnFillOn      = True
res@gsnAddCyclic  = False
res@mpMinLatF = -10.0
res@mpMaxLatF = 45.0
res@mpMinLonF = 60.
res@mpMaxLonF = 170.0
res@lbLabelBarOn = True
res@gsnSpreadColors      = True ;use all range color
res@cnLevelSelectionMode = "ExplicitLevels"       ; set explicit contour levels
res@cnLevels    = (/0.,1.,2.,3.,4.,5./) ; set levels
res@cnFillColors = (/0,2,4,6,9,13,15/) ; set the colors to be used
prec2=prec(lat|:,lon|:)
wks=gsn_open_wks("X11","pre")
gsn_define_colormap(wks,"BlWhRe")
plot=gsn_csm_contour_map(wks,prec2,res)
QQ截图20151111154749.png
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2015-11-11 21:28:00 | 显示全部楼层
好像把0设为缺测值就好了。。。
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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