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

Home » Public Forums » archive » Faster way to "shift" array?
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: Faster way to "shift" array? [message #84793 is a reply to message #84792] Tue, 11 June 2013 10:23 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Fabien writes:

> I also agree that sometimes it is impossible to overcome a subset
> problem without having to shift the data. Let's take the example of
> netcdf files, which have the nice capability to be subset _without_
> reading the full databox in the memory. If your subset goes something
> like: [-40, 40] in longitude and your data is in [0, 360] then you can't
> efficiently use the netcdf COUNT and OFFSET keywords.
> Data organized in [0, 360] has the bad property of cutting Europe and
> Africa in two, while [-180, 180] mostly cuts oceans. It depends on how
> often you use the data...

I'm certainly not arguing that data doesn't occasionally need to be
reorganized, and I've certainly used the Shift function to do so.
Rather, I'm arguing that I have rarely, if ever, used the shift function
for the sole purpose of drawing a contour plot on a map projection. In
fact, in this situation it rarely matters if your longitude vector goes
from 0 to 360 or -180 to 180. The data should be drawn (God help us!) in
the same location regardless. :-)

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
Previous Topic: IDL Array Question
Next Topic: logarithmic Y axis in cgContour

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

Current Time: Fri Oct 10 15:46:27 PDT 2025

Total time taken to generate the page: 0.40167 seconds