public void augmentDataset(NetcdfDataset ncDataset, CancelTask cancelTask) throws IOException { NcMLReader.wrapNcMLresource(ncDataset, CoordSysBuilder.resourcesDir + "ATDRadar.ncml", cancelTask); }
public void augmentDataset(NetcdfDataset ncDataset, CancelTask cancelTask) throws IOException { NcMLReader.wrapNcMLresource(ncDataset, CoordSysBuilder.resourcesDir + "ATDRadar.ncml", cancelTask); }
public void augmentDataset(NetcdfDataset ncDataset, CancelTask cancelTask) throws IOException { NcMLReader.wrapNcMLresource(ncDataset, CoordSysBuilder.resourcesDir + "ATDRadar.ncml", cancelTask); }
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(); }
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(); }
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(); }
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); }
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); }
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); }
public void augmentDataset( NetcdfDataset ds, CancelTask cancelTask) throws IOException { NcMLReader.wrapNcMLresource( ds, CoordSysBuilder.resourcesDir+"GIEF.ncml", cancelTask);
public void augmentDataset( NetcdfDataset ds, CancelTask cancelTask) throws IOException { NcMLReader.wrapNcMLresource( ds, CoordSysBuilder.resourcesDir+"GIEF.ncml", cancelTask);
public void augmentDataset( NetcdfDataset ds, CancelTask cancelTask) throws IOException { NcMLReader.wrapNcMLresource( ds, CoordSysBuilder.resourcesDir+"GIEF.ncml", cancelTask);
NcMLReader.wrapNcMLresource(ncDataset, CoordSysBuilder.resourcesDir + "CEDRICRadar.ncml", cancelTask); Variable lat = ncDataset.findVariable("radar_latitude"); Variable lon = ncDataset.findVariable("radar_longitude");
NcMLReader.wrapNcMLresource(ncDataset, CoordSysBuilder.resourcesDir + "CEDRICRadar.ncml", cancelTask); Variable lat = ncDataset.findVariable("radar_latitude"); Variable lon = ncDataset.findVariable("radar_longitude");
NcMLReader.wrapNcMLresource(ncDataset, CoordSysBuilder.resourcesDir + "CEDRICRadar.ncml", cancelTask); Variable lat = ncDataset.findVariable("radar_latitude"); Variable lon = ncDataset.findVariable("radar_longitude");