- 积分
- 5997
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2017-3-7
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
- begin
- diri="/media/wjj/data/FLEXPART/"
- files = systemfunc ("ls " + diri + "*.txt")
- ntime=dimsizes(files)
- loctn=new((/ntime,39,2/),float,-999)
- do i=0, ntime-1
- print(" "+files(i))
- ;data= asciiread(files(i),(/39,13/),"float")
- nrow=numAsciiRow(files(i));读取行
- ncol=numAsciiRow(files(i))
- lines=asciiread(files(i),(/nrow,ncol/),"float")
- loctn(i,0:nrow-1,0)=lines(0:nrow-1,2);经度
- loctn(i,0:nrow-1,1)=lines(0:nrow-1,3);纬度
- delete(lines)
- end do
- do i=0, ntime-1
- wks = gsn_open_wks("png","traj") ; send graphics to PNG file
-
-
- res = True ; plot mods desired
- res@gsnFrame = False ; don't advance yet
- res@gsnMaximize = True
- res@gsnDraw = False ; so we can add poly stuff
- res@mpDataBaseVersion = "MediumRes" ;
- res@mpPerimOn = False ;-- don't draw the box around the plot
- res@gsnPolar="SH"
- res@mpCenterLonF = 0 ;-- center at lon=10
- res@mpMaxLatF = -30
- res@mpGridLineColor = "grey30" ;-- set grid line color
- res@tiMainString = "" ;
- res@gsnCenterString = "" ; center string
- res@mpFillOn = False ;
- res@mpOutlineOn = True ; turn on continental outline
- map = gsn_csm_map(wks,res) ; gsn_csm_map_ce
- pres = True ; polyline resources
- pres@gsLineThicknessF = 2.0 ; line thickness
-
- pres@gsLineColor = "red"
- gsn_polyline(wks,map,loctn(i,:,0),loctn(i,:,1),pres) ; draw the traj
- draw(map)
- frame(wks)
- end do
-
- end
复制代码
代码写成这样,还是报错,求指教!
warning:asciiread: End of file reached and only (507) elements were read from the file, filling remaining elements with the default missing value for the requested type
|
|