Commits

Roberto De Almeida committed b85ed2c

More work on the documentation.

Comments (0)

Files changed (1)

 Pupynere
 ====================================
 
-This module is used to read and create NetCDF files. NetCDF files are
-accessed through the `netcdf_file` object. Data written to and from NetCDF
-files are contained in `netcdf_variable` objects. Attributes are given
-as member variables of the `netcdf_file` and `netcdf_variable` objects.
+This is a Python implementation of the `NetCDF specification <http://www.unidata.ucar.edu/software/netcdf/docs/netcdf.html#NetCDF-Classic-Format>`_ written from scratch. The name started as a tongue-in-cheek joke, being a contraction of PUre PYthon NEtcdf REader. Since the module is written in pure Python there's no need to compile and link it against Unidata's NetCDF library, so this small module became somewhat popular before a more serious name could be found. The module is now also a NetCDF *writer*, so it can be used to create files.
 
-Notes
------
-NetCDF files are a self-describing binary data format. The file contains
-metadata that describes the dimensions and variables in the file. More
-details about NetCDF files can be found `here
-<http://www.unidata.ucar.edu/software/netcdf/docs/netcdf.html>`_. There
-are three main sections to a NetCDF data structure:
+Pupynere implements the same API as other NetCDF modules such as `Scientific.IO.NetCDF <http://dirac.cnrs-orleans.fr/ScientificPython/ScientificPythonManual/Scientific.IO.NetCDF-module.html>`_, `pynetcdf <http://pypi.python.org/pypi/pynetcdf/>`_, `netCDF4-python <http://code.google.com/p/netcdf4-python/>`_ and `scipy.io.netcdf <http://docs.scipy.org/doc/scipy/reference/generated/scipy.io.netcdf.netcdf_file.html>`_ (which is based on Pupynere). If you want to use a more Pythonic API to create NetCDF files, take a look at `Puppy <http://pypi.python.org/pypi/Puppy/>`_.
 
-1. Dimensions
-2. Variables
-3. Attributes
-
-The dimensions section records the name and length of each dimension used
-by the variables. The variables would then indicate which dimensions it
-uses and any attributes such as data units, along with containing the data
-values for the variable. It is good practice to include a
-variable that is the same name as a dimension to provide the values for
-that axes. Lastly, the attributes section would contain additional
-information such as the name of the file creator or the instrument used to
-collect the data.
-
-When writing data to a NetCDF file, there is often the need to indicate the
-'record dimension'. A record dimension is the unbounded dimension for a
-variable. For example, a temperature variable may have dimensions of
-latitude, longitude and time. If one wants to add more temperature data to
-the NetCDF file as time progresses, then the temperature variable should
-have the time dimension flagged as the record dimension.
-
-This module implements the Scientific.IO.NetCDF API to read and create
-NetCDF files. The same API is also used in the PyNIO and pynetcdf
-modules, allowing these modules to be used interchangeably when working
-with NetCDF files. The major advantage of this module over other
-modules is that it doesn't require the code to be linked to the NetCDF
-libraries.
-
-In addition, the NetCDF file header contains the position of the data in
-the file, so access can be done in an efficient manner without loading
-unnecessary data into memory. It uses the ``mmap`` module to create
-Numpy arrays mapped to the data on disk, for the same purpose.
+Even though it is written in Python, Pupynere can efficiently access large NetCDF files since the header will contain the position of the data in the file. This allows the module too ``mmap()`` the data, creating Numpy arrays mapped directly to the data on disk, so that only the data used is read into memory.
 
 Examples
 --------
 
 .. doctest::
 
+    >>> from pupynere import netcdf_file
     >>> f = netcdf_file('simple.nc', 'w')
     >>> f.history = 'Created for a test'
     >>> f.location = u'北京'
     >>> time.units = u'µs since 2008-01-01'
     >>> f.close()
 
-Note the assignment of ``range(10)`` to ``time[:]``.  Exposing the slice
-of the time variable allows for the data to be set in the object, rather
-than letting ``range(10)`` overwrite the ``time`` variable.
+Note the assignment of ``range(10)`` to ``time[:]``.  Exposing the slice of the time variable allows for the data to be set in the object, rather than letting ``range(10)`` overwrite the ``time`` variable.
 
 To read the NetCDF file we just created:
 
     9
     >>> f.close()
 
+Installation
+------------
 
-Contents:
+You can install the latest version (|release|) using `pip <http://pypi.python.org/pypi/pip>`_. After `installing pip <http://www.pip-installer.org/en/latest/installing.html>`_ you can install Pupynere with this command:
+
+.. code-block:: bash
+
+    $ pip install Pupynere
+
+This will install Pupynere together with Numpy.
+
+Help
+----
+
+If you need any help with Pupynere, please feel free to send an email to the `mailing list <http://groups.google.com/group/pupynere/>`_. You can also open an issue at the `repository <http://code.dealmeida.net/pupynere>`_.
+
+Documentation
+-------------
 
 .. toctree::
    :maxdepth: 2