Postprocessing

Plotting with NCL

TODO

Plotting with matplotlib

Matplotlib is only used for ASCII data at the moment. It contains all the needed projections. To run the scripts, you will need : matplotlib (latest), basemap (latest), scipy.

Go in the plot/python folder. lib_plot.py contains all necessary functions. plot.py is the part where you can modify the figure title and file name. For the rest, the command line should be enough :

$  python plot.py -p mill -f mydata.dat -i

Here is a description of the command-line arguments:

-i this option activates interpolation for contour plotting
-p mill set a projection (miller, ortho, zoom_ortho, npolar, spolar). If it is not set, the plot will be done on a (lon, lat) plane.
-f mydata.dat
It must be on the format `value lat lon`. Or if it contains winds, `u v lat lon`.

Plotting is done with scattered points by default.

Plotting with Cairo

A small program for fast plotting in the (lon, lat) plane. Go in `plot/cairo` and run :

$ ./plot_grid mydata.dat output.grid

Data must contains the cell value and its corners. If you generate data with the python script, you can change the cell format. With the fortran code, you cannot at the moment.

If the value is a float, it will be interpreted as the cell ratio and use a colormap. If it is an integer, it will be read as the partition ID and use a custom color scale.