Re: Adding arrow on a map

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue, 12 May 2009 07:40:51 -0600

On May 12, 2009, at 2:16 AM, louis Vonder wrote:

> 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

Louis,

For starters, you are drawing the vector in the background color
(white):

  wmsetp("vcc - vector color", 0)

You should try 1 (black) or some other color.

Secondly, I you appear to have lat/lon switched in this call:

  wmvectmap(wks, 134., 45.,? 0., 80.)

it should be:

  wmvectmap(wks, 45., 134., 0., 80.)

--Mary

>
>
>
> ;****************************************************
> ; 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
>
>
>
>
>
>
>
>
>
>
>
> <native.pdf>
> _______________________________________________
> 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 Tue May 12 2009 - 07:40:51 MDT

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