Re: incorrect plotting of polymarkers

From: Kantave Greene <kantave.m.greene_at_nyahnyahspammersnyahnyah>
Date: Mon Nov 26 2012 - 15:05:23 MST

Hi Mary
I tried executing what you suggested but it returns, " Loop end must be
scalar, can't execute loop"
I am assuming:
1. that lat2d /lon2d are the variables to which grb lat/lon are read into?
2. lat_pts/lon_pts are new arrays of size nlat?
3. lat_pts(k) and lon_pts(k) are 1D arrays of indices?

Based on the script i submitted I was plotting an array of lat/lon
indices called lat_markers and lon_markers which were derived from the
loop/ function getind_latlon2d.
Are you saying that the way I was associating the indices to the lat/lon
was incorrect and that is why I should use the loop you provided?

On 11/26/2012 3:25 PM, Mary Haley wrote:
> I think you want to do this:
>
> nlat = dimsizes(lat)
> lat_pts = new(nlat,typeof(lat2d))
> lon_pts = new(nlat,typeof(lon2d))
> do k=0,nlat-1
> n = nm(k,0)
> m = nm(k,1)
> lat_pts(k) = lat2d(n,m)
> lon_pts(k) = lon2d(n,m)
> end do
>
> dum = gsn_add_polymarker(wks,map,lon_pts,lat_pts, mres)
>
>
> On Nov 26, 2012, at 10:57 AM, Kantave Greene wrote:
>
>> Hello
>>> I am having a problem with polymarkers being plotting incorrectly on a lambert conformal map although there indices are valid and correct. The attached image is the output from the script.
>>> Based on the user specified lat/lon, getind_latlon2d returns the indices which polymarker then plots. Using the following statement:
>>> print(n+" "+m+" "+lat(n,m)+" "+lon(n,m))
>>> I confirmed that the indices are returning the nearest lat/lon to the indices.
>>> Can you help me get the script to plot the indices correctly?
>>>
>>> Please find attached a copy of the code and output file I am using. Thanks for all your help.
>>>
>> --
>> Kantave Greene
>> Instructor
>> Meteorology Department
>> Jackson State University
>> P.O. Box 17660
>> Jackson, MS 39217
>> (601) 979-1293
>>
>> <plot_polygon.ncl><polygon_orig.ps>_______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

-- 
Kantave Greene
Instructor
Meteorology Department
Jackson State University
P.O. Box 17660
Jackson, MS 39217
(601) 979-1293
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Nov 26 15:05:35 2012

This archive was generated by hypermail 2.1.8 : Fri Dec 07 2012 - 13:30:06 MST