[Image-SIG] Help for to do a script

Chris Barker chris.barker at noaa.gov
Mon Mar 19 22:53:08 CET 2012

1) please don't multi-post like this -- this is really a "tutor"
question. i.e. your problem is very basic python

On Fri, Mar 16, 2012 at 11:52 AM, Boris Vladimir Comi
<glez_b at comunidad.unam.mx> wrote:
> 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
> Format)

For this kind of work, you probably:

1) don't want to use Jython, unless there is a Java libary that will
do most of the work that you want to use

2) do want to use numpy/scipy -- and likely the ndimage package:



> File "/home/mcidasv/JYTHON/TIR.py", line 22
>     count = count + 1;

debuggin hint -- when the error is not obvious, ALWAYS look at the
proceeding line(s) of code:

         for j in xrange(ad.getElements()):
              if (data[0][i][j] > 199.5 and (data[0][i][j] < 200.5
                  count = count + 1;

the "if" needs two more end-parentheses, and a colon.

Also -- don't use semi-colons at the end of line -- they will just confuse you.

Get a good Python-aware editor -- it will help catch these really
simple kinds of syntax errors for you.

Good luck,



Christopher Barker, Ph.D.

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov

More information about the Image-SIG mailing list