[gradsusr] Defining a variable one location at a time
Jeff Duda
jeffduda319 at gmail.com
Wed Sep 18 15:59:38 EDT 2013
Tom,
Check the 'set defvar' command. It should give you the answer you're
looking for.
Jeff Duda
On Tue, Sep 17, 2013 at 3:10 PM, Thomas Robinson <ter at hawaii.edu> wrote:
> Aloha GrADS users,
>
> I am trying to create a variable (inv) in a script one point at a time.
> I'm not sure how to do it.
>
> ix=1
> iy=1
> iz=zz
> while (iz < nz)
> while (ix <= nx)
> while (iy <= ny)
> 'set x ' ix
> 'set y ' iy
> 'set z ' zz
> if (var'(z='iz')' < var '(z='iz+1')')
> inv = var
> else
> inv = undef
> endif
> iy = iy + 1
> endwhile
> iy = 1
> ix = ix + 1
> endwhile
> ix = 1
> iz = iz + 1
> endwhile
>
> I don't think this is working. I'm wondering if there is a way to do
> something like this. I want the variable to be global for my domain, not
> just for one point.
>
> -Tom
>
>
> --
> Tom Robinson
> President - Graduate Student Organization
> Graduate Student - Department of Meteorology
> 732-718-2323
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
--
Jeff Duda
Graduate research assistant
University of Oklahoma School of Meteorology
Center for Analysis and Prediction of Storms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130918/6d289ee1/attachment-0003.html
More information about the gradsusr
mailing list