1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193
|
CF Python
=========
The cf python package implements the CF data model for the reading,
writing and processing of data and metadata.
----------------------------------------------------------------------
Home page
=========
[**cf-python**](http://cfpython.bitbucket.org)
----------------------------------------------------------------------
Documentation
=============
* [**Online documentation for the latest stable
release**](http://cfpython.bitbucket.org/docs/latest/ "cf-python
documentation")
* Online documentation for previous releases: [**cf-python documention
archive**](http://cfpython.bitbucket.org/docs/archive.html)
* Offline documention for the installed version may be found by
pointing a browser to ``docs/build/index.html``.
* [**Change log**](https://bitbucket.org/cfpython/cf-python/src/master/Changelog.md)
----------------------------------------------------------------------
Dependencies
============
* **Required:** A
[**GNU/Linux**](http://www.gnu.org/gnu/linux-and-gnu.html) or [**Mac
OS**](http://en.wikipedia.org/wiki/Mac_OS) operating system.
* **Required:** A [**python**](http://www.python.org) version from 2.6 up
to, but not including, 3.0.
* **Required:** The [**python psutil
package**](https://pypi.python.org/pypi/psutil) at version 0.6.0 or
newer (the latest version is recommended).
* **Required:** The [**python numpy
package**](https://pypi.python.org/pypi/numpy) at version 1.7 or
newer.
* **Required:** The [**python matplotlib
package**](https://pypi.python.org/pypi/matplotlib) at version 1.4.2
or newer.
* **Required:** The [**python netCDF4
package**](https://pypi.python.org/pypi/netCDF4) at version 1.1.1 or
newer, **but not version 1.2**. This package requires the
[**netCDF**](http://www.unidata.ucar.edu/software/netcdf),
[**HDF5**](http://www.hdfgroup.org/HDF5) and
[**zlib**](ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4)
libraries.
* **Required:** The [**UNIDATA Udunits-2
library**](http://www.unidata.ucar.edu/software/udunits). This is a
C library which provides support for units of physical
quantities. If The Udunits-2 shared library file
(``libudunits2.so.0`` on GNU/Linux or ``libudunits2.0.dylibfile`` on
Mac OS) is in a non-standard location then its path should be added
to the ``LD_LIBRARY_PATH`` environment variable.
* **Optional:** For regridding to work, the [**ESMF
package**](https://www.earthsystemcog.org/projects/esmf) at version
7.0.0 or newer is required. If this package is not installed then
regridding will not work, but all other cf-python functionality will
be unaffected. ESMF may be installed via
[**conda**](http://conda.pydata.org/docs) (see below) or from source
(see the file [**ESMF.md**](ESMF.md) for instructions).
* **Optional:** The [**cf-plot
package**](https://pypi.python.org/pypi/cf-plot) at version 1.9.10
or newer provides metadata-aware visualisation for cf-python
fields. This is not a dependency for cf-python.
----------------------------------------------------------------------
Installation
============
* To install version 1.2.1 by [**conda**](http://conda.pydata.org/docs):
conda install -c ncas -c scitools cf-python cf-plot
conda install -c nesii esmpy
These two commands will install cf-python, all of its required
dependencies and the two optional packages cf-plot (for
visualisation) and ESMF (for regridding). To install cf-python and
all of its required dependencies alone:
conda install -c ncas -c scitools cf-python
To update cf-python, cf-plot and ESMF to the latest versions::
conda update -c ncas -c scitools cf-python cf-plot
conda update -c nesii esmpy
* To install the **latest** version from
[**PyPI**](https://pypi.python.org/pypi/cf-python):
pip install cf-python
* To install from source:
1. Download the cf package from [**cf-python
downloads**](https://bitbucket.org/cfpython/cf-python/downloads).
2. Unpack the library:
tar zxvf cf-python-1.3.2.tar.gz
cd cf-python-1.3.2
3. Install the package:
* To install the cf package to a central location:
python setup.py install
* To install the cf package locally to the user in a default
location:
python setup.py install --user
* To install the cf package in the ``<directory>`` of your
choice:
python setup.py install --home=<directory>
----------------------------------------------------------------------
Tests
=====
The test scripts are in the ``test`` directory. To run all tests:
python test/run_tests.py
----------------------------------------------------------------------
Command line utilities
======================
The ``cfdump`` tool generates text representations on standard output
of the CF fields contained in the input files.
The ``cfa`` tool creates and writes to disk the CF fields contained in
the input files.
During the installation described above, these scripts will be copied
automatically to a location given by the ``PATH`` environment
variable.
For usage instructions, use the ``-h`` option to display the manual
pages:
cfdump -h
cfa -h
----------------------------------------------------------------------
Code license
============
[**MIT License**](http://opensource.org/licenses/mit-license.php)
* Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
|