udf with z and t
Matthias Munnich
munnich at ATMOS.UCLA.EDU
Mon Oct 30 13:42:33 EST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Henrique,
ga-> d tloop(myudf(expr))
should work. You may like to read the discussion on "tloop"
http://grads.iges.org/grads/gadoc/gradfunctloop.html
and "set loopdim" in the docs to understand why this is necessary.
It also explains why "define allundef=myudf(expr)" should also work.
... Matt
Henrique Barbosa wrote:
> Hi all,
>
> I want to write a UDF that deals with field values varying in Z and
> T dimensions. From the grads help files, it seems that it should
> work:
>
> http://www.iges.org/grads/gadoc/udf.html
>
> ... At least there are fields in the header of the transfer file
> that tell if the first and second varying dimensions are either x,
> y, z or t.
>
> My function is very simple, it only reads the transfer file and
> print the header info, and returns a undefined field. But when I
> call it with fixed (x,y) and varying (Z,T), grads call the function
> many times.
>
> I mean, instead of calling the function only once with the 2D
> subset:
>
> x=cte, y=cte, z=z_min...z_max,t=t_min...t_max
>
> Grads calls the udf one time for each pair (z,t), always passing
> only a single value.
>
> Does anyone know how to pass a varying (Z,T) to a UDF function?
>
> Or is that feature that will only be implemented in the future?
>
> I am using grads-1.9b4, precompiled binaries (rh9), on a Suse 10.1
> intel platform (i386).
>
> Thank you,
>
> Henrique
- --
- --------------------------------
Matthias Munnich
Univ. of California, Los Angeles
Inst. of Geophysics and Planetary Physics
3845 Slichter Hall
Los Angeles, CA 90095-1567
Phone: +1-310-794 5899
Fax: +1-310-206 3051
Email: munnich at atmos.ucla.edu
- --------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFRkeZidaDTh/cfhYRAr2lAKC55E0brI9nSDkYi2q/Bh+1BLhlDQCg0c6u
eGAkpQAc9rr5/XGVodDRktA=
=vte2
-----END PGP SIGNATURE-----
More information about the gradsusr
mailing list