cdm/src/main/java/ucar/nc2/dataset/NetcdfDataset.java
static public NetcdfDataset openDataset(DatasetUrl location, Set<Enhance> enhanceMode, int buffer_size,
                                          ucar.nc2.util.CancelTask cancelTask, Object spiObject) throws IOException {
    // do not acquire
    NetcdfFile ncfile = openOrAcquireFile(null, null, null, location, buffer_size, cancelTask, spiObject);
    NetcdfDataset ds;
    if (ncfile instanceof NetcdfDataset) {
      ds = (NetcdfDataset) ncfile;
      enhance(ds, enhanceMode, cancelTask); // enhance "in place", ie modify the NetcdfDataset
    } else {
      ds = new NetcdfDataset(ncfile, enhanceMode); // enhance when wrapping
    }

    return ds;
  }
static public NetcdfDataset openDataset(DatasetUrl location, Set<Enhance> enhanceMode, int buffer_size,
                                          ucar.nc2.util.CancelTask cancelTask, Object spiObject) throws IOException {
    // do not acquire
    NetcdfFile ncfile = openOrAcquireFile(null, null, null, location, buffer_size, cancelTask, spiObject);
    NetcdfDataset ds;
    if (ncfile instanceof NetcdfDataset) {
      ds = (NetcdfDataset) ncfile;
      enhance(ds, enhanceMode, cancelTask); // enhance "in place", ie modify the NetcdfDataset
    } else {
      ds = new NetcdfDataset(ncfile, enhanceMode); // enhance when wrapping
    }

    return ds;
  }
static public NetcdfDataset openDataset ( DatasetUrl location , Set < Enhance > enhanceMode , int buffer_size , ucar . nc2 . util . CancelTask cancelTask , Object spiObject ) throws IOException { // do not acquire NetcdfFile ncfile = openOrAcquireFile ( null , null , null , location , buffer_size , cancelTask , spiObject ) ; NetcdfDataset ds ; if ( ncfile instanceof NetcdfDataset ) { ds = ( NetcdfDataset ) ncfile ; enhance ( ds , enhanceMode , cancelTask ) ; // enhance "in place", ie modify the NetcdfDataset } else { ds = new NetcdfDataset ( ncfile , enhanceMode ) ; // enhance when wrapping } return ds ; }
Factory method for opening a dataset through the netCDF API, and identifying its coordinate variables.

@param location    location of file
@param enhanceMode set of enhancements. If null, then none
@param buffer_size RandomAccessFile buffer size, if <= 0, use default size
@param cancelTask  allow task to be cancelled; may be null.
@param spiObject   sent to iosp.setSpecial() if not null
@return NetcdfDataset object
@throws java.io.IOException on read error
Factory method for opening a dataset through the netCDF API and identifying its coordinate variables .