There&#39;s a lot wrong with it. I don&#39;t have the modules so I can&#39;t test, but you need to chnage these two lines:<br><br>              if (data[0][i][j] &gt; 199.5 and (data[0][i][j] &lt; 200.5<div class="im"><br>
                  count = count + 1;<br>
<br></div>To something like:<br><br>              if data[0][i][j] &gt; 199.5 and data[0][i][j] &lt; 200.5:<div class="im"><br>                  count = count + 1;<br><br></div>That&#39;s about very basic Python syntax, not the Image module, fyi.<br>

<br>Also, cross-posting to multiple email lists is considered very bad form.<br><br><br><br><br><div class="gmail_quote">On Fri, Mar 16, 2012 at 11:52 AM, Boris Vladimir Comi <span dir="ltr">&lt;<a href="mailto:glez_b@comunidad.unam.mx">glez_b@comunidad.unam.mx</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr">
<font style="font-size:8pt" size="1">Hello, I am writing to request your help in the realization of a script. I am new to this and I&#39;m just learning the wonderful world of python and this has made me a little difficult.<br>
<br>Briefly I commented what I intend to do:<br><br>I detect a class of atmospheric phenomena known as Mesoscale Convective Systems (MCS). To accomplish this, I have a database of satellites by 2004, every half hour. These data were downloaded from the server: <a href="http://unidata2.ssec.wisc.edu" target="_blank">unidata2.ssec.wisc.edu</a> and data format is: 200404271515.goes12ir (Area Format)<br>
<br>The first thing to do is detect a convective system in the satellite data, using the following characteristics:<br><br><b><font color="#548DD4"><u>MCS Criteria</u></font></b><br><br><b>Minimum Size</b>: Continuous cold cloud shield (TIR &lt;219 K and Must Have an area&gt; 34000 km ²)<br>
<br><b>Duration</b>: Definition of Minimum Size Must Be A Period of Exceed or ≥ 3h<br><br><b>Initiation</b>: Time When the Minimum Size is met<br><b><br>Maximum Extention</b>: Time when the continuous cloud shield (TIR &lt;219 K) is at its maximum size<br>
<br><b>Termination:</b> When the Time Minimun Size is not satisfied<br><br>where: Temperature Infrarred is TIR<br><br></font><span lang="en"><span>To</span> <span>achieve this</span><span>, first I</span> <span>created a</span> <span>script</span> <span>in</span> <span>python</span> <span>to identify a</span> <span>MCS</span> <span>in</span> <span>my database</span></span> (script in attached)<br>
<font style="font-size:8pt" size="1"><br></font><span lang="en"><span>The</span> <span>script is</span> <span>run</span> <span>from a</span> <span>linux</span> <span>terminal</span> <span>($</span> <span>python</span> <span>TIR.py</span><span>),</span> <span>to</span> <span>run it</span> <span>I get</span> <span>the following error</span></span>:<br>
<br><font style="font-size:8pt" size="1"><br></font><b>File &quot;/home/mcidasv/JYTHON/TIR.py&quot;, line 22<br>    count = count + 1;<br>        ^<br>SyntaxError: invalid syntax</b><br><br> If anyone can help me with this script or any idea you suggest to improve it, I would greatly appreciate.<span class="HOEnZb"><font color="#888888"><br>
<br><br><br><font style="font-size:8pt" size="1"><font face="Comic Sans MS"><font style="font-size:12pt"><font color="#5f497a"><b></b></font></font></font></font><font color="#5f497a"><font style="font-size:8pt" size="1"><b><b><font face="Comic Sans MS"></font></b></b></font>Boris Vladimir Comi Gonzalez<br>
Universidad Nacional Autónoma de México<br>Grupo de Tormentas Convecivas<br></font>                                               </font></span></div></div>
<br>_______________________________________________<br>
Image-SIG maillist  -  <a href="mailto:Image-SIG@python.org">Image-SIG@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/image-sig" target="_blank">http://mail.python.org/mailman/listinfo/image-sig</a><br>
<br></blockquote></div><br>