Fortran array in python (f2py?)...

2009-02-13 Thread tripp
Hello Folks,

I have a fortran program I use to process several satellite images.  I
currently output the results to a text file (~750 mb) which is then
read by a perl program that outputs a GIS-ready image using GDAL
(www.gdal.org).   There are python libraries for GDAL too.

I'd like to pipe the array directly to python from fortran (instead of
writing it out to a text file).  Is it possible to access an in-memory
fortran array with python?

I've looked at f2py, but I could not tell if this was possible.

Thanks.
-TLowe



--
http://mail.python.org/mailman/listinfo/python-list


Re: Fortran array in python (f2py?)...

2009-02-13 Thread tripp
On Feb 13, 1:27 pm, MRAB  wrote:
> tripp wrote:
> > Hello Folks,
>
> > I have a fortran program I use to process several satellite images.  I
> > currently output the results to a text file (~750 mb) which is then
> > read by a perl program that outputs a GIS-ready image using GDAL
> > (www.gdal.org).   There are python libraries for GDAL too.
>
> > I'd like to pipe the array directly to python from fortran (instead of
> > writing it out to a text file).  Is it possible to access an in-memory
> > fortran array with python?
>
> > I've looked at f2py, but I could not tell if this was possible.
>
> How about outputting the results to the Python program via a pipe?

The array I'd like to output is 8500 x 7500.  Would that be possible?
I'm NOT RAM limited.
--
http://mail.python.org/mailman/listinfo/python-list


Re: Fortran array in python (f2py?)...

2009-02-14 Thread tripp
OK.  It sounds like it would be easiest for me, then, to dump the
arrays to a binary file (much faster than dumping it to a text) from
the fortran program.  Then use f2py to load a fortran module to read
it.?.

How well does python handle binary files?  Maybe I could skit the f2py
all together if I can get python to read the fortran binary file...

-TLowe
--
http://mail.python.org/mailman/listinfo/python-list