Re: Vector length in gridpoints instead of NDC

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Wed Apr 18 2012 - 15:50:12 MDT

Hi Stephan,

The VectorPlot code has a resource vcMapDirection that controls whether the direction of the vector is mapped into the coordinate space (grid space you could also say) of the plot. It sounds like what you want is something that maps the magnitude into the coordinate space. I can remember in the past wondering whether such a resource would be useful, but this is the first time that there has been such a request. It has always seemed to me that such a mapping would be difficult to make sense of, but it now seems there may be circumstances such as yours where it is needed.

Anyway, I'm sorry to say that NCL does not currently have this capability. You could maybe use the datatondc procedure to get the locations of all your grid points in NDC and then use the local NDC distances between grid points to apply appropriate individual scaling to the magnitudes of each vector. It sounds a little tricky but it might not actually be too hard.

We will put a built-in capability for this feature on our list of things to consider.
 -dave

On Apr 16, 2012, at 3:09 PM, Stephan Matthiesen wrote:

> Hello,
>
> I have to produce a vector map where the vector lengths are given in
> units of gridpoints, and they should be scaled so that their length is
> consistent with the grid. So, for example, a vector of (2,3) gridpoints
> should actually point from one gridpoint to the one 2 gridpoints east
> and 3 north.
>
> I only found ways to set the scaling in normalised display coordinates
> (NDCs), with the ressources vcRefMagnitudeF and vcRefLengthF. But grid
> size in the plot has no simple relation to NDCs (I'm using a
> stereographic projection), and a (2,3) vector for example needs to have
> different length depending on where it appears on the map.
>
> I'm plotting the vector map with gsn_csm_vector_map.
>
> Is it possible to scale the vectors so that they are consistent with the
> grid?
>
> If anybody wonders why I want that: my vector field represents actual
> displacment in gridpoints, not wind speeds or velocities. For velocities
> it makes sense to have the arrow length in a constant scale, but the
> displacement in my case should be shown in actual gridpoints.
>
> Thanks in advance
> Stephan
>
>
>
> _______________________________________________
> 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 Wed Apr 18 15:50:25 2012

This archive was generated by hypermail 2.1.8 : Fri Apr 20 2012 - 16:21:18 MDT