@Override public String getUnitsString() { String units = super.getUnitsString(); return units == null ? "" : units; }
@Override public String getUnitsString() { String units = super.getUnitsString(); return units == null ? "" : units; }
/** * get the unit as a string */ public String getUnitsString() { String units = vs.getUnitsString(); return (units == null) ? "" : units; }
/** * get the unit as a string */ public String getUnitsString() { String units = vs.getUnitsString(); return (units == null) ? "" : units; }
@Override public String getUnitsString() { String units = super.getUnitsString(); return units == null ? "" : units; }
/** * get the unit as a string */ public String getUnitsString() { String units = vs.getUnitsString(); return (units == null) ? "" : units; }
/** * get the unit as a string */ public String getUnitsString() { String units = vs.getUnitsString(); return (units == null) ? "" : units; }
@Override public String getUnitsString() { return coordVar.getUnitsString(); }
public String getUnitsString() { return varTop.getUnitsString(); }
@Override public String getUnitsString() { return varTop.getUnitsString(); }
public String getUnitsString() { return varTop.getUnitsString(); }
public String getUnitsString() { return coordVar.getUnitsString(); }
public String getUnitsString() { return coordVar.getUnitsString(); }
String unitString = variableDS.getUnitsString(); if (unitString != null) { try {
/** * Remove coordinate system info. */ public void clearCoordinateSystems() { this.enhanceProxy = new EnhancementsImpl( this, getUnitsString(), getDescription()); }
/** * Remove coordinate system info. */ @Override public void clearCoordinateSystems() { this.enhanceProxy = new EnhancementsImpl(this, getUnitsString(), getDescription()); }
/** * Remove coordinate system info. */ public void clearCoordinateSystems() { this.enhanceProxy = new EnhancementsImpl( this, getUnitsString(), getDescription()); }
private void writeVariable(VariableDS v, Array mdata) throws IOException { int count = 0; String name = v.getShortName(); String units = v.getUnitsString(); out.format("%svar='%s' units='%s' : ", indent, name, units); mdata.resetLocalIterator(); while (mdata.hasNext()) { if (count++ > 0) out.format(","); if (v.getDataType().isNumeric()) { double val = mdata.nextDouble(); if (v.isMissing(val)) { // check if missing out.format("missing"); } else { out.format("%s", Double.toString(val)); } } else { // not numeric out.format("%s", mdata.next()); } } out.format("%n"); }
/** * Constructor for CHAR or STRING variables. * Must be ISO dates. * * @param ncd the containing dataset * @param org the underlying Variable * @param errMessages put error messages here; may be null * @param dims list of dimensions * @throws IOException on read error * @throws IllegalArgumentException if cant convert coordinate values to a Date */ private CoordinateAxis1DTime(NetcdfDataset ncd, VariableDS org, Formatter errMessages, String dims) throws IOException { super(ncd, org.getParentGroup(), org.getShortName(), DataType.STRING, dims, org.getUnitsString(), org.getDescription()); this.ncd = ncd; //Gotta set the original var. Otherwise it would be unable to read the values this.orgVar = org; this.orgName = org.orgName; this.calendar = getCalendarFromAttribute(); if (org.getDataType() == DataType.CHAR) cdates = makeTimesFromChar(org, errMessages); else cdates = makeTimesFromStrings(org, errMessages); List<Attribute> atts = org.getAttributes(); for (Attribute att : atts) { addAttribute(att); } }
/** * Constructor for CHAR or STRING variables. * Must be ISO dates. * * @param ncd the containing dataset * @param org the underlying Variable * @param errMessages put error messages here; may be null * @param dims list of dimensions * @throws IOException on read error * @throws IllegalArgumentException if cant convert coordinate values to a Date */ private CoordinateAxis1DTime(NetcdfDataset ncd, VariableDS org, Formatter errMessages, String dims) throws IOException { super(ncd, org.getParentGroup(), org.getShortName(), DataType.STRING, dims, org.getUnitsString(), org.getDescription()); this.ncd = ncd; //Gotta set the original var. Otherwise it would be unable to read the values this.orgVar = org; this.orgName = org.orgName; this.helper = new CoordinateAxisTimeHelper(getCalendarFromAttribute(), null); if (org.getDataType() == DataType.CHAR) cdates = makeTimesFromChar(org, errMessages); else cdates = makeTimesFromStrings(org, errMessages); List<Attribute> atts = org.getAttributes(); for (Attribute att : atts) { addAttribute(att); } }