This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
im seeing 3 grids, in or out of memory: public void testReadNcMLInputStream() throws Exception { String ncmlLoc = "file:C:\\data\\work\\margolis\\test.ncml"; GridDataset fullDataset = GridDataset.open( ncmlLoc); System.out.printf("full size= %d%n", fullDataset.getGrids().size()); // real ncml through a InputStream. String ncml = "<?xml version='1.0' encoding='UTF-8'?>\n" + "<netcdf xmlns='http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2'>\n" + " <variable name='time'>\n" + " <attribute name='ncmlAdded' value='timeAtt'/>\n" + " </variable>\n" + " <aggregation dimName='time' type='joinExisting'>\n" + " <netcdf location='file:C:\\data\\work\\margolis\\f_0000000.nc'/>\n" + " <netcdf location='file:C:\\data\\work\\margolis\\f_0032400.nc'/>\n" + " </aggregation>\n" + "</netcdf>"; NetcdfDataset aggregatedDataset = NcMLReader.readNcML( new ByteArrayInputStream(ncml.getBytes()), null ); GridDataset emptyDataset = new GridDataset( aggregatedDataset ); System.out.printf("empty= %s%n", emptyDataset.getGrids().size()); assert emptyDataset.getGrids().size() == fullDataset.getGrids().size(); } is it related to being in memory, or do you also see it happen when reading a file? perhaps theres something else going on? can you make sure that you are using latest release, i think its 4.0.39 Ticket Details =================== Ticket ID: OCZ-538837 Department: Support netCDF Java Priority: Normal Status: Open