comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Direction of Wind Vectors: A bug?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Direction of Wind Vectors: A bug? [message #90343 is a reply to message #90287] Mon, 23 February 2015 07:28 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> Someone was harassing my retirement reveries this morning by claiming
> that cgDrawVectors was drawing vectors incorrectly, in the wrong
> directions. He cited as evidence the output of the lovely NASA program,
> PartVelVec.

Having decided Wayne was doing the right thing, and still a bit
dissatisfied with how my cgDrawVectors algorithm was working, I spent
the weekend (the reason I retired!) completely gutting and rebuilding
cgDrawVectors. It now takes into account the scale of the plot in the X
and Y directions. What took me a while to work out is that the scale of
the plot on a map projection should always be 180x360, no matter what
portion of the map you are showing in the plot.

Making these changes, I can duplicate the PartVelVec results on every
test I've made, including tests with map projections using Map_Set and
the Map_Proj_Init methods (as implemented in cgMap_Set and cgMap). I've
tried various map projections, and all seems to be working correctly,
although additional testing on ALL map projections is probably
warranted.

While I was tearing things up, I decided to fix the code in cgArrow
(which was drawing the vectors) to make it more flexible and faster by
moving the code closer to the machine. You can now pass a vector of
colors to cgArrow, as well as a vector of arrows to draw, and you should
see significant speed-up of its vector drawing capability. Both programs
should be downloaded, as cgDrawVectors depends on cgArrow.

You can find the two new programs here:

http://www.idlcoyote.com/programs/cgarrow.pro
http://www.idlcoyote.com/programs/cgdrawvectors.pro

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Interpolation
Next Topic: Errors when compiling routines with main-level programs

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 08:52:48 PDT 2025

Total time taken to generate the page: 1.44090 seconds