Displaying Compound Variables
Jeffrey Duda
jdduda at IASTATE.EDU
Tue Feb 2 10:51:53 EST 2010
On Tue, Feb 2, 2010 at 1:40 AM, Jason Snyder <jmssnyder at ucdavis.edu> wrote:
> I tried the following with no success:
>
> 'sdfopen uwnd.2001.nc'
>
> 'sdfopen vwnd.2001.nc'
> 'set gxout shaded'
> 'set t 1'
> 'define uwnd=uwnd(t=1)'
> i=2
>
> count=1
> While(i<5)
> count=count+1
> say count
> 'set t 'i
> uwnd = uwnd - uwnd(i-1)
> * V.count=vwnd.2
> * 'd U.count'
> i=i+1
> endwhile
> what am I doing wrong here?
>
> Thanks,
>
> Jason
>
>
You have to be very picky with your quotes. If any part of any line in your
script would be something you would type in at the console (in Grads) to do
outside of a script, it needs to be in quotes. That means any define,
display, or set plotting environment commands. You need to change the line
uwnd = uwnd - uwnd(i-1) to
'uwnd = uwnd - uwnd(t-'i')' ("i" needs to be outside the quotes as you
see it. That way the Grads script will sub in an integer value for "i" and
you'll get your t-1, t-2, etc)
--
Jeff Duda
Iowa State University
Meteorology Graduate Student
3134 Agronomy Hall
www.meteor.iastate.edu/~jdduda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20100202/5b01c474/attachment.html
More information about the gradsusr
mailing list