On Mon, Apr 15, 2013 at 2:16 PM, <
fredri...@gmail.com> wrote:
> I'm working with a data set that consists of length, degrees and data. The
> length is approx. 100.000.000 points, degrees ~180 points, and the data is a
> value in each point (matrix (100.000.000 x 180) ~ 18 billion points).
>
> I need to get the data with respect to the length, eg. data[data.length >
> 100 & data.length < 200]
is length sorted? i.e do you need data[100:200] -- if so, you need to
ask for it that way.
if not, and you need the items in data where the length value is
between 100 and 200, but that could be any arbitrary indexes, then you
are doing what in numpy terms is called "fancy indexing", and OpenDAP
does not support that. You'll either need to download the entire
length vector and then subset, or do a loop and download each item
with a single call -- which will be very slow, too.
There has been some talk of extending OpenDAP to support requesting
and arbitrary sequence of indexes, but I don't know if that's getting
anywhere. You could probably do it with a server-side funciton, but
you'd have to extend your server to support it.
> Conceptual example:
> length=1,2,3,4,5
> data = 10,20,30,40,50
>
> What happens:
> data[length>2&length<5]
in this case, you want:
data[2:4]
instead, but that only works id length is indeed sorted, as in this example.
> What I want:
> data[length>2&length<5]
> data = 30,40
> E.g.The server does all the job.
if you don't know the structure of length enough to compute those
indices, you can't do that.
I would look at server-side functions, though -- HRAX has support, ai
think for things like latitude>some_value, you may be able to apply
that here.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R
(206) 526-6959 voice
7600 Sand Point Way NE
(206) 526-6329 fax
Seattle, WA 98115
(206) 526-6317 main reception
Chris....@noaa.gov