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

Home » Public Forums » archive » Reading part of a netcdf file?
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: Reading part of a netcdf file? [message #86021 is a reply to message #86016] Tue, 24 September 2013 09:46 Go to previous messageGo to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
See:
http://www.exelisvis.com/docs/NCDF_VARGET.html

Similar to what David said, the COUNT and OFFSET keywords are the ones
that should do the job for you (don't think you need STRIDE).

Just of the top of my head you'd need something like
COUNT=[144, 72, 17, X]
and for the first read
OFFSET=[0,0,0,0]
For the second read of X timesteps,
OFFSET=[0,0,0,X]
third,
OFFSET=[0,0,0,X*2]
etc..

I think I got the general idea right (anyone?). The X-related numbers
may be off by one since count is 1-based and offset is 0-based and I
always get 'em mixed up.

cheers,

paulv


On 09/24/13 11:26, rjp23@le.ac.uk wrote:
> I have a very large (22GB) netcdf file and I was hoping there was
> some way to read part of it at a time into IDL but I can't figure out
> how.
>
> For example, I have this variable:
>
> Var FLOAT = Array[144, 72, 17, 32161]
>
> The 4th dimension is time, i.e. the are 32161 timesteps.
>
> Is it possible to read only the first X in one go, then read the next
> X, etc meaning that less is stored in memory at once?
>
> Cheers
>
> Rob
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Reading large files with restore
Next Topic: temporary() problem

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

Current Time: Sun Oct 12 11:29:17 PDT 2025

Total time taken to generate the page: 0.40053 seconds