[gradsusr] multiplication in Grads script

Stephen McMillan smcmillan at planalytics.com
Wed Jul 6 12:52:28 EDT 2016


Kathryn,

I don't see anything wrong with what you are showing, as the following (in
a script) produces 1.12 0.047 0.05264 on screen...

xdif=1.12
xplot=0.047
xdist=xplot*xdif
say xdif' 'xplot' 'xdist

Perhaps you're getting the error because you have no gridded file open
prior to running?

Stephen McMillan

On Wed, Jul 6, 2016 at 12:20 PM, Kathryn Sellwood - NOAA Affiliate <
kathryn.sellwood at noaa.gov> wrote:

> I have defined 2 variables in a grads script which I would then like to
> multiply
> to obtain a 3rd variable
> xdif=1.12
> xplot=0.047
> xdist=xplot*xdif
> I get the following error "Non-numeric args to numeric operation"
> I have tried multiple ways to get this to work with no success ...
> guessing that it is commenting out "xdif" but I also tried putting * in
> quotes and that produced a similar error.
> Any Ideas?
> Thanks!
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20160706/2c206298/attachment.html 


More information about the gradsusr mailing list