Re: Addfiles Question when var averiging period varies over time

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Fri, 23 Mar 2007 07:25:36 -0600 (MDT)

The error message:

fatal:Argument type mismatch on argument (0) of (isfilevar) can not coerce
fatal:Execute: Error occurred at or near line 93 in file test5.ncl

Well, in your short time with NCL, you have stumbled upon two issues
with NCL that have are subtle:

     [1] NCL's handling of degenerate record [ie, time] dimension.

and, today,

     [2] the difference between "addfile" and "addfiles"

         f = addfile(...) ; the variable "f" is of type "file"
         f = addfiles(...) ; the variable "f" is of type "list"
                    * ****

This "list" contains entries that are of type "file".
The "isfilevar" function is prototyped for f:file

So, in your code, I think you can change:

         if (isfilevar(f, "CICEPL_3_SFC_ave6h")) ; f is type "list"
to
         if (isfilevar(f[0], "CICEPL_3_SFC_ave6h")) ; f[0] is specifically
                                                       ; looking at the 0th
                                                       ; entry which is of type "file"

Good luck
D

On Fri, 23 Mar 2007, Jacob.Klee_at_dom.com wrote:

> Thank you for the replies and my appologies for a hastilly put together email that was short on details -- why not to
> write email while running out the door! :)
> Within the attatched Test5.zip I included:
>   1) test5.ncl -- This is my script (it is still an unoptimized / learning work in progress)
>   2) test5..log -- This is the output from running the script
>   3) gfs06.txt -- This is representitive of all the forecast hours evenly divisible by six
>   4) gfs03.txt -- This is representitive of the forecast hours not evenly divisible by six
> I hope this lays a better foundation for problem-solving than did my first hasty email. :)
> Worst case I will only use the six-hourly files, I just prefered not to restrict myself to that if I did not have to.
> Thank you again for your help.
> -- Jacob
>

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Mar 23 2007 - 07:25:36 MDT

This archive was generated by hypermail 2.2.0 : Fri Mar 23 2007 - 11:03:53 MDT