cdm/src/main/java/thredds/client/catalog/tools/DataFactory.java
public NetcdfDataset openDataset(String location, boolean acquire, ucar.nc2.util.CancelTask task, Formatter log) throws IOException {
    Result result = new Result();
    Dataset dataset = openCatalogFromLocation(location, task, result);
    if (result.fatalError || dataset == null) {
      if (log != null) log.format("%s", result.errLog);
      result.close();
      return null;
    }

    return openDataset(dataset, acquire, task, result);
  }
public NetcdfDataset openDataset(String location, boolean acquire, ucar.nc2.util.CancelTask task, Formatter log) throws IOException {
    Result result = new Result();
    Dataset dataset = openCatalogFromLocation(location, task, result);
    if (result.fatalError || dataset == null) {
      if (log != null) log.format("%s", result.errLog);
      result.close();
      return null;
    }

    return openDataset(dataset, acquire, task, result);
  }
Open a NetcdfDataset from a URL location string. Example URLS: <ul>
<li>http://localhost:8080/test/addeStationDataset.xml#surfaceHourly
<li>thredds:http://localhost:8080/test/addeStationDataset.xml#surfaceHourly
<li>thredds://localhost:8080/test/addeStationDataset.xml#surfaceHourly
<li>thredds:file:c:/dev/netcdf-java-2.2/test/data/catalog/addeStationDataset.xml#AddeSurfaceData (absolute file)
<li>thredds:resolve:resolveURL
</ul>

@param location catalog.xml#datasetId, may optionally start with "thredds:"
@param task     may be null
@param log      error messages gp here, may be null
@param acquire  if true, aquire the dataset, else open it
@return NetcdfDataset
@throws java.io.IOException on read error