[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDFJava #OCZ-538837]: Problems with: new GridDataset( aggregatedNetcdfDataset )



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