Adding arrow on a map

From: louis Vonder <appopson_at_nyahnyahspammersnyahnyah>
Date: Tue, 12 May 2009 08:16:24 +0000 (GMT)

Dear all,

I want to add arrow on a map to highlight particular topography feature, as shown of the attached figure.

For this I used NCL example 2 on Native Grid and example 9 on Weather Symbols.

But, the arrow refuses to appear on the map.

What can I adjust on the following script to perform my task ?

Regards

-- Louis

;****************************************************
; native_2.ncl
;*****************************************************
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
;*****************************************************
begin
 f1 = addfile("1994_256_FSD.nc","r")
 fsd=f1->FSD

 lat  = fsd&lat
 lon  = fsd&lon
 nlat = dimsizes(lat)
 nlon = dimsizes(lon)
;**************************************
;   Create plot
;***************************************
 wks  = gsn_open_wks("ps", "native")
 gsn_define_colormap(wks,"BlGrYeOrReVi200")         ; choose color map
 i = NhlNewColor(wks,0.7,0.7,0.7)                   ; add gray to colormap

 res                             = True             ; plot mods desired

 res_at_cnFillOn                    = True             ; turn on color
 res_at_cnLinesOn                   = False            ; no contour lines

  res_at_gsnDraw              = False              ; don't draw
  res_at_gsnFrame             = False              ; don't advance frame

 res_at_cnLevelSelectionMode        = "ManualLevels"   ; set manual contour levels
 res_at_cnMinLevelValF              = 0                ; set min contour level
 res_at_cnMaxLevelValF              = 70               ; set max contour level
 res_at_cnLevelSpacingF             = 5                ; contour spacing

 res_at_gsnSpreadColors             = True             ; use full color map
 res_at_gsnSpreadColorEnd           = -3               ; don't use added gray
 res_at_lbOrientation               ="vertical"        ; vertical label bar

 res_at_mpDataBaseVersion           = "Ncarg4_1"       ; use finer database
 res_at_pmTickMarkDisplayMode       = "Always"         ; turn on tickmarks

 res_at_gsnAddCyclic                = False            ; regional data, don't add pt

 res_at_mpProjection                = "mercator"       ; projection
 res_at_mpLimitMode                 = "Corners"        ; method to zoom
 res_at_mpLeftCornerLatF            = min(lat)
 res_at_mpLeftCornerLonF            = min(lon)
 res_at_mpRightCornerLatF           = max(lat)      
 res_at_mpRightCornerLonF           = max(lon)
 res_at_tfDoNDCOverlay              = True             ; do not transform data

 res_at_tiMainString                ="Native Mercator Projection"
 plot = gsn_csm_contour_map (wks,fsd(0,:,:),res)    ; create plot

  wmsetp("vrs - size of reference vector in user space", 40.)
  wmsetp("vrn - size of reference vector on plot in NDC space", 0.08)

;
;  Draw vectors with a common base along different directions.
;
  wmsetp("vcw - linewidth scale", 3.)
  wmsetp("vcc - vector color", 0)
  wmvectmap(wks, 134., 45.,  0., 80.)

draw(plot)

end

 

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Tue May 12 2009 - 02:16:24 MDT

This archive was generated by hypermail 2.2.0 : Wed May 13 2009 - 08:40:16 MDT