### GRADS calculating problem

Posted:

**Mon Feb 06, 2017 10:28 am**Hi folks!

I have one problem in GRADS scripting.

I've defined variable:

and I need to set gdd = 0 if gdd < 0 but to do on the whole field so I can draw it.

I may put in drawings options to start to draw with 0, all below with the same color, but I have to make accumulated variable too:

I've tried with in several variants (with or without quotes, partial quotes, semi quotes,....) but nothing gave any result. Sometimes I've got errors, sometimes it just pass over it without calculating...

I've tried with math_nint, nothing happened...

Do you have any idea how to solve this problem?

Thanks in advance!

Nebojša

I have one problem in GRADS scripting.

I've defined variable:

Code: Select all

`'define gdd=((((TMP2m(t='i+6')-'kelvin')+(TMP2m(t='i+12')-'kelvin'))/2)-10)'`

I may put in drawings options to start to draw with 0, all below with the same color, but I have to make accumulated variable too:

Code: Select all

`gddsum = SUM(gdd(1),.., gdd(n)).`

Code: Select all

` if(gdd < 0); gdd = 0; endif `

I've tried with math_nint, nothing happened...

Do you have any idea how to solve this problem?

Thanks in advance!

Nebojša