Setting up Contour Module in CDAT 5.2

Hi ,

During analysis about contour plotting tools for my project , i searched in Internet . I got few tools such as CDAT , Matplotlib and Mayavi.

First i tried to install CDAT in , ubuntu 9.10.

After successfully installed it , i very much tried to setup contour module with cdms in cdat.

But during upgrade of cdat from cdat 4.3 to cdat 5.2 , the cdat developers changed many supporting modules.

The upgraded changes are in

cdms to cdms2

numeric into numpy

and in Masked Array , etc.,

so i found the version conflict and i solved those problems.

Do the following steps to use contour.py module to draw contour using cdat 5.2.

Contour Module in CDAT 5.2

Download the contour.py module from the below link :

http://www.johnny-lin.com/py_pkgs/IaGraph/Doc/contour.html

we need to edit few lines because of cdms version upgraded in cdat 5.2.

comment the following lines at 41 from contour.py

import IaGraph_version

__version__ = IaGraph_version.version

del IaGraph_version

comment @193

#import MA

and add the following

import numpy.ma as MA

comment @ 195

#import Numeric as N

and add the following

import numpy as N

comment @ 196

#import cdms ,vcs

add the folowwing

import cdms2 as cdms

import vcs

Edit the following line @ 226

if MA.isMA(data) ==1:

if MA.isMA(data) ==0: # change from 1 to 0

Now we can run the contour module using cdms in cdat. !

or

download the modified “contour.py” from

http://pastebin.com/fad87374

i uploaded , the “contour.py” which is modified very slightly and its suitable for cdat 5.2 .

or

download the modified contour.py module in pdf format from here

http://www.slideshare.net/arulalan/contourpy-module

அருளாளன் . த

Advertisements

One response to this post.

  1. […] Table Of Contents « Setting up Contour Module in CDAT 5.2 […]

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: