Problem with stride when accessing multiple files

From: Raymond Arritt <rwarritt_at_nyahnyahspammersnyahnyah>
Date: Tue, 26 May 2009 16:48:36 -0500

Hi folks,

I've run into an odd problem when processing a long series of data
using a stride. I've got a bunch of yearly input files that I'm
treating as a unit, using addfiles and the "cat" option,

flist = systemfunc ("ls /home/rwarritt/NARCCAP/zg500_NARR_*")
a1 = addfiles(flist,"r")
ListSetType (a1, "cat")

These files have data at 8 times per day (i.e., every 3 hours). I'm
trying to build a subset over the whole record at one time per day
using a stride of 8, like this:

zg500 = a1[:]->zg500(::8,:,:)

This follows Example 4 at
except that my input files are 3D instead of 4D as in the example.

When I do this, the resulting zg500 has all the time samples each day
as if the stride isn't working. But if I give an explicit lower
limit, like this,

zg500 = a1[:]->zg500(0::8,:,:)

then the stride works as expected and gives zg500 with data only for
00 UTC each day.

I'm curious as to why the stride works only when a lower limit is
specified. Conversely if I've done something dumb please let me know.


   "You miss 100% of the shots you don't take." -- Wayne Gretzky
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Tue May 26 2009 - 15:48:36 MDT

This archive was generated by hypermail 2.2.0 : Mon Jun 01 2009 - 07:47:27 MDT