======================================== API Changes from Java-Netcdf version 2.2 to 4.0 Data Model * Object names are Unicode Strings. No Restrictions on characters used. * DataType STRING are Unicode. In Netcdf3/4, stored as UTF-8 encoded. * DataType CHAR are uninterpreted bytes, default is to consider them ascii. * DataType ENUM * DataType OPAQUE * DataType SEQUENCE API Extensive API changes. Most, but not completely backwards-compatible. * change StringBuffer to StringBuilder or Formatter for efficiency and convenience Package ucar.ma2 + Array local iterator: hasNext() nextXXXX() methods. + ArraySequence handles Sequence with StructureDataIterator. * Old ArraySequence now called ArraySequenceNested - ArrayStructure.getArrayXXX removed - use getJavaArrayXXX + ArrayStructure.getMemberArray() to extract individual member data as Arrays + ArrayStructure.convertScalarDouble, Float + Section used instead of List + Section.appendRange() idioms for constructing - StructureData.convertScalarDouble() removed, use StructureDS.convertScalarDouble() - StructureData.getArrayXXX removed - use getJavaArrayXXX - StructureData.findMemberArray removed - use getArray + StructureData.convertScalarDouble, Float * StructureData.getScalarXXX(String memberName), getJavaArrayXXX(String memberName) must match type exactly Package ucar.nc2 * Attribute mutable methods no longer public, so Attribute is immutable - Dimension.getCoordinateVariables(), addCoordinateVariable() removed + Dimensions know what Group they belong to * Dimension.UNKNOWN now DIMENSION.VLEN - Dimension.UNLIMITED removed * Dimension can be set immutable. + EnumTypedef class added for DataType.ENUM + Group tracks EnumTypedef + Group.findVariableEscaped() assumes variable name is escaped. + Group can be set immutable. * IOServiceProvider -> ucar.nc2.iosp.IOServiceProvider + NetcdfFile.addStringVariable(), addVariable() convenience methods - NetcdfFile.addRecordStructure removed, use sendIospMessage(IOSP_MESSAGE_ADD_RECORD_STRUCTURE) - NetcdfFile.readMemberData() removed: use Structure.select() or readSection() + NetcdfFile.readToByteChannel experimental, for maximum performance - NetcdfFile.read(String variableSection, boolean flatten) -> readSection(secSpec); flatten= false not supported + NetcdfFile implements FileCacheable * NetcdfFile.setFileCache() replaced old setCacheState(). + NetcdfFileWriteable has new convenience methods + NetcdfFileWriteable redefine mode, large file support, extra header bytes - NCdump is deprecated, use NCdumpW which uses a java.io.Writer to do Unicode correctly * NCdumpW.CEresult put in sepetat class * NCdumpW.makeSectionString moved to CEresult * VariableSimpleIF.convertScaleOffsetMissing moved to VariableEnhanced * VariableIF extends VariableSimpleIF - Variable.getCoordinateDimension() removed - Variable.calcIsCoordinateVariable() removed + Variable.isCoordinateVariable() added - Variable.setIsCoordinateAxis() removed - Variable.set/getIOVar() removed * Variable can be set immutable. - Variable.readAllStructures is removed + Sequence is a one-dimensional Structure with indeterminate length * Structure.select() create subset consisting only of given member variables - Structure.convertXXX removed + VariableSimpleAdapter adapts a StructureMembers.Member into a VariableSimpleIF Package ucar.nc2.dataset * NetcdfDataset.EnhanceMode to control enhancing * StructureDS correctly gets enhanced * NetcdfDataset.makeArray -> Array.makeArray() + both NetcdfFile and NetcdfDataset are in the same FileCache, using acquireXXX(). + FileCache configuration done though NetcdfDataset. - VariableDS.isEnhanced() removed Package ucar.nc2.dt * TypedDatasetFactory is superceded by ucar.nc2.ft.FeatureDatasetFactoryManager * ucar.nc2.dt.RadialDatasetSweep implements ucar.nc2.ft.FeatureDataset * ucar.nc2.dt.grid.GridDataset implements ucar.nc2.ft.FeatureDataset Package ucar.nc2.iosp * Layouts and Chunkers factored out for reuse - IndexChunker, IndexChunkerTiled - LayoutRegular, LayoutRegularSegmented, LayoutSegmented, LayoutTIled, LayoutBBTiled * IOServiceProvider.readNestedData() not needed anymore. optimize readData(Structure struct), where struct has only a subset of member Variables + IOServiceProvider.readSection(secSpec) with default implementation in AbstractIOServiceProvider + IOServiceProvider.readData(ucar.nc2.Variable v2, Section section, WritableByteChannel channel) to allow use of nio.Channels Package ucar.nc2.iosp.netcdf3 * netcdf3 format is now just one of the possible IOSPs * N3streamWriter allows netcdf3 to be written as a stream Package ucar.nc2.util * RuntimeConfigParser -> ucar.nc2.util.xml Package ucar.nc2.thredds * ThreddsDataFactory returns ucar.nc2.ft.FeatureDataset instead of ucar.nc2.dt.TypedDataset * ThreddsDataFactory uses Formatter instead of StringBuffer / StringBuilder * ThreddsDataFactory.openDatatype renamed to openFeatureDataset Package ucar.nc2.util.cache * FileCache uses FileCacheable and FileFactory, replaces NetcdfFileCache, NetcdfDatasetCache, HTTPFileCache + FileCache no longer static, allows any number of caches. uses java.util.concurrent * FileCacheRaf handles RandomAccessFile caching for TDS HTTP file serving. Package ucar.nc2.units * DateUnit is not a superclass of SimpleUnit Package thredds.catalog * DataType -> ucar.nc2.constants.FeatureType Refactoring to reduce dependencies among modules (core, netcdf, ui, tds) * ucar.nc2.dataset.conv._Coordinate moved to ucar.nc2.constants * thredds.catalog.DataType moved to ucar.nc2.constants * ucar.nc2.dataset.AxisType moved to ucar.nc2.constants * thredds.util.DateFromString moved to ucar.nc2.units * thredds.datatype to ucar.nc2.units * thredds.util to ucar.nc2.util * thredds.util.net to ucar.nc2.util.net * ucar.nc2.dataset.HttpClientManager to ucar.nc2.util.net * remove opendap.dap.DConnect2, ucar.unidata.io.http.HTTPRandomAccessFile from HttpClientManager: must be done seperately * ucar.nc2.util.NetworkUtils to ucar.nc2.util.net.URLnaming * thredds.util.net.URLExtractor to ui module * thredds.util.ListenerManager to ui module * thredds.util.Resource to ui module * thredds.util.SocketMessage to ui module * thredds.datamodel to ui * thredds.tools to ui * thredds.cataloggen.catalogGenMain (org.apache.log4j) to tds module * thredds.dqc to tds * thredds.cataloggen.CatalogRefInfo to thredds.cataloggen.config