Looking for *simple* example of annotating a lat-lon plot

From: John Filipkowski (john.filipkowski AT XXXXXX)
Date: Thu Jun 03 2004 - 22:05:04 MDT


Hi,

I'm trying to plot a map of the Atlantic Ocean, with some points annotated.

Here's what I'm trying to use--I'm trying to plot a "+" sign at the latitude
and longitude specified below.

Any suggestions? Thanks in advance!

;================================================;
; newsat.ncl
;================================================;
load "$NCARG_ROOT/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/ncarg/nclscripts/csm/gsn_csm.ncl"
; ================================================;
begin
;************************************************
; create plot
;************************************************
  wks = gsn_open_wks("pdf","sat") ; open a pdf file
  gsn_define_colormap(wks,"testcmap") ; choose colormap
  i = NhlNewColor(wks,0.8,0.8,0.8) ; add gray to map

  res = True ; plot mods desired
  xyres = True

 
  res@mpProjection = "Satellite" ; choose map projection
  res@mpCenterLonF = -75. ; choose center lon
  res@mpCenterLatF = 35. ; choose center lat
  
  res@mpCenterRotF = -90. ;

  res@mpLimitMode = "LatLon" ; required
  res@mpMinLatF = 8. ; min lat
  res@mpMaxLatF = 65. ; max lat
  res@mpMinLonF = -110. ; min lon
  res@mpMaxLonF = -40. ; max lon

  res@pmTickMarkDisplayMode = "Always" ; turn on automatic tickmarks
  res@mpGridAndLimbOn = True ; turn on lat/lon lines

  res@mpGridLatSpacingF = 5 ; Lat spacing (degrees)
  res@mpGridLonSpacingF = 5 ; Lon spacing (degrees)

  ;res@mpGridMaskMode = "MaskLand" ; Mask grid over land.
  res@mpGridMaskMode = "MaskNone" ; Mask grid over land.
  res@mpPerimOn = False ; Turn off perimeter

  res@gsnMaximize = True ; enlarge plot
  ;res@tiMainString = "Example of Zooming a Sat Projection"
  ;res@gsnAddCyclic = False

  res@gsnFrame = False
;
; Now plot a point indicating 46.77 N 48.016 W
;
; first, set parameter so wmlabs uses lat/lon instead of x/y
  wmsetp("ezf",0)

  plot = gsn_csm_map(wks,res)

 gsn_text_ndc(wks,"+", 46.77, -48.016,res)
 frame(wks)

  end

The information contained in this e-mail is intended only for the individual or entity to whom it is addressed.
Its contents (including any attachments) may contain confidential and/or privileged information.
If you are not an intended recipient you must not use, disclose, disseminate, copy or print its contents.
If you receive this e-mail in error, please notify the sender by reply e-mail and delete and destroy the message.


_______________________________________________
ncl-talk mailing list
ncl-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk



This archive was generated by hypermail 2b29 : Fri Jun 04 2004 - 08:42:59 MDT