[gradsusr] DEFINE error: Invalid expression

pankaj kumar pankajqumar at yahoo.com
Mon Dec 16 03:32:08 EST 2013


Hi,

I am writing a gradsscript tosort out values which differnece from mean is more than 3 times standard deviation. The netcdf data is spread in x,y,z,t dimesions. Thoughwhile loops for x,y,z,t are running well, I get error as below:

  Operand = lat1 -90
SET error: Invalid operand
  Operand = lon1 0
SET error: Invalid operand
  Operand = lon1 1
SET error: Invalid operand
  Operand = lon1 2
:
:
:
  Operand = lon1 360
SET error: Invalid operand
:
:

DEFINE error:  Invalid expression. 


My script for defining variables are as follows:

'define si_avg = aave(si,lon=0,lon=360,lat=0,lat=180)'
'define dv = pow(siavg-si,2)'
'define sd = sqrt(aave(dv,lon=0,lon=360,lat=0,lat=179))'
'define x = 3*sd'
'define y = mod(si_avg-si)'
         if (y>=x);
            'set gxout fwrite'
            'set fwrite data-sorted.dat'
            'd 'si
         endif


Please see what kind of error I am facing here in defining variables though it seems okay as variables are defined properly. If someone has script or fortran program to sort data in x,y,z,t which has much higher standard deviation, please help me urgently.

Thanks in advance!
Regards
Pankaj
EES, Hokkaido University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20131216/1a75b0fe/attachment-0001.html 


More information about the gradsusr mailing list