cablab
- Public CAB-LAB APIcablab.cube
- Data Cube Generation and Access (protected, public parts expr)cablab.cube_cli
- Command-line interface (protected)cablab.util
- Common utility functions (protected)
Find the CAB-LAB documentation here.
Adhere to PEP-8!
Only place TODOs in source code when you have an according issue on GitHub. Mention the issue number in the TODO text. When fixing a TODO, mention the issue in the commit message.
Test code in the test
and test/providers
directories should only use libraries that are anyway used by the
production code in src
. If you want to check out new libraries for appropriateness please do so in the
test/sandbox
directory.
cablab.image_providers
: key = class derived fromcablab.ImageProvider
cablab.image_providers
: *'burnt_area = cablab.providers.burnt_area.BurntAreaProvider'
console_scripts
: *'cablab_cli = cablab.cli:main'
, see %PYTHON_HOME%/Scripts/cablab_cli (*.exe on Windows) after installation
Development mode installation:
> python setup.py develop
or real installation:
> python setup.py install
Create a file cablab-config.py
in your project root directory or your current working directory and add the
following entry:
cube_sources_root = <your local cube source directory>
To generate a default data cube with a 0.25 degree resolution and variables 'BurntArea', 'C_Emmisions', Ozone',
'Precip' call the cube-gen
tool:
> cube-gen testcube burnt_area:dir=BurntAreaDir c_emissions:dir=EmissionsDir ozone:Ozone-CCI/Total_Columns/L3/MERGED precip:dir=CPC_precip
It's usage is:
> cube-gen <cube-dir> [<provider-key>:dir=<source-path> ...]
If you use Windows, get the Python wheels from Christoph Gohlke's website at http://www.lfd.uci.edu/~gohlke/pythonlibs/. Install them using:
> pip install <wheel-file>
- netCDF4 >= 1.2
- numpy >= 1.9
- gridtools