Prevent Wrapping of gsn_polymarker/gsn_add_polymarker at End of Map

From: Sean Egan <sdegan_at_nyahnyahspammersnyahnyah>
Date: Sat Sep 28 2013 - 20:02:29 MDT

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
Received on Sat Sep 28 20:02:45 2013

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