Using file as as argument to function

From: gibies george <gibies_at_nyahnyahspammersnyahnyah>
Date: Tue Feb 22 2011 - 06:06:18 MST

Can anybody tell me the reason for the following error message.

fatal:Argument type mismatch on argument (0) of (get_coordvar) can not
coerce

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;Function definition
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
undef ("get_coordvar")
function get_coordvar(file1:file,coord:string,size:integer)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
local coordvarname, coordvar

begin
  print("Enter the file-variable representing "+coord+" : ")
  coordvarname = systemfunc("read var; echo $var")
    if (isfilevar(f, coordvarname))
coordvar = file1[:]->$coordvarname$
size1 = dimsizes (coordvar)
if (size .ne. size1)
coordvar=ispan(0,size-1,1)
end if
    else
coordvar=ispan(0,size-1,1)
    end if
  return (coordvar)
end ;;; End of function definition get_coordvar() ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

if(.not.iscoord(data,"time"))
data&time = get_coordvar(file1,"time",dimsize(0))
end if

-- 
*Gibies George,   CSIR-RF,
Climate and Global Modelling Division,
Indian Institute of Tropical Meteorology,
Dr. Homi Bhabha Road,
NCL (P. O.), Pashan,
Pune 411008, India.*
*http://sites.google.com/site/gibiesge/*
Think about the environment. Save paper; Save Trees. Please don't print this
e-mail unless it is necessary.

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Feb 22 06:06:45 2011

This archive was generated by hypermail 2.1.8 : Wed Feb 23 2011 - 16:47:57 MST