- 积分
- 315
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-6-7
- 最后登录
- 1970-1-1
|
发表于 2017-9-11 21:01:50
|
显示全部楼层
我想只画海洋部分
f1=addfile("e:/data/slp.mon.mean.nc","r")
slp=f1->slp(0:827,8:28,40:100)
a = addfile("E:\cygwin\app\ncl\lib\ncarg\data\cdf\landsea.nc","r")
lsdata = a->LSMASK
lsm = landsea_mask(lsdata,slp&lat,slp&lon)
slp = mask(slp,conform(slp,lsm,(/1,2/)).ge.0,False)
printVarSummary(slp)
wks = gsn_open_wks("eps","mask") ; send graphics to PNG file
gsn_define_colormap(wks,"wh-bl-gr-ye-re")
res2 = True
res2@gsnAddCyclic = False
res2@mpFillOn = False ; do not color-fill the map
res2@gsnTickMarksOn = False ; turn off all tick marks
res2@mpPerimOn = True ; turn the map perimeter on
res2@mpPerimDrawOrder = "PostDraw" ; draw the map perimeter last
res2@gsnDraw = False ; do not draw the plot
res2@gsnFrame = False ; do not advance the frame
res2@cnLinesOn = False ; turn off the contour lines
res2@cnLineLabelsOn = False ; turn off the contour line labels
res2@cnFillOn = True ; turn on color fill
res2@cnLinesOn = False ; turn the contour lines off
res2@gsnCenterString = "TS Field (ocean-masked)"
res2@gsnLeftString = ""
plot = gsn_csm_contour_map_ce(wks,slp(0,:,:),res2)
draw(plot)
我是根据之前landsea_mask函数里的例子处理的数据,但是出现了
warning:ContourPlotInitialize: no valid values in scalar field; ContourPlot not possible:[errno=1101]
但是想问一下,究竟是哪里不对,哪位大神能指点一下,或者帮忙给我几个可以参考的例子
|
|