<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:14pt"><div><span style="font-family: times new roman,new york,times,serif;">Hi,</span></div><div style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br><span style="font-family: times new roman,new york,times,serif;"></span></div><div style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span style="font-family: times new roman,new york,times,serif;">I am writing a grads script to sort out values which differnece from mean is more than 3 times standard deviation. The netcdf data is spread in x,y,z,t dimesions. Though while loops for x,y,z,t are running well, I get error as below:</span></div><div
style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br><span style="font-family: times new roman,new york,times,serif;"></span></div><div style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span style="font-family: times new roman,new york,times,serif;"> Operand = lat1 -90<br>SET error: Invalid operand<br> Operand = lon1 0<br>SET error: Invalid operand<br> Operand = lon1 1<br>SET error: Invalid operand<br> Operand = lon1 2<br>:</span></div><div style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span style="font-family: times new roman,new york,times,serif;">:</span></div><div style="color: rgb(0, 0, 0); font-size: 18.6667px;
font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span style="font-family: times new roman,new york,times,serif;">:</span></div><div style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span style="font-family: times new roman,new york,times,serif;"> Operand = lon1 360<br></span><span style="font-family: times new roman,new york,times,serif;"><span style="font-family: times new roman,new york,times,serif;">SET error: Invalid operand</span></span></div><div style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">:</div><div style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">:<br><span
style="font-family: times new roman,new york,times,serif;"><span style="font-family: times new roman,new york,times,serif;"></span></span></div><div style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span style="font-family: times new roman,new york,times,serif;"><span style="font-family: times new roman,new york,times,serif;"></span>DEFINE error: Invalid expression. <br></span></div><div style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">My script for defining variables are as follows:</div><div style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: times new roman,new
york,times,serif; background-color: transparent; font-style: normal;"><br><span style="font-family: times new roman,new york,times,serif;"></span></div><div style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span style="font-family: times new roman,new york,times,serif;">'define si_avg = aave(si,lon=0,lon=360,lat=0,lat=180)'<br>'define dv = pow(siavg-si,2)'<br>'define sd = sqrt(aave(dv,lon=0,lon=360,lat=0,lat=179))'<br>'define x = 3*sd'</span></div><div style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span style="font-family: times new roman,new york,times,serif;">'define y = mod(si_avg-si)'<br> if (y>=x);<br> 'set gxout
fwrite'<br> 'set fwrite data-sorted.dat'<br> 'd 'si<br> endif<br></span></div><div style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br><span style="font-family: times new roman,new york,times,serif;"></span></div><div style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span style="font-family: times new roman,new york,times,serif;">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.</span></div><div style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br><span style="font-family: times new roman,new york,times,serif;"></span></div><div style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span style="font-family: times new roman,new york,times,serif;">Thanks in advance!</span></div><div style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span style="font-family: times new roman,new york,times,serif;">Regards</span></div><div style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span style="font-family: times new roman,new
york,times,serif;">Pankaj</span></div><div style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span style="font-family: times new roman,new york,times,serif;">EES, Hokkaido University<br></span></div></div></body></html>