<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
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>
On 4/4/12 9:02 PM, sushant puranik wrote:
<blockquote
cite="mid:CAOXKaKB0UPan6evnDdWNNW3JTQfTbETavd+jw5r8JGFhkRxAzA@mail.gmail.com"
type="cite">Hi<br>
I am trying to find the inversion layer with the help of 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 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>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
gradsusr mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>
<a class="moz-txt-link-freetext" href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a>
</pre>
</blockquote>
</body>
</html>