Re: using polymarker

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon, 6 Oct 2008 14:17:01 -0600 (MDT)

Gina,

If you want to put a point at every lat,lon location, you could use
the "conform" function to promote your 1D lat/lon arrays both be of
size 64 x 124.

If your 1D arrays are called "lat" and "lon", then you might use:

   dum = new((/64,128/),float) ; dummy array to provide the dimension sizes
   lat2d = conform(dum,lat,0) ; Copy lat values to a 64 x 128 array
   lon2d = conform(dum,lon,1) ; Copy lon values to a 64 x 128 array
   delete(dum)

   mkres = True
   mkres_at_gsMarkerIndex = 16 ; or whatever marker you want
   mkres_at_gsMarkerSizeF = 10. ; whatever size you want.
   ...
   gsn_polymarker(wks,map,lon2d,lat2d,mkres)

I *think* the arrays to gsn_polymarker need to be 1-dimensional, so
you could do this:

   dum = new((/64,128/),float)
   lat1d = ndtooned(conform(dum,lat,0))
   lon1d = ndtooned(conform(dum,lon,1))
   delete(dum)

   mkres = True
   mkres_at_gsMarkerIndex = 16 ; or whatever marker you want
   mkres_at_gsMarkerSizeF = 10. ; whatever size you want.
   ...
   gsn_polymarker(wks,map,lon1d,lat1d,mkres)

--Mary

On Fri, 3 Oct 2008, Gina Henderson wrote:

> Hi all,
>
> I am using global atmospheric and land surface output from CAM and want to
> mark certain gridboxes on a plot. I have been looking at example scripts
> that use gsn_polymarker but this requires the x and y arrays to be of equal
> size and I have lat=64 and lon=128. Does anyone have any experience with
> this type of problem and am I using the right function?
>
> Thanks, Gina.
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Oct 06 2008 - 14:17:01 MDT

This archive was generated by hypermail 2.2.0 : Tue Oct 07 2008 - 09:09:48 MDT