Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install puppy

How to install Puppy

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install puppy
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.1.4
0.1.6Never BuiltWhy not?
0.1.4 Available View build log
Windows (64-bit)
0.1.4
0.1.6Never BuiltWhy not?
0.1.4 Available View build log
Mac OS X (10.5+)
0.1.4
0.1.6Never BuiltWhy not?
0.1.4 Available View build log
Linux (32-bit)
0.1.4
0.1.6Never BuiltWhy not?
0.1.4 Available View build log
Linux (64-bit)
0.1.6 Available View build log
0.1.4 Available View build log
 
License
MIT
Dependencies
Imports
Lastest release
version 0.1.6 on Jan 9th, 2014

A DSL for creating NetCDF files. Here's a simple example:

from pup import *

class Test(NetCDF):
    # NC_GLOBAL attributes go here
    history = 'Created for a test'

    # dimensions need to be set explicitly only when they
    # have no variable associated with them
    dim0 = Dimension(2)

    # variables that don't specify dimensions are assumed to
    # be their own dimension
    time = Variable(range(10), record=True, units='days since 2008-01-01')

    # now a variable with dimensions (time,)
    temperature = Variable(range(10), (time,), units='deg C')

Test.save('simple.nc')

This will produce the following NetCDF file:

netcdf simple {
dimensions:
    dim0 = 2 ;
    time = UNLIMITED ; // (10 currently)
variables:
    int time(time) ;
        time:units = "days since 2008-01-01" ;
    int temperature(time) ;
        temperature:units = "deg C" ;

// global attributes:
        :history = "Created for a test" ;
data:

 time = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ;

 temperature = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ;
}

By default it uses pupynere for creating files, but this can be overloaded; we can use the netCDF4 module, for example, which allows us to specify groups:

from netCDF4 import Dataset

class Test(NetCDF):
    loader = Dataset
    ...

    foo = Group(
        dim = Dimension(10),
        var = Variable(range(10)),
        ...
    )
Test.save('simple.nc', format='NETCDF4')

Changelog:

0.1.6:Fix bug in dimension name.
0.1.5:Added support for Groups when using netcdf4.
0.1.4:Added support for masked arrays.
0.1.3:Pass keyword arguments in save() to the loader.
0.1.2:Improved optional loader detection.
0.1.1:Added pupynere dependency.
0.1:Initial release.

Subscribe to package updates

Last updated Jan 9th, 2014

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.