protected TableConfig getPointConfig(NetcdfDataset ds, EncodingInfo info, Formatter errlog) throws IOException { if (info.time.getRank() != 1) { errlog.format("CFpointObs type=point: coord time must have rank 1, coord var= %s %n", info.time.getNameAndDimensions()); return null; } Dimension obsDim = info.time.getDimension(0); TableConfig obsTable = makeSingle(ds, obsDim, errlog); obsTable.featureType = FeatureType.POINT; return obsTable; }
private TableConfig getPointConfig(NetcdfDataset ds, EncodingInfo info, Formatter errlog) throws IOException { if (info.time.getRank() != 1) { errlog.format("CFpointObs type=point: coord time must have rank 1, coord var= %s %n", info.time.getNameAndDimensions()); return null; } Dimension obsDim = info.time.getDimension(0); TableConfig obsTable = makeSingle(ds, obsDim, errlog); obsTable.featureType = FeatureType.POINT; return obsTable; }
protected TableConfig getPointConfig(NetcdfDataset ds, EncodingInfo info, Formatter errlog) throws IOException { if (info.time.getRank() != 1) { errlog.format("CFpointObs type=point: coord time must have rank 1, coord var= %s %n", info.time.getNameAndDimensions()); return null; } Dimension obsDim = info.time.getDimension(0); TableConfig obsTable = makeSingle(ds, obsDim, errlog); obsTable.featureType = FeatureType.POINT; return obsTable; }
private boolean checkCoordinates(NetcdfDataset ds, EncodingInfo info, Formatter errlog) { boolean ok = true; info.time = CoordSysEvaluator.findCoordByType(ds, AxisType.Time); if (info.time == null) { errlog.format("CFpointObs cant find a Time coordinate %n"); ok = false; } // find lat coord info.lat = CoordSysEvaluator.findCoordByType(ds, AxisType.Lat); if (info.lat == null) { errlog.format("CFpointObs cant find a Latitude coordinate %n"); ok = false; } // find lon coord info.lon = CoordSysEvaluator.findCoordByType(ds, AxisType.Lon); if (info.lon == null) { errlog.format("CFpointObs cant find a Longitude coordinate %n"); ok = false; } if (!ok) return false; // dimensions must match List<Dimension> dimLat = info.lat.getDimensions(); List<Dimension> dimLon = info.lon.getDimensions(); if (!dimLat.equals(dimLon)) { errlog.format("CFpointObs Lat, Lon coordinate dimensions must match lat=%s lon=%s %n", info.lat.getNameAndDimensions(), info.lon.getNameAndDimensions()); ok = false; } return ok; }
@Override public void getDetailInfo(Formatter f) { super.getDetailInfo(f); f.format(" timeUnitsChange=%s%n", timeUnitsChange); f.format(" totalCoords=%d%n", totalCoords); if (aggVarNames.size() > 0) { f.format(" Aggregation Variables specified in NcML%n"); for (String vname : aggVarNames) f.format(" %s%n", vname); } f.format("%nAggregation Variables%n"); for (VariableDS vds : aggVars) { f.format(" "); vds.getNameAndDimensions(f, true, false); f.format("%n"); } if (cacheList.size() > 0) { f.format("%nCache Variables%n"); for (CacheVar cv : cacheList) f.format(" %s%n", cv); } f.format("%nVariable Proxies%n"); for (Variable v : ncDataset.getVariables()) { if (v.hasCachedData()) { f.format(" %20s cached%n", v.getShortName()); } else { f.format(" %20s proxy %s%n", v.getShortName(), v.getProxyReader().getClass().getName()); } } }
@Override public void getDetailInfo(Formatter f) { super.getDetailInfo(f); f.format(" timeUnitsChange=%s%n", timeUnitsChange); f.format(" totalCoords=%d%n", totalCoords); if (aggVarNames.size() > 0) { f.format(" Aggregation Variables specified in NcML%n"); for (String vname : aggVarNames) f.format(" %s%n", vname); } f.format("%nAggregation Variables%n"); for (VariableDS vds : aggVars) { f.format(" "); vds.getNameAndDimensions(f, true, false); f.format("%n"); } if (cacheList.size() > 0) { f.format("%nCache Variables%n"); for (CacheVar cv : cacheList) f.format(" %s%n", cv); } f.format("%nVariable Proxies%n"); for (Variable v : ncDataset.getVariables()) { if (v.hasCachedData()) { f.format(" %20s cached%n", v.getShortName()); } else { f.format(" %20s proxy %s%n", v.getShortName(), v.getProxyReader().getClass().getName()); } } }
@Override public void getDetailInfo(Formatter f) { super.getDetailInfo(f); f.format(" timeUnitsChange=%s%n", timeUnitsChange); f.format(" totalCoords=%d%n", totalCoords); if (aggVarNames.size() > 0) { f.format(" Aggregation Variables specified in NcML%n"); for (String vname : aggVarNames) f.format(" %s%n", vname); } f.format("%nAggregation Variables%n"); for (VariableDS vds : aggVars) { f.format(" "); vds.getNameAndDimensions(f, true, false); f.format("%n"); } if (cacheList.size() > 0) { f.format("%nCache Variables%n"); for (CacheVar cv : cacheList) f.format(" %s%n", cv); } f.format("%nVariable Proxies%n"); for (Variable v : ncDataset.getVariables()) { if (v.hasCachedData()) { f.format(" %20s cached%n", v.getShortName()); } else { f.format(" %20s proxy %s%n", v.getShortName(), v.getProxyReader().getClass().getName()); } } }
protected boolean checkCoordinates(NetcdfDataset ds, EncodingInfo info, Formatter errlog) { boolean ok = true; info.time = CoordSysEvaluator.findCoordByType(ds, AxisType.Time); if (info.time == null) { errlog.format("CFpointObs cant find a Time coordinate %n"); ok = false; } // find lat coord info.lat = CoordSysEvaluator.findCoordByType(ds, AxisType.Lat); if (info.lat == null) { errlog.format("CFpointObs cant find a Latitude coordinate %n"); ok = false; } // find lon coord info.lon = CoordSysEvaluator.findCoordByType(ds, AxisType.Lon); if (info.lon == null) { errlog.format("CFpointObs cant find a Longitude coordinate %n"); ok = false; } if (!ok) return false; // dimensions must match List<Dimension> dimLat = info.lat.getDimensions(); List<Dimension> dimLon = info.lon.getDimensions(); if (!dimLat.equals(dimLon)) { errlog.format("CFpointObs Lat, Lon coordinate dimensions must match lat=%s lon=%s %n", info.lat.getNameAndDimensions(), info.lon.getNameAndDimensions()); ok = false; } return ok; }
protected boolean checkCoordinates(NetcdfDataset ds, EncodingInfo info, Formatter errlog) { boolean ok = true; info.time = CoordSysEvaluator.findCoordByType(ds, AxisType.Time); if (info.time == null) { errlog.format("CFpointObs cant find a Time coordinate %n"); ok = false; } // find lat coord info.lat = CoordSysEvaluator.findCoordByType(ds, AxisType.Lat); if (info.lat == null) { errlog.format("CFpointObs cant find a Latitude coordinate %n"); ok = false; } // find lon coord info.lon = CoordSysEvaluator.findCoordByType(ds, AxisType.Lon); if (info.lon == null) { errlog.format("CFpointObs cant find a Longitude coordinate %n"); ok = false; } if (!ok) return false; // dimensions must match List<Dimension> dimLat = info.lat.getDimensions(); List<Dimension> dimLon = info.lon.getDimensions(); if (!dimLat.equals(dimLon)) { errlog.format("CFpointObs Lat, Lon coordinate dimensions must match lat=%s lon=%s %n", info.lat.getNameAndDimensions(), info.lon.getNameAndDimensions()); ok = false; } return ok; }