Re: Fw: plot circle in contour map

From: Arindam Chakraborty <arch_at_nyahnyahspammersnyahnyah>
Date: Thu May 24 2012 - 23:19:05 MDT

hi Juki Juki,
 see the attached procedure circle_ll() that can draw a circle on a plot on
specification of its center and radius. Optionally one can draw an ellipse and
rotate its axes. An example is provided in the function header. Hope this
helps.

regards,

arindam

--
Dr Arindam Chakraborty
Centre for Atmospheric and Oceanic Sciences
Indian Institute of Science
Bangalore - 560 012, INDIA
http://caos.iisc.ernet.in/
---------- Original Message -----------
From: Dennis Shea <shea@ucar.edu>
To: juki juki <juky_emc2@yahoo.com>
Cc: NCL Talk <ncl-talk@ucar.edu>
Sent: Thu, 24 May 2012 21:46:24 -0600
Subject: Re: Fw:  plot circle in contour map
> This works fine for me.
> Note that there should be no blank line at the end of the data file.
> 
>    data     = asciiread("ncldatasample.txt", (/10,3/), "float")
>   ;print(data)
> 
>    lon      = data(:,0)
>    lat      = data(:,1)
>    val      = data(:,2)
> 
> On 5/24/12 5:55 PM, juki juki wrote:
> >
> > I did, I am able to plot the data by copying the data to the ncl script.
> > My ascii file is very simple but when I read as follow;
> >
> > data = asciiread("ncldatasample.txt", (/10,3/), "float")
> >
> > the error occur, can not open the ascii file..
> >
> >
> >
> >
> >
> > ------------------------------------------------------------------------
> > *From:* juki juki <juky_emc2@yahoo.com>
> > *To:* Dennis Shea <shea@ucar.edu>
> > *Cc:* NCL Talk <ncl-talk@ucar.edu>
> > *Sent:* Friday, May 25, 2012 7:47 AM
> > *Subject:* Re: [ncl-talk] Fw: plot circle in contour map
> >
> > Hi Dennis;
> >
> > Thanks for your reply. Yes, it is ok, but let me ask few points.
> >
> > I will adopt the following code:
> >
> > http://www.ncl.ucar.edu/Applications/Scripts/polyg_8.ncl
> >
> > I try to read the data I sent you by simple command as:
> >
> > 126.57.41.538904
> > 156.25.70.95746147
> > 132.19.31.2666025
> > 151.6-9.31.1283792
> > 84.3 -8.41.0155413
> > 131.79.12.018506
> > 117.68.70.83682839
> > 75.4-8.50.91669957
> > 78.3-8.11.1834541
> > 81.7 6.51.526443
> >
> >
> > ; -------read data
> >
> > data = asciiread("ncldatasample.txt", (/10,3/), "float")
> >
> > Are there any other option to read it ? The data contain is above.
> >
> > For example I use the following bin:
> >
> > arr = (/0.5,1.,1.5,2.,2.5,3.,4., 5./)
> >
> > How to bin the third column of my data.
> >
> > The following line:
> >
> > npts = 10 ; Number of points.
> > lat = second coulumn of my data ; Create some dummy latitude
> > lon = first coulumn of my data ; and longitude data that
> > ; will contain the position of
> > ; our markers.
> >
> > R = random_uniform(-1.2,35.,npts) ; This is dummy data for determining
> > ; how to color the markers.
> >
> > How about R ?
> >
> > Thanks for help,
> >
> > Juky
> >
> > ------------------------------------------------------------------------
> >
> >  >
> >  >
> >  >
> >  > ----- Forwarded Message -----
> >  > *From:* juki juki <juky_emc2@yahoo.com <mailto:juky_emc2@yahoo.com>>
> >  > *To:* Dennis Shea <shea@ucar.edu <mailto:shea@ucar.edu>>
> >  > *Cc:* NCL Talk <ncl-talk@ucar.edu <mailto:ncl-talk@ucar.edu>>; Mary
> > Haley <haley@ucar.edu <mailto:haley@ucar.edu>>
> >  > *Sent:* Friday, May 25, 2012 7:02 AM
> >  > *Subject:* Re: [ncl-talk] plot circle in contour map
> >  >
> >  > Hi Dennis;
> >  >
> >  > Thanks for your reply. If I can do as the following example is also ok.
> >  >
> >  > http://www.ncl.ucar.edu/Applications/Scripts/polyg_8.ncl
> >  >
> >  > Location of the circle/point as I said before and then classify the
> >  > color into 3 color only based on the size in the third column. Again,
> >  > thank you.
> >  >
> >  > Juki
> >  >
> >  > -----------------------------------------------------------------------
-
> >  > *From:* Dennis Shea <shea@ucar.edu <mailto:shea@ucar.edu>>
> >  > *To:* juki juki <juky_emc2@yahoo.com <mailto:juky_emc2@yahoo.com>>
> >  > *Cc:* NCL Talk <ncl-talk@ucar.edu <mailto:ncl-talk@ucar.edu>>; Mary
> > Haley <haley@ucar.edu <mailto:haley@ucar.edu>>
> >  > *Sent:* Friday, May 25, 2012 3:14 AM
> >  > *Subject:* Re: [ncl-talk] plot circle in contour map
> >  >
> >  > See Example 4
> >  > http://www.ncl.ucar.edu/Applications/polyg.shtml
> >  >
> >  > Just read the lat and lon values.
> >  > You must repeat the last point to complete the circle.
> >  >
> >  > lat = (/7.4, 5.7, ... , 6.5, 7.4/)
> >  > lon = (/126.5, 156.6, ..., 81.7, 126.5/)
> >  >
> >  > On 5/24/12 12:02 PM, juki juki wrote:
> >  > > Dear all,
> >  > >
> >  > > I want plot circles in a contourmap in 70-160E and 10S-10N. For 
example
> >  > > we know the position of the circle and the radius in degree. Data
> >  > example:
> >  > >
> >  > > 126.5000000000007.400000000000001.53890401039422
> >  > > 156.2000000000005.700000000000000.957461472963439
> >  > > 132.1000000000009.300000000000001.26660247369343
> >  > > 151.600000000000-9.300000000000001.12837916709551
> >  > > 84.3000000000000-8.400000000000001.01554125038596
> >  > > 131.7000000000009.100000000000002.01850601761613
> >  > > 117.6000000000008.700000000000000.836828387188401
> >  > > 75.4000000000000-8.500000000000000.916699568847508
> >  > > 78.3000000000000-8.100000000000001.18345405454064
> >  > > 81.70000000000006.500000000000001.52644304409478
> >  > >
> >  > > First column is longitude position, latitude is in the second and 
last
> >  > > one is the radius. Are there ncl example regarding this matter, to 
plot
> >  > > circle in contourmap or in topographymap ?. Thanks for sharing,
> >  > >
> >  > > Regards,
> >  > > Juki
> >  > >
> >  > >
> >  > >
> >  > >
> >  > > _______________________________________________
> >  > > ncl-talk mailing list
> >  > > List instructions, subscriber options, unsubscribe:
> >  > > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >  >
> >  >
> >  >
> >  >
> >
> >
> >
> > _______________________________________________
> > ncl-talk mailing list
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >
> >
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
------- End of Original Message -------
-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Thu May 24 22:48:07 2012

This archive was generated by hypermail 2.1.8 : Fri May 25 2012 - 08:35:50 MDT