SciPy and NetCDF

S

skilpat

I am going to be doing a lot of work with large data sets stored in
various netCDF files, and after checking out the alternatives, I would
really like to go with SciPy. The problem is that SciPy offers no
native netCDF support. I have checked out pycdf at
http://pysclint.sourceforge.net/pycdf/, but it requires Numerical
Python. Is there any way to get this working with SciPy without
installing more modules? The less my sysadmin has to install the
better. We are using Python 2.2.1 (and I don't know if upgrading is an
option).

Thanks in advance,
Scott
 
R

Rocco Moretti

I am going to be doing a lot of work with large data sets stored in
various netCDF files, and after checking out the alternatives, I would
really like to go with SciPy. The problem is that SciPy offers no
native netCDF support.

You may be having an issue because there is a difference between SciPy
[http://www.scipy.org/] and ScientificPython
[http://starship.python.net/~hinsen/ScientificPython/] - despite the
name similarity, they are not the same thing.
 
S

skilpat

Also, I am aware that ScientificPython offers netCDF support, but its
lack of robust documentation is a big downer. Plus we haven't been able
to successfully install it yet.

Scott
 
R

Robert Kern

I am going to be doing a lot of work with large data sets stored in
various netCDF files, and after checking out the alternatives, I would
really like to go with SciPy. The problem is that SciPy offers no
native netCDF support. I have checked out pycdf at
http://pysclint.sourceforge.net/pycdf/, but it requires Numerical
Python. Is there any way to get this working with SciPy without
installing more modules? The less my sysadmin has to install the
better. We are using Python 2.2.1 (and I don't know if upgrading is an
option).

Scipy requires Numeric, too.

--
Robert Kern
(e-mail address removed)

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
 
S

Scott Kilpatrick

So wherever pycdf does a:

from Numeric import *

what is the equivalent for SciPy? i.e. where is the full Numeric module
in SciPy?
 
R

Rocco Moretti

Scott said:
So wherever pycdf does a:

from Numeric import *

what is the equivalent for SciPy? i.e. where is the full Numeric module
in SciPy?

Python packages are in a pretty flat hierarchy. There really isn't a
"SciPy Numeric" and a "pycdf Numeric" - Numeric, as an independant
module, installs to pretty much the same location regardless of what
module has it as a dependancy. So "from Numeric import *" isn't
importing Numeric as a subpackage of pycdf, it is importing it from the
top level global package namespace.

That was a long way of saying that "from Numeric import *" in pycdf is
exactly the same as "from Numeric import *" in SciPy.

Note that the local/global import issue is subject to a
clarification/alteration in the near future - but for now we have to
live with a little ambiguity.
 
R

Robert Kern

Scott said:
So wherever pycdf does a:

from Numeric import *

what is the equivalent for SciPy? i.e. where is the full Numeric module
in SciPy?

Scipy also does a

from Numeric import *

Numeric isn't contained within Scipy; Scipy uses Numeric like pycdf does.

--
Robert Kern
(e-mail address removed)

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
 
S

Scott Kilpatrick

Oh ok, so if my sysadmin installs SciPy, then to get the netCDF support
we need he just needs to then install pycdf?

I really appreciate the help.
Scott
 
R

Robert Kern

Scott said:
Oh ok, so if my sysadmin installs SciPy, then to get the netCDF support
we need he just needs to then install pycdf?

1. Install Numeric.
2. Install Scipy.
3. Install pycdf.

Numeric is not, yet, bundled into Scipy.

--
Robert Kern
(e-mail address removed)

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
 
S

Scott Kilpatrick

Thanks for your help guys! That cleared some stuff up for me. Now I
just have to wait for the sysadmin to get back from his vacation, bah.

Scott
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top