Thanks David <br>Only i need to change 'set z' z ---> 'set z '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"><<a href="mailto:davide.sacchetti@arpal.gov.it">davide.sacchetti@arpal.gov.it</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
errors ...<br>
1) 'set z' z -> 'set z 'z<br>
2) 'define tmp1=t(z='z')' -> 'define tmp1=t(z=z+0)'<br>
3) 'define tmp2=t(z='z+1')' -> 'define tmp2=t(z=z+1)'<br>
<br>
suggestions:<br>
1) avoid variables names as 'lev', 'z' ... 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>
> Jim thankful for suggestion. I put space between 'set z' z<br>
> But the error continues.<br>
><br>
> Sushant<br>
><br>
><br>
> On Thu, Apr 5, 2012 at 12:36 PM, James T. Potemra <<a href="mailto:jimp@hawaii.edu">jimp@hawaii.edu</a>><br>
> wrote:<br>
> Sushant:<br>
><br>
> In the line<br>
> 'set z' z<br>
> put a space between the quote and the first z, i.e.,<br>
> 'set z 'z<br>
><br>
> Jim<br>
><br>
><br>
> On 4/4/12 9:02 PM, sushant puranik wrote:<br>
> > Hi<br>
> > I am trying to find the inversion layer with the help of<br>
> > following script<br>
> ><br>
> > 'reinit'<br>
> > 'sdfopen D:/ECMWF_Monthly_Mean_data/jun2010Temp.nc'<br>
> > 'clear'<br>
> > count = 1<br>
> > while (count <=120)<br>
> > 'clear'<br>
> > 'set grads off'<br>
> > 'set t 'count<br>
> > 'q time'<br>
> > date=subwrd(result,3)<br>
> > hour=substr(date,1,3)<br>
> > day=substr(date,4,2)<br>
> > month=substr(date,6,3)<br>
> > year=substr(date,9,10)<br>
> > date_str=hour' 'day'/'month'/'year<br>
> > *'set csmooth on'<br>
> > 'set lat 10'<br>
> > 'set lon 60'<br>
> > 'set map 1 1 6'<br>
> > 'set line 1 1 1'<br>
> > 'enable print temp'<br>
> > z = 1<br>
> > while (z <=12)<br>
> > 'set z' z<br>
> > lev=subwrd(result,4)<br>
> > 'define tmp1=t(z='z')'<br>
> > 'define tmp2=t(z='z+1')'<br>
> > 'define inver=tmp2-tmp1'<br>
> > 'd inver'<br>
> > inversion=subwrd(result,4)<br>
> > if inversion>0<br>
> > * say "inversion in time "tt " in level "lev<br>
> > res=write(hfile,'inversion in' tt' in level 'lev mb)<br>
> > endif<br>
> > z=z+1<br>
> > endwhile<br>
> > count = count + 4<br>
> > endwhile<br>
> > 'clear'<br>
> ><br>
> ><br>
> > But while running this script in GrADS it shows error<br>
> > message<br>
> ><br>
> > SET error: Invalid operand<br>
> > Operand = z1<br>
> > SET error: Invalid operand<br>
> > Operand = z2<br>
> > SET error: Invalid operand<br>
> > Operand = z3<br>
> > SET error: Invalid operand<br>
> > Operand = z4<br>
> > SET error: Invalid operand<br>
> > Operand = z5<br>
> > SET error: Invalid operand<br>
> > Operand = z6<br>
> > SET error: Invalid operand<br>
> > Operand = z7<br>
> > SET error: Invalid operand<br>
> > Operand = z8<br>
> > SET error: Invalid operand<br>
> > Operand = z9<br>
> > SET error: Invalid operand<br>
> > Operand = z10<br>
> > SET error: Invalid operand<br>
> > Operand = z11<br>
> > SET error: Invalid operand<br>
> > Operand = z12<br>
> > Metafile already open<br>
> > SET error: Invalid operand<br>
> > Operand = z1<br>
> > SET error: Invalid operand<br>
> > Operand = z2<br>
> > SET error: Invalid operand<br>
> > Operand = z3<br>
> > SET error: Invalid operand<br>
> > Operand = z4<br>
> > SET error: Invalid operand<br>
> > Operand = z5<br>
> > SET error: Invalid operand<br>
> > Operand = z6<br>
> > SET error: Invalid operand<br>
> > Operand = z7<br>
> > SET error: Invalid operand<br>
> > Operand = z8<br>
> > SET error: Invalid operand<br>
> > Operand = z9<br>
> > SET error: Invalid operand<br>
> > Operand = z10<br>
> > SET error: Invalid operand<br>
> > Operand = z11<br>
> > SET error: Invalid operand<br>
> > Operand = z12<br>
> > ga-><br>
> ><br>
> ><br>
> > Anybody has suggestion over this issue?<br>
> ><br>
> > Thanks in advance<br>
> ><br>
> ><br>
> > Sushant<br>
> ><br>
> ><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>
><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>
><br>
><br>
><br>
><br>
><br>
><br>
><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>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
--> 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>