CDAT – Marker – Circle is not real circle

Hai,

I am using CDAT – Climate Data Analysis And Tool for generating Change chart in Indian Meteorological Department, Chennai.

For that i need to plot a small circle.

While generating circle using marker script in cdat, it gives circle marker. But really it is not circle.

The code of that circle marker is made by joining many straight lines.

The following output is saved as svg and zoomed in by Inkscape and take it as screen shot.

Code For the above output

<pre>
# plotting marker
import vcs, cdms2, cdutil,os,sys,time
# Open data file:
filepath = os.path.join(sys.prefix, 'sample_data/clt.nc')
cdmsfile = cdms2.open( filepath )

# Extract a 3 dimensional data set and get a subset of the time dimension
#data = cdmsfile('clt', longitude=(-180, 180), latitude = (-180., 180.))
data = cdmsfile('clt', longitude=(60, 100), latitude = (0., 40.))   # for india

# Initial VCS.
v = vcs.init()

cf_asd = v.getboxfill( 'ASD' )
cf_asd.datawc(1e20,1e20,1e20,1e20) # change to default region

cf_asd.level_1=1e20          # change to default minimum level
cf_asd.level_2=1e20          # change to default maximum level
cf_asd.color_1=240         # change 1st color index value
cf_asd.color_2=240  # change 2nd color index value

v.plot( data,cf_asd,continents=6,bg=0)
v.update()

m=v.createmarker()
mytmpl=v.createtemplate()
m.viewport=[mytmpl.data.x1,mytmpl.data.x2,mytmpl.data.y1,mytmpl.data.y2] # this sets the area used for drawing
m.worldcoordinate=[60.,100.,0,40]
#use m.viewport and m.wordcoordinate to define you're area
m.type=['circle']
m.color=[250]#blue color

m.x=[160,80]
m.y=[40,20]

m.size=[15,]

v.plot(m,bg=0)
v.svg("/home/imdc/marker",width=22, height=32, units='cm')

I want to fix this bug by rewriting the source of CDAT marker.

Moreover i need to create weather symbols for IMD project.

Nearly 150 weather symbols i need to plot.

The weather symbols are . . .

The above image is taken from

http://aurora.aos.wisc.edu/~hoover/aos101S301/wxcode1.gif

I need to plot all the above 100 symbols, also need to plot 50 more  symbols with the shape of circle.

I searched in CDAT, upto my knowledge there is no option to plot the above symbols in CDAT.

If it is so, then i have to make it as like this.

I will make this as cdat vcs.addons . 🙂

Regards,

Arulalan.T

Advertisements

About arulalant

Currently working as "Project Scientist – C" in National Centre for Medium Range Weather Forecasting (NCMRWF), MoES, Noida, India
This entry was posted in Uncategorized. Bookmark the permalink.

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