<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Dec 16, 2013, at 3:32 AM, pankaj kumar wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 14pt; position: static; z-index: auto; "><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></span></div></div></div></blockquote><div><br></div>What is the mod() function?</div><div><br><blockquote type="cite"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 14pt; position: static; z-index: auto; "><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;"> if (y>=x);<br></span></div></div></div></blockquote><div><br></div>The 'if' statment in the scripting language doesn't evaluate defined variables like this. You need to use the maskout() function to create a grid with missing values where x < y. Something like this:</div><div>' d maskout(si,y-x)'</div><div>--Jennifer</div><div><br></div><div><br></div><div><br><blockquote type="cite"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 14pt; position: static; z-index: auto; "><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;"> '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></div>_______________________________________________<br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>http://gradsusr.org/mailman/listinfo/gradsusr<br></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--</div><div>Jennifer M. Adams<br>Center for Ocean-Land-Atmosphere Studies (COLA)<br>111 Research Hall, Mail Stop 2B3<br>George Mason University<br>4400 University Drive<br>Fairfax, VA 22030 <br><br></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></div></span></span><br class="Apple-interchange-newline">
</div>
<br></body></html>