- 积分
- 1819
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-8-24
- 最后登录
- 1970-1-1
|
GrADS
系统平台: |
ubuntu |
问题截图: |
- |
问题概况: |
出错 |
我看过提问的智慧: |
看过 |
自己思考时长(天): |
1 |
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 lovechang1314 于 2014-7-1 21:37 编辑
http://blog.sina.com.cn/s/blog_44f7c0840100on44.html
根据这个教程自己随便找了一天的温度数据14062317.000
制作出来如图
三个问题:
1.贝加尔湖?还有另外一个湖的颜色被填充
2.没有出现博客中的图例
3.在ubuntu中运行时出现如下警告----
脚本如下:
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"
begin
;****************************************
;read the data array
lines=asciiread("/usr/local/ncl/14062317.000",-1,"string")
station=stringtofloat(str_get_field(lines(5::),1," "))
lon=stringtofloat(str_get_field(lines(5::),2," "))
lat=stringtofloat(str_get_field(lines(5::),3," "))
height=stringtofloat(str_get_field(lines(5::),4," "))
R=stringtofloat(str_get_field(lines(5::),5," "))
;read end
;****************************
;
olon = new(66,"float");
olat = new(40,"float");
data1 =new((/40,66/),"float")
do i=0,65
olon(i)=72+i
end do
do l=0,39
olat(l)=17+l
end do
olon!0="lon"
olon@long_name="lon"
olon@units="degrees-east"
olon&lon=olon
olat!0="lat"
olat@long_name="lat"
olat@units="degrees_north"
olat&lat=olat
R@FillValue=999999.000000
rscan=(/10,5,3/)
data1=obj_anal_ic_deprecated(lon,lat,R,olon,olat,rscan,False)
;*************************creanm end
cmap =(/ \
(/ 255./255, 255./255, 255./255/), \ ; 0 - White background.
(/ 0./255 , 0./255 ,0./255 /), \ ; 1 - Black foreground.
(/ 255./255, 0./255 ,0./255 /), \ ; 2 - Red.
(/ 0./255 , 0./255 , 255./255/), \ ; 3 - Blue.
(/ 164./255, 244./255, 131./255/), \ ; 4 - Ocean Blue.
(/ 0./255 , 0./255 ,255./255 /), \ ; 5 - Bar 1
(/ 0./255 , 153./255, 255./255/), \ ; 6 - Bar 2
(/ 0./255, 153./255, 153./255/), \ ; 7 - Bar 3
(/ 0./255 , 255./255, 0./255 /), \ ; 8 - Bar4
(/ 255./255, 255./255 , 102./255/), \ ; 9 - Bar 5
(/ 255./255, 153./255 ,102./255 /), \ ; 10 - Bar 6
(/ 255./255, 0./255 ,255./255 /) \ ; 11 - Bar7
/)
wks_type="png"
wks=gsn_open_wks(wks_type,"/usr/local/ncl/")
gsn_define_colormap(wks,cmap)
res = Ture
res@gsnAddCyclic=False
res@mpDateSetName="Earth..4"
res@mpDataBaseVersion="MediumRes"
res@mpOutlineOn=True
res@mpOutlineSpecifiers=(/"China:states","Taiwan"/)
res@mpMinLatF=17
res@mpMaxLatF=55
res@mpMinLonF=72
res@mpMaxLonF=136
res@mpProjection="LambertConformal"
res@mpLambertMeridianF=110.0
res@mpLimitMode="LatLon"
res@mpLambertParallel1F=.001
res@mpLambertParallel2F=89.999
res@mpAreaMaskingOn=True
res@mpMaskAreaSpecifiers=(/"China:states","Taiwan"/)
res@mpOceanFillColor=0
res@cnFillOn=True
res@cnLinesOn=False
res@cnLineLabelsOn=False
res@cnFillDrawOrder="PreDraw"
res@cnLevelSelectionMode="ExplicitLevels"
res@cnLevels=(/-30.,-20.,-10.,0.,10.,20./)
res@cnFillColors=(/5,6,7,8,9,10,11/)
res@lbLabelBarOn=True
res@lbLabelStrings=(/"-30:S:o:N","-20:S:o:N","-10:S:o:N","0:S:o:N","10:S:o:N","20:S:o:N"/)
res@lbOrientation="vertical"
res@vpXF=0
res@vpYF=0.95
res@vpWidthF=1.0
res@vpHeightF=0.8
res@tiMainFont="helvetica"
res@tiMainOffsetYF=0.02
res@tiMainString="open T"
map=gsn_csm_contour_map(wks,data1,res)
end
|
|