Thanks David <br>Only i need to change &#39;set z&#39; z ---&gt; &#39;set z &#39;z while there is no need to change 2) and 3) points. <br>Adding this single changes to the script has solved my problem.<br><br>bye<br><br>Sushant<br>
<br><br><div class="gmail_quote">On Thu, Apr 5, 2012 at 4:21 PM, Davide Sacchetti <span dir="ltr">&lt;<a href="mailto:davide.sacchetti@arpal.gov.it">davide.sacchetti@arpal.gov.it</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
errors ...<br>
1) &#39;set z&#39; z -&gt; &#39;set z &#39;z<br>
2) &#39;define tmp1=t(z=&#39;z&#39;)&#39; -&gt; &#39;define tmp1=t(z=z+0)&#39;<br>
3) &#39;define tmp2=t(z=&#39;z+1&#39;)&#39; -&gt; &#39;define tmp2=t(z=z+1)&#39;<br>
<br>
suggestions:<br>
1) avoid variables names as &#39;lev&#39;, &#39;z&#39; ... they should be some way<br>
reserved to grads environment<br>
2) define works but when you are using it dimensions are all collapsed<br>
into a single point ...<br>
<br>
<br>
bye bye<br>
davide<br>
<div class="HOEnZb"><div class="h5"><br>
On Thu, 2012-04-05 at 15:38 +0530, sushant puranik wrote:<br>
&gt; Jim thankful for suggestion. I put space between &#39;set z&#39; z<br>
&gt; But the error continues.<br>
&gt;<br>
&gt; Sushant<br>
&gt;<br>
&gt;<br>
&gt; On Thu, Apr 5, 2012 at 12:36 PM, James T. Potemra &lt;<a href="mailto:jimp@hawaii.edu">jimp@hawaii.edu</a>&gt;<br>
&gt; wrote:<br>
&gt;         Sushant:<br>
&gt;<br>
&gt;         In the line<br>
&gt;         &#39;set z&#39; z<br>
&gt;         put a space between the quote and the first z, i.e.,<br>
&gt;         &#39;set z &#39;z<br>
&gt;<br>
&gt;         Jim<br>
&gt;<br>
&gt;<br>
&gt;         On 4/4/12 9:02 PM, sushant puranik wrote:<br>
&gt;         &gt; Hi<br>
&gt;         &gt; I am trying to find the inversion layer with the help of<br>
&gt;         &gt; following script<br>
&gt;         &gt;<br>
&gt;         &gt; &#39;reinit&#39;<br>
&gt;         &gt; &#39;sdfopen D:/ECMWF_Monthly_Mean_data/jun2010Temp.nc&#39;<br>
&gt;         &gt; &#39;clear&#39;<br>
&gt;         &gt; count = 1<br>
&gt;         &gt; while (count &lt;=120)<br>
&gt;         &gt;   &#39;clear&#39;<br>
&gt;         &gt;   &#39;set grads off&#39;<br>
&gt;         &gt;   &#39;set t &#39;count<br>
&gt;         &gt;   &#39;q time&#39;<br>
&gt;         &gt; date=subwrd(result,3)<br>
&gt;         &gt; hour=substr(date,1,3)<br>
&gt;         &gt; day=substr(date,4,2)<br>
&gt;         &gt; month=substr(date,6,3)<br>
&gt;         &gt; year=substr(date,9,10)<br>
&gt;         &gt; date_str=hour&#39; &#39;day&#39;/&#39;month&#39;/&#39;year<br>
&gt;         &gt; *&#39;set csmooth on&#39;<br>
&gt;         &gt; &#39;set lat 10&#39;<br>
&gt;         &gt; &#39;set lon 60&#39;<br>
&gt;         &gt; &#39;set map 1 1 6&#39;<br>
&gt;         &gt; &#39;set line 1 1 1&#39;<br>
&gt;         &gt; &#39;enable print temp&#39;<br>
&gt;         &gt; z = 1<br>
&gt;         &gt; while (z &lt;=12)<br>
&gt;         &gt; &#39;set z&#39; z<br>
&gt;         &gt; lev=subwrd(result,4)<br>
&gt;         &gt; &#39;define tmp1=t(z=&#39;z&#39;)&#39;<br>
&gt;         &gt; &#39;define tmp2=t(z=&#39;z+1&#39;)&#39;<br>
&gt;         &gt; &#39;define inver=tmp2-tmp1&#39;<br>
&gt;         &gt; &#39;d inver&#39;<br>
&gt;         &gt; inversion=subwrd(result,4)<br>
&gt;         &gt; if inversion&gt;0<br>
&gt;         &gt; *  say &quot;inversion in time  &quot;tt &quot; in level &quot;lev<br>
&gt;         &gt; res=write(hfile,&#39;inversion in&#39;  tt&#39;  in level &#39;lev mb)<br>
&gt;         &gt; endif<br>
&gt;         &gt; z=z+1<br>
&gt;         &gt; endwhile<br>
&gt;         &gt; count = count + 4<br>
&gt;         &gt; endwhile<br>
&gt;         &gt; &#39;clear&#39;<br>
&gt;         &gt;<br>
&gt;         &gt;<br>
&gt;         &gt; But while running this script in GrADS it shows error<br>
&gt;         &gt; message<br>
&gt;         &gt;<br>
&gt;         &gt;  SET error: Invalid operand<br>
&gt;         &gt;   Operand = z1<br>
&gt;         &gt; SET error: Invalid operand<br>
&gt;         &gt;   Operand = z2<br>
&gt;         &gt; SET error: Invalid operand<br>
&gt;         &gt;   Operand = z3<br>
&gt;         &gt; SET error: Invalid operand<br>
&gt;         &gt;   Operand = z4<br>
&gt;         &gt; SET error: Invalid operand<br>
&gt;         &gt;   Operand = z5<br>
&gt;         &gt; SET error: Invalid operand<br>
&gt;         &gt;   Operand = z6<br>
&gt;         &gt; SET error: Invalid operand<br>
&gt;         &gt;   Operand = z7<br>
&gt;         &gt; SET error: Invalid operand<br>
&gt;         &gt;   Operand = z8<br>
&gt;         &gt; SET error: Invalid operand<br>
&gt;         &gt;   Operand = z9<br>
&gt;         &gt; SET error: Invalid operand<br>
&gt;         &gt;   Operand = z10<br>
&gt;         &gt; SET error: Invalid operand<br>
&gt;         &gt;   Operand = z11<br>
&gt;         &gt; SET error: Invalid operand<br>
&gt;         &gt;   Operand = z12<br>
&gt;         &gt; Metafile already open<br>
&gt;         &gt; SET error: Invalid operand<br>
&gt;         &gt;   Operand = z1<br>
&gt;         &gt; SET error: Invalid operand<br>
&gt;         &gt;   Operand = z2<br>
&gt;         &gt; SET error: Invalid operand<br>
&gt;         &gt;   Operand = z3<br>
&gt;         &gt; SET error: Invalid operand<br>
&gt;         &gt;   Operand = z4<br>
&gt;         &gt; SET error: Invalid operand<br>
&gt;         &gt;   Operand = z5<br>
&gt;         &gt; SET error: Invalid operand<br>
&gt;         &gt;   Operand = z6<br>
&gt;         &gt; SET error: Invalid operand<br>
&gt;         &gt;   Operand = z7<br>
&gt;         &gt; SET error: Invalid operand<br>
&gt;         &gt;   Operand = z8<br>
&gt;         &gt; SET error: Invalid operand<br>
&gt;         &gt;   Operand = z9<br>
&gt;         &gt; SET error: Invalid operand<br>
&gt;         &gt;   Operand = z10<br>
&gt;         &gt; SET error: Invalid operand<br>
&gt;         &gt;   Operand = z11<br>
&gt;         &gt; SET error: Invalid operand<br>
&gt;         &gt;   Operand = z12<br>
&gt;         &gt; ga-&gt;<br>
&gt;         &gt;<br>
&gt;         &gt;<br>
&gt;         &gt; Anybody has suggestion over this issue?<br>
&gt;         &gt;<br>
&gt;         &gt; Thanks in advance<br>
&gt;         &gt;<br>
&gt;         &gt;<br>
&gt;         &gt; Sushant<br>
&gt;         &gt;<br>
&gt;         &gt;<br>
&gt;         &gt;<br>
&gt;         &gt; _______________________________________________<br>
&gt;         &gt; gradsusr mailing list<br>
&gt;         &gt; <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
&gt;         &gt; <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
&gt;<br>
&gt;         _______________________________________________<br>
&gt;         gradsusr mailing list<br>
&gt;         <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
&gt;         <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; gradsusr mailing list<br>
&gt; <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
&gt; <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
--&gt; Attenzione cambio indirizzo: <a href="mailto:davide.sacchetti@arpal.gov.it">davide.sacchetti@arpal.gov.it</a><br>
--<br>
Davide Sacchetti<br>
Centro Funzionale Meteo Idrologico di Protezione Civile della Regione Liguria<br>
ARPAL Unità Tecnica Complessa di livello Regionale<br>
V.le Brigare Partigiane 2 16121 Genova (I)<br>
tel: +39 010 6437535                    fax: +39 010 6437520<br>
mail: <a href="mailto:davide.sacchetti@arpal.gov.it">davide.sacchetti@arpal.gov.it</a>     web: <a href="http://www.meteoliguria.it" target="_blank">www.meteoliguria.it</a><br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>सुशांत पुराणिक <br>वातावरणशास्त्र व अवकाशशास्त्र विभाग,<br>पुणे विद्यापीठ <br>पुणे-०७, महाराष्ट्र <br>भारत. <br><br><br><br>