Re: Prevent Wrapping of gsn_polymarker/gsn_add_polymarker at End of Map

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Sep 30 2013 - 16:44:51 MDT

Hi Sean,

Dave will have to confirm, but I think this issue was fixed after V6.1.2 (and is in a version we haven't released yet).

See the attached pngs, which shows the 6.1.2 version versus the 6.2.0 development version.

I can probably get you a fixed version if you need it.

--Mary

On Sep 28, 2013, at 8:02 PM, Sean Egan <sdegan@alaska.edu> wrote:

> Hi NCL Community,
>
> I am plotting circles around a certain latitude and longitude using the following script that I've written:
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
>
> begin
>
> resources = True
> resources@mpGridAndLimbOn = True
> resources@mpLimitMode = "LatLon"
> resources@mpPerimOn = True
> resources@mpOutlineBoundarySets = "GeophysicalandUSStates"
> resources@mpMinLonF = -175
> resources@mpMaxLonF = -35
> resources@mpMinLatF = 30
> resources@mpMaxLatF = 75
> resources@mpProjection = "LambertConformal"
> resources@mpCenterLonF = -120
> resources@mpCenterLatF = 50
> resources@gsnMaximize=True
> resources@gsnFrame=False
> wks=gsn_open_wks("pdf","sde929")
> map=gsn_map(wks,"LambertConformal",resources)
> gsn_polymarker(wks,map,-175.5080,52.1770,False)
>
> dist = 2.0 ; distance in degrees
>
> do while (dist.le.50)
> clat=new(1000,float) ;1000 might seem like a lot but I'm using the output in other analysis
> clon=new(1000,float)
> nggcog(52.1770,-175.5080,dist,clat,clon)
> gsn_polyline(wks,map,clon,clat,False)
> delete(clat)
> delete(clon)
> dist=dist+2.0
> end do
>
> end
>
> This will plot 50 circles around a volcano I'm studying. Unfortunately, gsn_polymarker is wrapping around the globe and onto the other side of the map when it reaches the end of the map. Is there a way to mask or suppress that? I only want the arcs that result to the right of my volcano. I know that I can edit the vectors that I'm creating with nggcog (clat and clon) to remove the points that wrap around to the other side of the map, but I thought maybe there's some mask I can apply that will suppress gsn_polymarker when it runs off the edge of the map.
>
> Thanks!
>
> Sean Egan
> University of Alaska Fairbanks
> _______________________________________________
> 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
Received on Mon Sep 30 16:45:03 2013

This archive was generated by hypermail 2.1.8 : Tue Oct 01 2013 - 14:41:43 MDT