congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
NcMLReader.wrapNcMLresource
Code IndexAdd Tabnine to your IDE (free)

How to use
wrapNcMLresource
method
in
ucar.nc2.ncml.NcMLReader

Best Java code snippets using ucar.nc2.ncml.NcMLReader.wrapNcMLresource (Showing top 15 results out of 315)

origin: edu.ucar/cdm

public void augmentDataset(NetcdfDataset ncDataset, CancelTask cancelTask) throws IOException {
 NcMLReader.wrapNcMLresource(ncDataset, CoordSysBuilder.resourcesDir + "ATDRadar.ncml", cancelTask);
}
origin: edu.ucar/netcdf

public void augmentDataset(NetcdfDataset ncDataset, CancelTask cancelTask) throws IOException {
 NcMLReader.wrapNcMLresource(ncDataset, CoordSysBuilder.resourcesDir + "ATDRadar.ncml", cancelTask);
}
origin: Unidata/thredds

public void augmentDataset(NetcdfDataset ncDataset, CancelTask cancelTask) throws IOException {
 NcMLReader.wrapNcMLresource(ncDataset, CoordSysBuilder.resourcesDir + "ATDRadar.ncml", cancelTask);
}
origin: Unidata/thredds

protected void init(String ncmlURL) throws IOException {
 NcMLReader.wrapNcMLresource(dataset, ncmlURL, null);
 stationIdName = dataset.findAttValueIgnoreCase(null, "_StationIdVar", null);
 descName = dataset.findAttValueIgnoreCase(null, "_StationDescVar", null); // ok if null
 latName = dataset.findAttValueIgnoreCase(null, "_StationLatVar", null);
 lonName = dataset.findAttValueIgnoreCase(null, "_StationLonVar", null);
 elevName = dataset.findAttValueIgnoreCase(null, "_StationElevVar", null);
 timeName = dataset.findAttValueIgnoreCase(null, "_StationTimeVar", null);
 timeNominalName = dataset.findAttValueIgnoreCase(null, "_StationTimeNominalVar", null);
 recordHelper = new RecordDatasetHelper(dataset, timeName, timeNominalName, dataVariables);
 recordHelper.setStationInfo( stationIdName, descName);
 recordHelper.setLocationInfo( latName, lonName, elevName);
 removeDataVariable(latName);
 removeDataVariable(lonName);
 removeDataVariable(elevName);
 removeDataVariable(timeName);
 removeDataVariable(timeNominalName);
 records = recordHelper.readAllCreateObs( null);
 stations = new ArrayList(recordHelper.stnHash.values());
 setTimeUnits();
 setStartDate();
 setEndDate();
 setBoundingBox();
}
origin: edu.ucar/netcdf

protected void init(String ncmlURL) throws IOException {
 NcMLReader.wrapNcMLresource(dataset, ncmlURL, null);
 stationIdName = dataset.findAttValueIgnoreCase(null, "_StationIdVar", null);
 descName = dataset.findAttValueIgnoreCase(null, "_StationDescVar", null); // ok if null
 latName = dataset.findAttValueIgnoreCase(null, "_StationLatVar", null);
 lonName = dataset.findAttValueIgnoreCase(null, "_StationLonVar", null);
 elevName = dataset.findAttValueIgnoreCase(null, "_StationElevVar", null);
 timeName = dataset.findAttValueIgnoreCase(null, "_StationTimeVar", null);
 timeNominalName = dataset.findAttValueIgnoreCase(null, "_StationTimeNominalVar", null);
 recordHelper = new RecordDatasetHelper(dataset, timeName, timeNominalName, dataVariables);
 recordHelper.setStationInfo( stationIdName, descName);
 recordHelper.setLocationInfo( latName, lonName, elevName);
 removeDataVariable(latName);
 removeDataVariable(lonName);
 removeDataVariable(elevName);
 removeDataVariable(timeName);
 removeDataVariable(timeNominalName);
 records = recordHelper.readAllCreateObs( null);
 stations = new ArrayList(recordHelper.stnHash.values());
 setTimeUnits();
 setStartDate();
 setEndDate();
 setBoundingBox();
}
origin: edu.ucar/cdm

