Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
Hi John, Thanks for the reply, my build environment is set up correctly now. Here's the code snippet with call to NCdumpW:String location = "http://dods.ndbc.noaa.gov/thredds/dodsC/data/oceansites/INCOIS/OS_MB04_20090106_TS.nc";
nc = NetcdfDataset.openDataset(location);fos = new FileOutputStream(new File(ncmlFolder + ncmlOutputFileName));
OutputStreamWriter ows = new OutputStreamWriter(fos); String varNames = null; CancelTask ct = null; NCdumpW.print(nc, ows, false, false, true, false, varNames, ct); and stack trace: java.util.UnknownFormatConversionException: Conversion = '%' at java.util.Formatter.checkText(Formatter.java:2502) at java.util.Formatter.parse(Formatter.java:2484) at java.util.Formatter.format(Formatter.java:2413) at java.util.Formatter.format(Formatter.java:2366) at ucar.nc2.NCdumpW.writeNcMLAtt(NCdumpW.java:832) at ucar.nc2.NCdumpW.writeNcMLVariable(NCdumpW.java:785) at ucar.nc2.NCdumpW.writeNcMLGroup(NCdumpW.java:720) at ucar.nc2.NCdumpW.writeNcML(NCdumpW.java:679) at ucar.nc2.NCdumpW.writeNcML(NCdumpW.java:662) at ucar.nc2.NCdumpW.print(NCdumpW.java:279) at ucar.nc2.NCdumpW.print(NCdumpW.java:251)at gov.noaa.ngdc.eds.util.NetCDFExtractor.toNCML(NetCDFExtractor.java:92) at gov.noaa.ngdc.eds.impl.iso.ISOAdapterTest.testNcmlDumpFile(ISOAdapterTest.java:43)
- Dave John Caron wrote:
David Neufeld wrote:Hello All,I am using trying to dump a netCDF file to NCML, and am getting an exception: java.util.UnknownFormatConversionException: Conversion = '%'Here's the code snippet:String location = "http://dods.ndbc.noaa.gov/thredds/dodsC/data/oceansites/INCOIS/OS_MB04_20090106_TS.nc";nc = NetcdfDataset.openDataset(location); fos = new FileOutputStream(new File(ncmlFolder + ncmlOutputFileName)); OutputStreamWriter ows = new OutputStreamWriter(fos); String varNames = null; CancelTask ct = null;hi david:this snippet i think is incomplete. whats the actual call that generates the exception (printStack would be nice if you have it)The exception seems to be thrown because several of the variables have a units attribute of '%'.The NetCDF UI Tools seem to handle the generation of NCML ok, so I'm wondering if I should look at a different method or another alternative.Thanks for suggestions in advance. Dave David Neufeld Enterprise Data Systems Group NOAA, NGDC, CIRES (303) 497-6507 David.Neufeld@xxxxxxxx _______________________________________________ netcdf-java mailing list netcdf-java@xxxxxxxxxxxxxxxxFor list information or to unsubscribe, visit: http://www.unidata.ucar.edu/mailing_lists/
netcdf-java
archives: