[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDFJava #OCZ-538837]: Problems with: new GridDataset( aggregatedNetcdfDataset )
- Subject: [netCDFJava #OCZ-538837]: Problems with: new GridDataset( aggregatedNetcdfDataset )
- Date: Tue, 21 Apr 2009 16:50:39 -0600
My tests are working fine (see below). I cant use your NcML since I dont have
those files. I'll need a self-contained test that also fails for me. thanks
public void testReadNcMLInputStream() throws Exception {
String ncmlLoc = "file:./"+ TestNcML.topDir + "aggExisting.xml";
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='C:/dev/tds/thredds/cdm/src/test/data/ncml/nc/jan.nc'/>\n" +
" <netcdf
location='C:/dev/tds/thredds/cdm/src/test/data/ncml/nc/feb.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();
GridDataset ds2 = ucar.nc2.util.NcMLUtil.applyNcml( ncml);
System.out.printf("ds2= %s%n", ds2.getGrids().size());
assert ds2.getGrids().size() == fullDataset.getGrids().size();
}
Ticket Details
===================
Ticket ID: OCZ-538837
Department: Support netCDF Java
Priority: Normal
Status: Open