protected void init(String ncmlURL) throws IOException {
 NcMLReader.wrapNcMLresource(dataset, ncmlURL, null);
 stationIdName = dataset.findAttValueIgnoreCase(null, "_StationIdVar", null);
 descName = dataset.findAttValueIgnoreCase(null, "_StationDescVar", null); // ok if null
 latName = dataset.findAttValueIgnoreCase(null, "_StationLatVar", null);
 lonName = dataset.findAttValueIgnoreCase(null, "_StationLonVar", null);
 elevName = dataset.findAttValueIgnoreCase(null, "_StationElevVar", null);
 timeName = dataset.findAttValueIgnoreCase(null, "_StationTimeVar", null);
 timeNominalName = dataset.findAttValueIgnoreCase(null, "_StationTimeNominalVar", null);
 recordHelper = new RecordDatasetHelper(dataset, timeName, timeNominalName, dataVariables);
 recordHelper.setStationInfo( stationIdName, descName);
 recordHelper.setLocationInfo( latName, lonName, elevName);
 removeDataVariable(latName);
 removeDataVariable(lonName);
 removeDataVariable(elevName);
 removeDataVariable(timeName);
 removeDataVariable(timeNominalName);
 records = recordHelper.readAllCreateObs( null);
 stations = new ArrayList(recordHelper.stnHash.values());
 setTimeUnits();
 setStartDate();
 setEndDate();
 setBoundingBox();
}
origin: edu.ucar/netcdf

public void augmentDataset(NetcdfDataset ds, CancelTask cancelTask) throws IOException {
 NcMLReader.wrapNcMLresource(ds, CoordSysBuilder.resourcesDir + "Zebra.ncml", cancelTask);
 // special time handling
 // the time coord var is created in the NcML
 // set its values = base_time + time_offset(time)
 Dimension timeDim = ds.findDimension("time");
 Variable base_time = ds.findVariable("base_time");
 Variable time_offset = ds.findVariable("time_offset");
 Variable time = ds.findVariable("time");
 if ((timeDim == null) || (base_time == null) || (time_offset == null) || (time == null))
  return;
 Attribute att = base_time.findAttribute(CDM.UNITS);
 String units = (att != null) ? att.getStringValue() : "seconds since 1970-01-01 00:00 UTC";
 time.addAttribute(new Attribute(CDM.UNITS, units));
 Array data;
 try {
  double baseValue = base_time.readScalarDouble();
  data = time_offset.read();
  IndexIterator iter = data.getIndexIterator();
  while (iter.hasNext())
   iter.setDoubleCurrent(iter.getDoubleNext() + baseValue);
 } catch (java.io.IOException ioe) {
  parseInfo.format("ZebraConvention failed to create time Coord Axis for file %s err= %s\n", ds.getLocation(), ioe);
  return;
 }
 time.setCachedData(data, true);
}
origin: edu.ucar/cdm

public void augmentDataset(NetcdfDataset ds, CancelTask cancelTask) throws IOException {
 NcMLReader.wrapNcMLresource(ds, CoordSysBuilder.resourcesDir + "Zebra.ncml", cancelTask);
 // special time handling
 // the time coord var is created in the NcML
 // set its values = base_time + time_offset(time)
 Dimension timeDim = ds.findDimension("time");
 Variable base_time = ds.findVariable("base_time");
 Variable time_offset = ds.findVariable("time_offset");
 Variable time = ds.findVariable("time");
 if ((timeDim == null) || (base_time == null) || (time_offset == null) || (time == null))
  return;
 Attribute att = base_time.findAttribute(CDM.UNITS);
 String units = (att != null) ? att.getStringValue() : "seconds since 1970-01-01 00:00 UTC";
 time.addAttribute(new Attribute(CDM.UNITS, units));
 Array data;
 try {
  double baseValue = base_time.readScalarDouble();
  data = time_offset.read();
  IndexIterator iter = data.getIndexIterator();
  while (iter.hasNext())
   iter.setDoubleCurrent(iter.getDoubleNext() + baseValue);
 } catch (java.io.IOException ioe) {
  parseInfo.format("ZebraConvention failed to create time Coord Axis for file %s err= %s%n", ds.getLocation(), ioe);
  return;
 }
 time.setCachedData(data, true);
}
origin: Unidata/thredds

