Error while trying run clmDayTLL

From: abheera hazra <hazra.abheera_at_nyahnyahspammersnyahnyah>
Date: Fri Aug 24 2012 - 18:26:08 MDT

Hi,

I am trying to use the function clmDayTLL, I am using binary data for
input, so I create the yyyyddd variable, since the function says it is an
integer array, that is how i declare it initially, here is my code;

****************

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"

pathi = new(10,string)
patho = new(10,string)

yyyyddd = new(1096,integer)
xin = new((/1096,27,121,240/),"float")
xcl = new((/1096,121,240/),"float")
xclim = new((/366,27,121,240/),"float")
;xout = new((/366,121,240/),"float")
;xout!0="year_day"
;yyyyddd!0="year_day";xcl!0="year_day"

pathi(1)= "/project/dheat.mean.2007"
pathi(2)= "/project/dheat.mean.2008"
pathi(3)= "/project/monisi/dheat.mean.2009"

patho(1)= "/project/dheat.clim.leap"
patho(2)= "/project/dheat.clim"

patho(3)= "/project/dheat.anom.2007/"
patho(4)= "/project/dheat.anom.2008/"
patho(5)= "/project/dheat.anom.2009/"

k=-1
do j=1,365
 k=k+1
 yyyyddd(k)= 2007*1000+j
; print (k)
end do

k=364
do j=1,366
 k=k+1
 yyyyddd(k)= 2008*1000+j
; print (k)
end do

k=730
do j=1,365
 k=k+1
 yyyyddd(k)= 2009*1000+j
; print (k)
end do

print ("yyyyddd")

  nrec = 0
  dims = (/365,27,121,240/)
  x1 = fbindirread(pathi(1), nrec, dims, "float")

  dims = (/366,27,121,240/)
  x2 = fbindirread(pathi(2), nrec, dims, "float")

  dims = (/365,27,121,240/)
  x3 = fbindirread(pathi(3), nrec, dims, "float")
  set_default_fillvalue("float", 9.999e20)

print ("dheat mean files read")

xin(0:364,:,:,:) = x1(0:364,:,:,:)
xin(365:730,:,:,:) = x2(0:365,:,:,:)
xin(731:1095,:,:,:) = x3(0:364,:,:,:)

print ("dbh rewritten")
set_default_fillvalue("integer", 10000000000)

;

do i=0,26
 xcl(0:1095,0:120,0:239) = xin(0:1095,i,0:120,0:239)
 print ("xcl <- xin")
 xout = clmDayTLL(xcl,yyyyddd)
 print("clm")
 xoutsm = smthClmDayTLL(xout, 3)
 print("smoothed")
 xclim(:,i,:,:) = xoutsm(:,:,:)
end do

print ("smoothed climatology")

****************

But I keep getting the following error

*****************

 Copyright (C) 1995-2011 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 6.0.0
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.
(0) yyyyddd
(0) dheat mean files read
(0) dbh rewritten
(0) xcl <- xin
warning:Attempt to reference attribute (year_day) which is undefined
(0) clm
fatal:(missing) is not a dimension name in variable (clmDay), could not
determine dimension number
fatal:Execute: Error occurred at or near line 3969 in file
$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl

fatal:Execute: Error occurred at or near line 84 in file clim.ncl

*****************

Would like to know where I'm going wrong,

Also, for the function smthClmDayTLL, how many harmonics can one include?
The NCL site mentions generally 2 or 3, but is it possible to have more
harmonics included?

Thanks,
Abheera

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Aug 24 18:26:17 2012

This archive was generated by hypermail 2.1.8 : Tue Aug 28 2012 - 08:53:45 MDT