Setup a python workspace to start working with satellite data

Published: 17 mars 2017

DMCA.com Protection Status

Python basic workspace installation to work with satellite data (MODIS, CALIOP, etc)

Install anaconda python distribution

To install python and an ensemble of very useful python libraries go to Anaconda python distribution. Click on graphical installer python 3.+ version and then double click on the package.

Setup a python workspace to start working with satellite data (1/2) Setup a python workspace to start working with satellite data (1/2)
Setup a python workspace to start working with satellite data (1/2)

Open the terminal and check the conda and python version:

Setup a python workspace to start working with satellite data (2/2) size:100
Setup a python workspace to start working with satellite data (2/2) size:100

Note: if you get "conda command not found" you need to update your PATH. Example in bash:

export PATH="/Users/bmarcha1/anaconda/bin:$PATH"

(to determine your shell: echo $SHELL, to change chsh -s /bin/bash)

Print the list of package installed:

conda list

returns

| |
------------- | ------------- | -------------
alabaster 0.7.9 |anaconda 4.3.1 |anaconda-client 1.6.0 |
anaconda-navigator 1.5.0 |anaconda-project 0.4.1 |appnope 0.1.0 |
appscript 1.0.1 |astroid 1.4.9 |astropy 1.3 |
babel 2.3.4 |backports 1.0 |beautifulsoup4 4.5.3 |
bitarray 0.8.1 |blaze 0.10.1 |bokeh 0.12.4 |
boto 2.45.0 |bottleneck 1.2.0 |cffi 1.9.1 |
chardet 2.3.0 |chest 0.2.3 |click 6.7 |
cloudpickle 0.2.2 |clyent 1.2.2 |colorama 0.3.7 |
conda 4.3.14 |conda-env 2.6.0 |configobj 5.0.6 |
contextlib2 0.5.4 |cryptography 1.7.1 |curl 7.52.1 |
cycler 0.10.0 |cython 0.25.2 |cytoolz 0.8.2 |
dask 0.13.0 |datashape 0.5.4 |decorator 4.0.11 |
dill 0.2.5 |docutils 0.13.1 |entrypoints 0.2.2 |
et_xmlfile 1.0.1 |fastcache 1.0.2 |flask 0.12 |
flask-cors 3.0.2 |freetype 2.5.5 |get_terminal_size 1.0.0 |
gevent 1.2.1 |greenlet 0.4.11 |h5py 2.6.0 |
hdf5 1.8.17 |heapdict 1.0.0 |icu 54.1 |
idna 2.2 |imagesize 0.7.1 |ipykernel 4.5.2 |
ipython 5.1.0 |ipython_genutils 0.1.0 |ipywidgets 5.2.2 |
isort 4.2.5 |itsdangerous 0.24 |jbig 2.1 |
jdcal 1.3 |jedi 0.9.0 |jinja2 2.9.4 |
jpeg 9b |jsonschema 2.5.1 |jupyter 1.0.0 |
jupyter_client 4.4.0 |jupyter_console 5.0.0 |jupyter_core 4.2.1 |
lazy-object-proxy 1.2.2 |libiconv 1.14 |libpng 1.6.27 |
libtiff 4.0.6 |libxml2 2.9.4 |libxslt 1.1.29 |
llvmlite 0.15.0 |locket 0.2.0 |lxml 3.7.2 |
markupsafe 0.23 |matplotlib 2.0.0 |mistune 0.7.3 |
mkl 2017.0.1 |mkl-service 1.1.2 |mpmath 0.19 |
multipledispatch 0.4.9 |nbconvert 4.2.0 |nbformat 4.2.0 |
networkx 1.11 |nltk 3.2.2 |nose 1.3.7 |
notebook 4.3.1 |numba 0.30.1 |numexpr 2.6.1 |
numpy 1.11.3 |numpydoc 0.6.0 |odo 0.5.0 |
openpyxl 2.4.1 |openssl 1.0.2k |pandas 0.19.2 |
partd 0.3.7 |path.py 10.0 |pathlib2 2.2.0 |
patsy 0.4.1 |pep8 1.7.0 |pexpect 4.2.1 |
pickleshare 0.7.4 |pillow 4.0.0 |pip 9.0.1 |
ply 3.9 |prompt_toolkit 1.0.9 |psutil 5.0.1 |
ptyprocess 0.5.1 |py 1.4.32 |pyasn1 0.1.9 |
pycosat 0.6.1 |pycparser 2.17 |pycrypto 2.6.1 |
pycurl 7.43.0 |pyflakes 1.5.0 |pygments 2.1.3 |
pylint 1.6.4 |pyopenssl 16.2.0 |pyparsing 2.1.4 |
pyqt 5.6.0 |pytables 3.3.0 |pytest 3.0.5 |
python 3.6.0 |python-dateutil 2.6.0 |python.app 1.2 |
pytz 2016.10 |pyyaml 3.12 |pyzmq 16.0.2 |
qt 5.6.2 |qtawesome 0.4.3 |qtconsole 4.2.1 |
qtpy 1.2.1 |readline 6.2 |redis 3.2.0 |
redis-py 2.10.5 |requests 2.12.4 |rope 0.9.4 |
ruamel_yaml 0.11.14 |scikit-image 0.12.3 |scikit-learn 0.18.1 |
scipy 0.18.1 |seaborn 0.7.1 |setuptools 27.2.0 |
simplegeneric 0.8.1 |singledispatch 3.4.0.3 |sip 4.18 |
six 1.10.0 |snowballstemmer 1.2.1 |sockjs-tornado 1.0.3 |
sphinx 1.5.1 |spyder 3.1.2 |sqlalchemy 1.1.5 |
sqlite 3.13.0 |statsmodels 0.6.1 |sympy 1.0 |
terminado 0.6 |tk 8.5.18 |toolz 0.8.2 |
tornado 4.4.2 |traitlets 4.3.1 |unicodecsv 0.14.1 |
wcwidth 0.1.7 |werkzeug 0.11.15 |wheel 0.29.0 |
widgetsnbextension 1.2.6 |wrapt 1.10.8 |xlrd 1.0.0 |
xlsxwriter 0.9.6 |xlwings 0.10.2 |xlwt 1.2.0 |
xz 5.2.2 |yaml 0.1.6 |zlib 1.2.8 |

A lot of useful packages that we will need to do some data analysis are installed (such as matplotlib, pandas, numpy, scipy, scikit-learn,scikit-image,...) but some are missing and need to be installed such as (netcdf4, pyhdf or basemap):

Install netcdf4 package

To read the netcdf4 data format we need to install the python netcdf4 package:

conda install -c anaconda netcdf4=1.2.4

Install pyhdf package

To read hdf4 data format, download the pyhdf package here, open a terminal, go to the pyhdf-0.9.0 folder and execute the command

python setup.py install

Install basemap package

To plot some map we need the basemap package

conda install -c anaconda basemap=1.0.7

virtualenvs

Warning: Installing new python package can be tricky because you might break some package dependencies. To avoid that, consider using python Virtual Environments.

References

Image

of