[Image-SIG] Help for to do a script
wrybread at gmail.com
Fri Mar 16 20:05:02 CET 2012
There's a lot wrong with it. I don't have the modules so I can't test, but
you need to chnage these two lines:
if (data[i][j] > 199.5 and (data[i][j] < 200.5
count = count + 1;
To something like:
if data[i][j] > 199.5 and data[i][j] < 200.5:
count = count + 1;
That's about very basic Python syntax, not the Image module, fyi.
Also, cross-posting to multiple email lists is considered very bad form.
On Fri, Mar 16, 2012 at 11:52 AM, Boris Vladimir Comi <
glez_b at comunidad.unam.mx> wrote:
> Hello, I am writing to request your help in the realization of a script.
> I am new to this and I'm just learning the wonderful world of python and
> this has made me a little difficult.
> Briefly I commented what I intend to do:
> 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:
> unidata2.ssec.wisc.edu and data format is: 200404271515.goes12ir (Area
> The first thing to do is detect a convective system in the satellite data,
> using the following characteristics:
> *MCS Criteria*
> *Minimum Size*: Continuous cold cloud shield (TIR <219 K and Must Have an
> area> 34000 km ²)
> *Duration*: Definition of Minimum Size Must Be A Period of Exceed or ≥ 3h
> *Initiation*: Time When the Minimum Size is met
> Maximum Extention*: Time when the continuous cloud shield (TIR <219 K) is
> at its maximum size
> *Termination:* When the Time Minimun Size is not satisfied
> where: Temperature Infrarred is TIR
> To achieve this, first I created a script in python to identify a MCS in my
> database (script in attached)
> The script is run from a linux terminal ($ python TIR.py), to run it I get the
> following error:
> *File "/home/mcidasv/JYTHON/TIR.py", line 22
> count = count + 1;
> SyntaxError: invalid syntax*
> If anyone can help me with this script or any idea you suggest to improve
> it, I would greatly appreciate.
> ****Boris Vladimir Comi Gonzalez
> Universidad Nacional Autónoma de México
> Grupo de Tormentas Convecivas
> Image-SIG maillist - Image-SIG at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Image-SIG