Antoy,<br>In your bold line (543), the variable &quot;sig_waves&quot; appears to have been obtained using the subwrd statement from a line of text output from another command.  Thus, the variable sig_waves is being stored as a string (character/text) and not a number.  To get around this, simply put sig_waves in single quotes in line 543.  See if that works.<br>
<br>Note also that if you do this anywhere else in the script, you&#39;ll need to surround those variables with single quotes as well to avoid this same problem.<br><br>Jeff<br><br><div class="gmail_quote">On Tue, Nov 17, 2009 at 9:11 PM, Antoy Chang <span dir="ltr">&lt;<a href="mailto:antoyc@yahoo.com">antoyc@yahoo.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit;" valign="top">
<div>Dear Jeff,<br> <br>I manage to solve the error but another error is encountered :<br> <br>in my script ;<br> <br>&#39;d
 ave(wht,t=&#39;y&#39;,t=&#39;y+2&#39;)&#39;                                                                                                                         
 <br>                                                                                                                                                
 <br>                                                                                                                        <br>sigwa=sublin(result,2)   
 <br>                                                                                                                            <br>sig_waves=subwrd(sigwa,4)   
 <br>                                                                                                                         <br>if
 sig_waves=9.999e+20                                                                                                                               
 <br>SIG.incr=&quot;undefined&quot;                                                                                                                                 
 <br>else                                                                                                                                                  <br>fmt =
 &#39;%4.1f&#39;                                                                                                                                         <br>*SIG.incr=math_format(fmt,sig_waves) <br><b>SIG.incr=math_nint(sig_waves*10.0)  --------&gt; line 543 <br>
</b><br>if
 SIG.incr&lt;3<br>SIG.incr=3<br>endif  <br>SIG.incr=math_format(fmt,SIG.incr/10)<br>endif                                                                                                                                                
 <br>SIG=SIG%&quot;,&quot;%SIG.incr    <br>                                                                                                                              <br><br>&#39;d ave(mpr,t=&#39;y&#39;,t=&#39;y+2&#39;)&#39;
 <br><br>wavper=sublin(result,2)                                                                                                                                              
 <br>wave_per.incr=subwrd(wavper,4)                                                                                                                        <br>if
 wave_per.incr=9.999e+20                                                                                                                           
 <br>PER.incr=&quot;undefined&quot;                                                                                                                                 
 <br>else                                                                                                                                                 
 <br>*                                                                                                                                                     <br>PER.incr =
 math_nint(wave_per.incr)<br>endif                                                                                                                                                
 <br>PER=PER%&quot;,&quot;%PER.incr       </div>
<div> </div>
<div> </div>
<div> </div>
<div>with same error message as previous one.</div>
<div> </div>
<div>Thank you very much.</div>
<div>Best Regards,</div>
<div>Antoy      <br><br>--- On Wed, 11/18/09, Jeffrey Duda &lt;<a href="mailto:jdduda@iastate.edu" target="_blank">jdduda@iastate.edu</a>&gt; wrote:<br><br><br>From: Jeffrey Duda &lt;<a href="mailto:jdduda@iastate.edu" target="_blank">jdduda@iastate.edu</a>&gt;<br>
Subject: Re: my script error<br>To: <a href="mailto:antoyc@yahoo.com" target="_blank">antoyc@yahoo.com</a><br>Date: Wednesday, November 18, 2009, 12:25 AM<div><div></div><div class="h5"><br><br><br>Try putting line 454 and the one after it in single quotes.  Since you&#39;re using these variables in a display command, they need to be defined outside the script.<br>
<br>Jeff Duda<br><br><br>On Tue, Nov 17, 2009 at 2:09 AM, Antoy Chang &lt;<a href="mailto:antoyc@yahoo.com" target="_blank">antoyc@yahoo.com</a>&gt; wrote:<br><br><br><br><br><br><br>Dear All,<br>Can someone here help me this script error, my script is as below :<br>
<br>&#39;d wdr&#39; <br>wind_dirn.incr=subwrd result,4) <br>if wind_dirn.incr=9.999e+20 <br>wind_dirn.incr=&quot;undefined&quot; <br>else <br>&#39;define wind_dirn.incr = math_nint(wind_dirn.incr)&#39; <br>endif <br>* <br>
<br>* <br>*determine the resultant wind for three output times <br>pi = 3.1415926 <br>d2r = pi/180
 <br>r2d = 1/d2r <br>fmt = &#39;%-6.4f&#39; <br><br>wamv=cos(0.0174532*wdr)*w10 -----&gt; Line 454 <br>wamu=sin(0.0174532*wdr)*w10<br><br>&#39;d sum(wamu,t= &#39;y&#39;,t= &#39;y+2&#39;)&#39; <br>udirs=sublin(result,2) <br>
udir=subwrd(udirs,4)/3 <br><br> The error message : <br> <br>DEFINE error: Name too long; missing &#39;=&#39;<br>Non numeric args to numeric operation<br>Error occurred processing function arguments<br>      Error occurred on line 454<br>
      In file E\KC\WORK\Adhoc_~1\Langkawi.gs<br>ga-&gt;<br> <br><br><br><br>-- <br>Jeff Duda<br>Iowa State University<br>Meteorology Graduate Student<br>3134 Agronomy Hall<br><a href="http://www.meteor.iastate.edu/%7Ejdduda" target="_blank">www.meteor.iastate.edu/~jdduda</a><br>
</div></div></div></td></tr></tbody></table><br>

   </blockquote></div><br><br clear="all"><br>-- <br>Jeff Duda<br>Iowa State University<br>Meteorology Graduate Student<br>3134 Agronomy Hall<br><a href="http://www.meteor.iastate.edu/~jdduda">www.meteor.iastate.edu/~jdduda</a><br>