Examples of NetcdfDataset


Examples of ucar.nc2.dataset.NetcdfDataset

  // Grib files are collections of 2D horizontal arrays.
  // LOOK: breaking encapsolation !!!

  private void getIosp() {
    NetcdfDataset ncd = (NetcdfDataset) gds.getNetcdfFile();
    NetcdfFile ncfile = ncd.getReferencedFile();
    while (ncfile instanceof NetcdfDataset) {
      ncd = (NetcdfDataset) ncfile;
      ncfile = ncd.getReferencedFile();
    }
    if (ncfile == null) return;
    IOServiceProvider iosp = ncfile.getIosp();
    if (iosp == null) return;
    if (!(iosp instanceof GridServiceProvider)) return;
View Full Code Here

Examples of ucar.nc2.dataset.NetcdfDataset

    String wantName = (pos > -1) ? matchPath.substring(pos + 1) : matchPath;
    String hasName = StringUtil.replace(name, ' ', "_") + "_";

    try {
      if (wantType.equals(FILES)) {
        NetcdfDataset ncd = getNetcdfDataset(matchPath);
        return ncd == null ? null : new ucar.nc2.dt.grid.GridDataset(ncd);

      } else if (wantName.equals(hasName + FMRC) && wantDatasets.contains(FeatureCollectionConfig.FmrcDatasetType.TwoD)) {
        return fmrc.getDataset2D(null);
View Full Code Here

Examples of ucar.nc2.dataset.NetcdfDataset

  }

  static public TrajectoryObsDataset open( String netcdfFileURI, ucar.nc2.util.CancelTask cancelTask)
          throws  IOException
  {
    NetcdfDataset ds = NetcdfDataset.acquireDataset( netcdfFileURI, cancelTask);
    if ( RafTrajectoryObsDataset.isValidFile( ds) )
      return new RafTrajectoryObsDataset( ds);
    else if ( SimpleTrajectoryObsDataset.isValidFile( ds))
      return new SimpleTrajectoryObsDataset( ds);
    else if ( Float10TrajectoryObsDataset.isValidFile( ds))
View Full Code Here

Examples of ucar.nc2.dataset.NetcdfDataset

      DODSNetcdfFile.debugServerCall = true;
      DODSNetcdfFile.debugCE = true;
      DODSNetcdfFile.debugDataResult = true;
      DODSNetcdfFile.debugConvertData = true;

      NetcdfDataset ds = NetcdfDataset.openDataset("C:/data/ncml/oceanwatch.ncml");
      // System.out.println("ds= "+ ds.toString());

      new SequenceObsDataset(ds, null);

    }
View Full Code Here

Examples of ucar.nc2.dataset.NetcdfDataset

    testEnhanceEquals("file:R:/testdata/2008TrainingWorkshop/tds/knmi/RAD___TEST_R_C_NL25PCP_L___20080720T000000_200807201T015500_0001_resampledto256x256.ncml");
  }

  private void testEquals(String ncmlLocation) throws  IOException {
    System.out.println("testEquals");
    NetcdfDataset ncd = NcMLReader.readNcML(ncmlLocation, null);

    String locref  = ncd.getReferencedFile().getLocation();
    NetcdfDataset ncdref = NetcdfDataset.openDataset(locref, false, null);

    CompareNetcdf.compareFiles(ncd, ncdref, false, true, false);

    ncd.close();
    ncdref.close();
  }
View Full Code Here

Examples of ucar.nc2.dataset.NetcdfDataset

    ncdref.close();
  }

  private void testEnhanceEquals(String ncmlLocation) throws  IOException {
    System.out.println("testEnhanceEquals");
    NetcdfDataset ncml = NcMLReader.readNcML(ncmlLocation, null);
    NetcdfDataset ncmlEnhanced = new NetcdfDataset(ncml, true);

    String locref  = ncml.getReferencedFile().getLocation();
    NetcdfDataset ncdrefEnhanced = NetcdfDataset.openDataset(locref, true, null);

    CompareNetcdf.compareFiles(ncmlEnhanced, ncdrefEnhanced, false, true, false);

    ncml.close();
    ncdrefEnhanced.close();
  }
View Full Code Here

Examples of ucar.nc2.dataset.NetcdfDataset

    List<VariableSimpleIF> dataVars = new ArrayList<VariableSimpleIF>();
    ucar.nc2.NetcdfFile ncfile = pfDataset.getNetcdfFile();
    if ((ncfile == null) || !(ncfile instanceof NetcdfDataset))  {
      dataVars.addAll(pfDataset.getDataVariables());
    } else {
      NetcdfDataset ncd = (NetcdfDataset) ncfile;
      for (VariableSimpleIF vs : pfDataset.getDataVariables()) {
        if (ncd.findCoordinateAxis(vs.getShortName()) == null)
          dataVars.add(vs);
      }
    }

    int count = 0;
View Full Code Here

Examples of ucar.nc2.dataset.NetcdfDataset

    long start = System.currentTimeMillis();

    // do it in memory for speed
    NetcdfFile ncfile = inMemory ? NetcdfFile.openInMemory(fileIn) : NetcdfFile.open(fileIn);
    NetcdfDataset ncd = new NetcdfDataset(ncfile);

    StringBuilder errlog = new StringBuilder();
    PointObsDataset pobsDataset = (PointObsDataset) TypedDatasetFactory.open(FeatureType.POINT, ncd, null, errlog);

    FileOutputStream fos = new FileOutputStream(fileOut);
View Full Code Here

Examples of ucar.nc2.dataset.NetcdfDataset

    long start = System.currentTimeMillis();

    // do it in memory for speed
    NetcdfFile ncfile = inMemory ? NetcdfFile.openInMemory(fileIn) : NetcdfFile.open(fileIn);
    NetcdfDataset ncd = new NetcdfDataset(ncfile);

    StringBuilder errlog = new StringBuilder();
    PointObsDataset pobsDataset = (PointObsDataset) TypedDatasetFactory.open(FeatureType.POINT, ncd, null, errlog);
    if (pobsDataset == null) return false;
View Full Code Here

Examples of ucar.nc2.dataset.NetcdfDataset

    long start = System.currentTimeMillis();

    // do it in memory for speed
    NetcdfFile ncfile = inMemory ? NetcdfFile.openInMemory(fileIn) : NetcdfFile.open(fileIn);
    NetcdfDataset ncd = new NetcdfDataset(ncfile);

    Formatter errlog = new Formatter();
    FeatureDataset fd = FeatureDatasetFactoryManager.wrap(FeatureType.ANY_POINT, ncd, null, errlog);
    if (fd == null) return false;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.