- 积分
- 502
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-4-9
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本人是新手,用ncl画图,出错了,就是读取txt格式1324行,3列(经度,纬度,亮温),得到了一半的图咋回事,大神帮忙啊
脚本如下:
;***********************************
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
ascii_filename = "/nuist/p/work/***/ncl/yunyu.txt"
argu = asciiread(ascii_filename,(/1324,3/),"float")
obs = argu(:,2)
lat=argu(:,1)
lon=argu(:,0)
olon = fspan(120,146,256)
olat = fspan(10,30,153)
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
obs@_FillValue = 999999.000000
rscan = (/1/)
dataobs = obj_anal_ic_Wrap(lon,lat,obs,olon,olat,rscan,False)
dataobs@units="K"
wks = gsn_open_wks ("png","obs")
gsn_define_colormap( wks ,"Rainbow")
res = True
res@gsnAddCyclic = False
res@tiMainString ="obs"
res@gsnMaximize = True
;res@gsnDraw = False
;res@gsnFrame = False
;>--------------------------------------------<
; set for the map
;>--------------------------------------------<
res@mpMinLatF = 10.
res@mpMaxLatF = 30.
res@mpMinLonF = 120.
res@mpMaxLonF = 146.
res@mpFillOn = True
res@mpOutlineOn = True ; Use outlines from shapefile
res@mpDataBaseVersion = "MediumRes"
res@mpDataSetName = "Earth..4"
res@mpOutlineSpecifiers = (/"China:states","Taiwan"/)
;>--------------------------------------------<
; set for the plot
res@cnFillOn = True
res@cnLinesOn = False
;res@cnLevelSpacingF = 1.
res@gsnSpreadColors = True
res@lbLabelAutoStride = True
res@cnSmoothingOn = True
plot=gsn_csm_contour_map(wks,dataobs,res)
end
|
|