// try subset
data = v.read("0:9:2, :");
NCdumpW.printArray(data, "read(0:9:2,:)", new PrintWriter( System.out), null);
data = v.read(new Section().appendRange(0,9,2).appendRange(null));
NCdumpW.printArray(data, "read(Section)", new PrintWriter( System.out), null);
// fail
//int[] origin = new int[] {0, 0};
//int[] size = new int[] {3, -1};
//data = v.read(origin, size);
// from bruno
int initialIndex = 5;
int finalIndex = 5;
data = v.read(initialIndex + ":" + finalIndex + ",:");
//NCdumpW.printArray(data, "read()", new PrintWriter(System.out), null);
System.out.println("Size: " + data.getSize());
System.out.println("Data: " + data);
System.out.println("Class: " + data.getClass().getName());
// loop over outer dimension
int x = 0;
while (data.hasNext()) {
Array as = (Array) data.next(); // inner variable length array of short
System.out.println("Shape: " + new Section(as.getShape()));
System.out.println(as);
}
ncfile.close();