爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 5860|回复: 2

ncl画图数据缺省的设置

[复制链接]
发表于 2014-4-25 11:01:38 | 显示全部楼层 |阅读模式
GrADS
系统平台: ncl
问题截图:
问题概况: txt数据中有好多0值,设置0值缺省后,会使得附近的值也缺失
我看过提问的智慧: 看过
自己思考时长(天): 3

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

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

x
本帖最后由 chongzika 于 2014-4-25 11:04 编辑

QQ图片20140425085520.jpg 这是没有设置缺省时画出来的图,具体的脚本
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
begin
;************************************************
;               Define constants
;************************************************
data  = asciiread("grug.txt",(/96,144/),"float")
data!0 = "lat"   
data!1 = "lon"   
data&lat  = fspan(-90,90,96)
data&lon = fspan(0,357.5,144)
  wks = gsn_open_wks("ps","color")                 ; open a ps file
  gsn_define_colormap(wks,"BlWhRe")                ; choose colormap

  res                      = True                  ; plot mods desired
  res@tiMainString         = "BlWhRe Colormap"     ; title
  res@cnFillOn             = True                  ; turn on color fill
  res@gsnSpreadColors      = True                  ; use full range of colors
  res@cnLinesOn            = False
res@cnLevelSelectionMode = "ExplicitLevels"   ; set explicit contour levels
  res@cnLevels            = (/-0.56,-0.44,-0.38,0,0.38,0.44,0.56/)
  plot = gsn_csm_contour_map_ce(wks,data, res)        ; create plot
end

QQ图片20140425085520.jpg
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2014-4-25 11:06:19 | 显示全部楼层
本帖最后由 chongzika 于 2014-4-25 11:11 编辑

问一下,选错提问区域了,没有简单点的改法么?帖子怎么删掉呢,我改区了
密码修改失败请联系微信:mofangbao
发表于 2014-4-25 11:13:14 | 显示全部楼层
图和脚本没有啥问题啊?楼主的意思是?
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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