Skip to main content

numpy array with grids and associated operations

Project description

Python Spacegrids will solve your problem of having to customize your Python scripts for every new data analysis project by providing an object data model of Netcdf data that ensures consistency between the data and their grid under common operations (and so avoiding common pitfalls related to axis interpretation), and much more. It is a write less do more library for everyday use to enhance productivity.

The Field, Gr (grid) and Coord objects make everyday use easy:

>>> import spacegrids as sg
>>> D = sg.info(nonick = True)
>>> P = sgPproject(D['my_project'] , nonick = True)
>>> P.load(['temperature','u'])
>>> # obtain the axes under their names T,X,Y,Z in namespace:
>>> for c in P['some_experiment'].axes:
>>>   exec c.name + ' = c'
>>> TEMP = P['some_experiment']['temperature']
>>> U = P['some_experiment']['u'] # zonal velocity
>>> TEMP_sliced = TEMP[Y,:50] # slice in Y-direction
>>> m_TEMP = TEMP_sliced/(X*Y) # take zonal mean
>>> TEMP_regridded = TEMP.regrid(U.gr)  # U on different grid

Features

  • A numpy array with grid allowing automatic alignment and dimension broadcasting
  • Easy to use and intuitive regridding functionality
  • A data object model corresponding closely to Netcdf
  • Easier IO via abstraction of IO with multiple Netcdf files
  • Makes working with output of many experiments easy via aggregation methods
  • The Field class eliminates errors arising from picking the wrong array index
  • Quicker plotting due to automatic labels, axes etc.
  • Distance-related methods such as spatial differentiation and integration on sphere
  • Extensive unit tests and documentation

There is lots of documentation, both in the source code and elsewhere. Other documentation can be found at:

Installation

Install spacegrids simply by running (on command line):

pip install spacegrids

On Mac, pip can be installed via “sudo easy_install pip”. On Ubuntu/ Debian, install dependencies via package manager if pip install fails:

apt-get install python-{tk,numpy,matplotlib,scipy}

Contribute

  • Issue Tracker: github.com/willo12/spacegrids/issues
  • Source Code: github.com/willo12/spacegrids

Support

If you are having issues, please let us know.

License

The project is licensed under the BSD license.

Project details


Release history Release notifications

History Node

1.9

History Node

1.8

History Node

1.7.1

History Node

1.7

History Node

1.6.31

History Node

1.6.30

History Node

1.6.29

History Node

1.6.28

History Node

1.6.27

History Node

1.6.26

History Node

1.6.25

History Node

1.6.24

History Node

1.6.23

History Node

1.6.22

History Node

1.6.20

History Node

1.6.19

History Node

1.6.18

History Node

1.6.17

History Node

1.6.15

History Node

1.6.14

History Node

1.6.13

History Node

1.6.12

History Node

1.6.11

History Node

1.6.10

This version
History Node

1.6.9

History Node

1.6.8

History Node

1.6.7

History Node

1.6.6

History Node

1.6.5

History Node

1.6.4

History Node

1.6.3

History Node

1.6.2

History Node

1.6.1

History Node

1.6.0

History Node

1.5.2

History Node

1.5.1

History Node

1.5.0

History Node

1.4.10

History Node

1.4.9

History Node

1.4.8

History Node

1.4.7

History Node

1.4.6

History Node

1.4.5

History Node

1.4.4

History Node

1.4.3

History Node

1.4.2

History Node

1.4.1

History Node

1.4.0

History Node

1.3.0

History Node

1.2.2

History Node

1.2.1

History Node

1.2.0

History Node

1.1.6

History Node

1.1.5

History Node

1.1.4

History Node

1.1.3

History Node

1.1.2

History Node

1.1.1

History Node

1.1.0

History Node

1.0.9

History Node

1.0.8

History Node

1.0.7

History Node

1.0.6

History Node

1.0.5

History Node

1.0.4

History Node

1.0.3

History Node

1.0.2

History Node

1.0.1

History Node

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
spacegrids-1.6.9-py2.7.egg (238.6 kB) Copy SHA256 hash SHA256 Egg 2.7 Aug 22, 2014
spacegrids-1.6.9.tar.gz (84.9 kB) Copy SHA256 hash SHA256 Source None Aug 22, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page