Re: getfiledimsizes

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue, 19 Dec 2006 07:47:55 -0700

Dear Mateus,

Unfortunately, the variable returned from "addfiles" is different from
that
returned from "addfile", and you can't use the "getfile" type functions
on anything returned from "addfiles". I need to update the "addfiles"
documentation to reflect this.

Dennis or somebody else may correct me on this, but I believe the only
way you can query dimension sizes is to query them from one file
at a time. (Obviously, if they are the same on every file, then you only
need to query one file.) You can do this by opening a single file with
"addfile"
and using the "getfiledimsizes" function on it.

FYI: if you retrieve a variable from an "addfiles" list of files, it
will not have
metadata automatically attached to it. To get around this, you can use
a function called "addfiles_GetVar":

http://www.ncl.ucar.edu/Document/Functions/Contributed/
addfiles_GetVar.shtml

--Mary

On Dec 19, 2006, at 5:53 AM, Mateus da Silva Teixeira wrote:

> Dear NCL users,
>
> I'm trying to get the dimension sizes of my files opened with addfiles
> function with the following commands
>
> ncep = systemfunc("ls ../T1000*.nc")
> lista = addfiles(ncep,"r")
> d = getfiledimsizes(lista)
>
> but NCL returns an error:
>
> fatal:Argument type mismatch on argument (0) of (getfiledimsizes) can
> not coerce
> fatal:Execute: Error occurred at or near line 21 in file
> mediasMensais_anomalias_T.ncl
>
> Opening one only file, with addfile function, it works, but with
> addfiles not.
> Can you help me?
>
> Thank you
> Mateus
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Dec 19 2006 - 07:47:55 MST

This archive was generated by hypermail 2.2.0 : Tue Dec 19 2006 - 07:55:14 MST