- 积分
- 1878
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2015-1-1
- 最后登录
- 1970-1-1
|

楼主 |
发表于 2017-11-11 19:57:47
|
显示全部楼层
楼主看了一下之前用cdo转换的资料,time格式也是double的,但是时次没有那么多,
但因为这次数据是逐日的,所以时次比较多,刚才重新修改了一下脚本,还是报错了:fatal:NclMalloc Failed:[errno=12]
fatal:dim_avg_n: Could not coerce input data to double, can't continue
fatal:["Execute.c":8575]:Execute: Error occurred at or near line 2352 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl
脚本是最基础最简单的脚本,就是画一个填色图而已,连overlay都没用上的,不知道到底哪出了问题,有大神愿意站出来么 {:eb303:}{:eb303:}{:eb303:}{:eb303:}
shpfn2 = "D:/ncldate/better/tibetshape/tibetan.shp"
f = addfile("D:/ncldate/best/20years/daily/wsgd0600.nc", "r")
wsgd5= short2flt(f->z(0:1747,:,:))
wsgdave5 = dim_avg_n_Wrap(wsgd5,0)
wsgdave5 = wsgdave5/9.8
wks = gsn_open_wks("png","D:/ncldate/best/daily0600")
res = True
res@gsnDraw = False ; don't draw
res@gsnFrame = False ; don't advance frame
res@gsnMaximize = True
res@pmTickMarkDisplayMode = "Always"
res@cnFillOn = True
res@cnLinesOn = False
res@cnLineLabelsOn = False
res@cnFillPalette = "BlueYellowRed" ; BlueWhiteOrangeRed BlueYellowRed
res@mpFillOn = False
res@mpMaxLatF = 40
res@mpMinLatF = 25
res@mpMaxLonF = 105
res@mpMinLonF = 70
res@gsnAddCyclic = False
res@gsnLeftString = ""
res@gsnRightString= ""
res@cnLevelSelectionMode = "ManualLevels"
res@cnMinLevelValF = -10
tres@cnMaxLevelValF = 10
res@mpFillOn = False ; turn off map fill
res@mpOutlineDrawOrder = "PostDraw"
res@mpPerimOn = True
res@mpDataSetName = "Earth..4"
res@mpDataBaseVersion = "MediumRes" ; or "Ncarg4_1"
res@mpAreaMaskingOn = True
res@mpMaskAreaSpecifiers = (/"China"/)
res@mpOutlineSpecifiers = (/"China","China:Provinces"/)
res@mpGeophysicalLineThicknessF = 1.5
plot= gsn_csm_contour_map(wks,wsgdave5,res)
plres = True
plres@gsLineColor = "black"
plres@gsLineThicknessF = 3
shp_plot = gsn_add_shapefile_polylines(wks,tplot,shpfn2,plres)
draw(tplot)
frame(wks)
|
|