Re: Getting a vector map to be drawn over a global map of the world

From: Madeleine Patterson <madeleine.patterson77_at_nyahnyahspammersnyahnyah>
Date: Tue Nov 08 2011 - 12:03:35 MST

Thanks very much for your help Adam, I modelled my script on yours
(correcting the typos and putting in the underscore for 'degrees east'
etc.,) and I also included the vcres@mpOutlineOn = True and
vcres@mpFillOn= True, and now the script works - I get a field of wind
vectors drawn over
a map of the world...

Many thanks!
Madeleine

On Mon, Nov 7, 2011 at 4:58 PM, Adam Phillips <asphilli@ucar.edu> wrote:

> Hi Madeleine,
> Are you getting any error messages? Because when I run your script with a
> sample netCDF file from the NCL website everything looks good. Regarding
> your script:
> 1) the begin statement should be beneath all load statements.
> 2) You don't need to set mpOutlineOn or mpFillOn in this particular case,
> but if you did you would need to set them as vcres@mpOutlineOn = True and
> vcres@mpFillOn = True
> 3) degrees east should be "degrees_east", and degrees north should be
> "degrees_north"
>
> I use uv300.nc in the following script, which is downloadable from here:
> http://www.ncl.ucar.edu/**Applications/Data/<http://www.ncl.ucar.edu/Applications/Data/>
>
> The script is appended below. If when you use your data in the below
> script you still have issues I would suspect it would be due to missing
> metadata in your plotting arrays. You can use printVarSummary(u_m1_avgd)
> (for instance) to check for this..
>
> ;************************************************
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
> ;**************************************************
> ; read in netCDF file
> ;**************************************************
> begin
>
> a = addfile("uv300.nc","r")
> u = a->U
> v = a->V
> u_m1_avgd = dim_avg_n_Wrap(u,0)
> u_m1_avgd&lon@units = "degrees_east"
> u_m1_avgd&lat@units = "degrees_north"
>
> v_m1_avgd = dim_avg_n_Wrap(v,0)
> v_m1_avgd&lon@units = "degrees_east"
> v_m1_avgd&lat@units = "degrees_north"
>
> ;***************************************************************
> ************
>
> wks = gsn_open_wks("x11","**windvector_m1")
>
> vcres = True ; plot mods desired
> vcres@gsnFrame = False ; so we can draw time
> stamp
> vcres@vcRefAnnoOrthogonalPosF = -1.0 ; move ref vector up
> vcres@vcRefMagnitudeF = 10.0 ; define vector ref mag
> vcres@vcRefLengthF = 0.045 ; define length of vec
> ref
> vcres@vcGlyphStyle = "CurlyVector" ; turn on curly vectors
> vcres@vcMinDistanceF = 0.017
>
>
> vector = gsn_csm_vector_map_ce(wks,u_**m1_avgd,v_m1_avgd,vcres)
> frame (wks)
>
> end
>
>
>
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Nov 8 12:03:43 2011

This archive was generated by hypermail 2.1.8 : Tue Nov 08 2011 - 15:54:50 MST