public void augmentDataset(NetcdfDataset ds, CancelTask cancelTask) throws IOException {
 NcMLReader.wrapNcMLresource(ds, CoordSysBuilder.resourcesDir + "Zebra.ncml", cancelTask);
 // special time handling
 // the time coord var is created in the NcML
 // set its values = base_time + time_offset(time)
 Dimension timeDim = ds.findDimension("time");
 Variable base_time = ds.findVariable("base_time");
 Variable time_offset = ds.findVariable("time_offset");
 Variable time = ds.findVariable("time");
 if ((timeDim == null) || (base_time == null) || (time_offset == null) || (time == null))
  return;
 Attribute att = base_time.findAttribute(CDM.UNITS);
 String units = (att != null) ? att.getStringValue() : "seconds since 1970-01-01 00:00 UTC";
 time.addAttribute(new Attribute(CDM.UNITS, units));
 Array data;
 try {
  double baseValue = base_time.readScalarDouble();
  data = time_offset.read();
  IndexIterator iter = data.getIndexIterator();
  while (iter.hasNext())
   iter.setDoubleCurrent(iter.getDoubleNext() + baseValue);
 } catch (java.io.IOException ioe) {
  parseInfo.format("ZebraConvention failed to create time Coord Axis for file %s err= %s%n", ds.getLocation(), ioe);
  return;
 }
 time.setCachedData(data, true);
}
origin: edu.ucar/netcdf

public void augmentDataset( NetcdfDataset ds, CancelTask cancelTask) throws IOException {
 NcMLReader.wrapNcMLresource( ds, CoordSysBuilder.resourcesDir+"GIEF.ncml", cancelTask);
origin: edu.ucar/cdm

public void augmentDataset( NetcdfDataset ds, CancelTask cancelTask) throws IOException {
 NcMLReader.wrapNcMLresource( ds, CoordSysBuilder.resourcesDir+"GIEF.ncml", cancelTask);
origin: Unidata/thredds

public void augmentDataset( NetcdfDataset ds, CancelTask cancelTask) throws IOException {
 NcMLReader.wrapNcMLresource( ds, CoordSysBuilder.resourcesDir+"GIEF.ncml", cancelTask);
origin: Unidata/thredds

NcMLReader.wrapNcMLresource(ncDataset, CoordSysBuilder.resourcesDir + "CEDRICRadar.ncml", cancelTask);
Variable lat = ncDataset.findVariable("radar_latitude");
Variable lon = ncDataset.findVariable("radar_longitude");
origin: edu.ucar/netcdf

NcMLReader.wrapNcMLresource(ncDataset, CoordSysBuilder.resourcesDir + "CEDRICRadar.ncml", cancelTask);
Variable lat = ncDataset.findVariable("radar_latitude");
Variable lon = ncDataset.findVariable("radar_longitude");
origin: edu.ucar/cdm

NcMLReader.wrapNcMLresource(ncDataset, CoordSysBuilder.resourcesDir + "CEDRICRadar.ncml", cancelTask);
Variable lat = ncDataset.findVariable("radar_latitude");
Variable lon = ncDataset.findVariable("radar_longitude");
ucar.nc2.ncmlNcMLReaderwrapNcMLresource

Javadoc

Use NCML to modify a dataset, getting the NcML document as a resource stream. Uses ClassLoader.getResourceAsStream(ncmlResourceLocation), so the NcML can be inside of a jar file, for example.

Popular methods of NcMLReader

  • readNcML
    Read an NcML file from a URL location, and construct a NetcdfDataset.
  • wrapNcML
    Use NCML to modify the dataset, getting NcML from a URL
  • <init>
  • addAttribute
  • cmdRemove
  • findAttribute
  • mergeNcML
    Use NCML to modify the referenced dataset, create a new dataset with the merged info Used to wrap ea
  • mergeNcMLdirect
    Use NCML to directly modify the dataset
  • readAgg
  • readAtt
    Read an NcML attribute element.
  • readAttributeValues
    Parse the values element
  • readDim
    Read an NcML dimension element.
  • readAttributeValues,
  • readDim,
  • readGroup,
  • readNetcdf,
  • readValues,
  • readVariable,
  • readVariableNested,
  • readVariableNew,
  • removeAttribute

Popular in Java

  • Reading from database using SQL prepared statement
  • compareTo (BigDecimal)
  • addToBackStack (FragmentTransaction)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • JList (javax.swing)
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now