a error message when using "month_to_annual_weighted" ?

From: LEO_ARIES <Leo_Aries_at_nyahnyahspammersnyahnyah>
Date: Mon, 15 Jan 2007 21:41:14 +0800

Hi, all
   
  I am using "month_to_annual_weighted" in the new version of NCL to calculate ann value from a monthly series.
I met a problem and the error message was listed below :
 
"fatal:_NclBuildArray: can not combine character or string types with numeric types, can't continue
fatal:Execute: Error occurred at or near line 585 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl

fatal:Execute: Error occurred at or near line 635 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl

fatal:Execute: Error occurred at or near line 963 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl

fatal:Execute: Error occurred at or near line 3023 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl

fatal:Execute: Error occurred at or near line 8973 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl "

Although my code is simple , I check it for several times and can not find a error in it. Is there anyone
can give me a instruction? Thanks!

Here below is my code:

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"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"

begin

; **************************************88
; read all pdo indices
;**********************************
 ; Monthly PDO
x = asciiread("/home/linx/work/indices/Pdo.Obs_1900-2006_Mantua.txt",(/106,13/),"float")
xx = ndtooned(x(:,1:12))

yyyymm = yyyymm_time(1900, 2005, "integer")

pdo_ann = month_to_annual_weighted(yyyymm,xx,1) ; For temperature, generally opt=1
printVarSummary(pdo_ann)
;print(pdo_ann&year)
year = ispan(1900,2005,1)*1.0

wks = gsn_open_wks("ps","pdo_ANN&MAM_Mantua")
res = True
res_at_tiMainString = " PDO Obs Series (Mantua et al) "
;plot = gsn_csm_xy(wks,year,pdo_ann,res)
plot = gsn_csm_xy(wks,pdo_ann&year,pdo_ann,res)

end

Lin

LEO_ARIES
2007-01-15

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jan 15 2007 - 06:41:14 MST

This archive was generated by hypermail 2.2.0 : Tue Jan 16 2007 - 14:49:45 MST