System.out.println("starting files="+count);
NetcdfDataset.initNetcdfFileCache(0, 2, 5, 10*60);
for (int i=0; i<10; i++) {
String ncmli = StringUtil.replace(ncml,'%',Integer.toString(i));
NetcdfFile ncfile = NcMLReader.readNcML(new StringReader(ncmli), filename, null);
System.out.println(" TestNcmlAggExisting.open "+ filename);
Variable timev = ncfile.findVariable("time");
Array timeD = timev.read();
int count1 = RandomAccessFile.getOpenFiles().size();
System.out.printf("count files at dir %d count= %d%n", i, count1);
ncfile.close();
}
int count2 = RandomAccessFile.getOpenFiles().size();
System.out.println("ending files="+count2);
//assert count == count2 : "openFile count "+count +"!="+ count2;