Diva python

From GHER

Jump to: navigation, search

This set of python tool are designed for helping the users to produce graphics based on the output obtained using DIVA. Note that they are basic and general examples of how graphics can be produced. In order to customize your figures, it will be necessary to modify the routines provided.

Contents

Installation

Download and extract the archive Diva_Python_tools_v1.1.tar.gz

tar -xvf Diva_Python_tools_v1.1.tar.gz

To have example files to test, extract the files from Diva_matlab_example.tar.gz (the same files used in the for the matlab plotting toolbox) inside the python directory:

cd Diva_Python_tools_v1.1
tar -xvf Diva_matlab_example.tar.gz

Examples of figures you can obtain are copied in directory figures with the extension _ref.png (same as those on the right-hand side of this page).

Previous releases

Prerequisites

Along with Python, it is necessary to install:

The first three items are readily available with recent Linux distributions. The NetCDF interface requires a manual installation.

sha1sum netCDF4-1.0.4.tar.gz 
cd1735a69446e558ba55034f184ee5f3d44d1a44  netCDF4-1.0.4.tar.gz
tar -xvf netCDF4-1.0.4.tar.gz 
cd netCDF4-1.0.4
  • Follow the instruction written in file README:
python setup.py build
python setup.py install

Description

Routine Utility
diva_plot_contour.py Plot the contour
diva_plot_mesh.py Plot the mesh
diva_plot_data.py Plot the data values
diva_plot_results.py Plot the analyzed field

Usage

Edit the files if necessary and run Python (either in a shell, or using a Python editor).

python diva_plot_mesh.py

By default, the figure(s) should be available in the figures/ directory inside the directory containing the diva python tools.


Personal tools