cdm/src/main/java/ucar/nc2/dataset/NetcdfDataset.java
public void setValues(Variable v, int npts, double start, double incr) {
    if (npts != v.getSize())
      throw new IllegalArgumentException("bad npts = " + npts + " should be " + v.getSize());
    Array data = Array.makeArray(v.getDataType(), npts, start, incr);
    if (v.getRank() != 1)
      data = data.reshape(v.getShape());
    v.setCachedData(data, true);
  }
public void setValues(Variable v, int npts, double start, double incr) {
    if (npts != v.getSize())
      throw new IllegalArgumentException("bad npts = " + npts + " should be " + v.getSize());
    Array data = Array.makeArray(v.getDataType(), npts, start, incr);
    if (v.getRank() != 1)
      data = data.reshape(v.getShape());
    v.setCachedData(data, true);
  }
public void setValues ( Variable v , int npts , double start , double incr ) { if ( npts != v . getSize ( ) ) throw new IllegalArgumentException ( "bad npts = " + npts + " should be " + v . getSize ( ) ) ; Array data = Array . makeArray ( v . getDataType ( ) , npts , start , incr ) ; if ( v . getRank ( ) != 1 ) data = data . reshape ( v . getShape ( ) ) ; v . setCachedData ( data , true ) ; }
Generate the list of values from a starting value and an increment.
Will reshape to variable if needed.

@param v     for this variable
@param npts  number of values, must = v.getSize()
@param start starting value
@param incr  increment
@deprecated use Variable.setValues()
Generate the list of values from a starting value and an increment . Will reshape to variable if needed .