cdm/src/main/java/ucar/nc2/NetcdfFileWriter.java
public void write(Variable v, Array values) throws java.io.IOException, InvalidRangeException {
    if (ncfile != v.getNetcdfFile())
      throw new IllegalArgumentException("Variable is not owned by this writer.");

    write(v, new int[values.getRank()], values);
  }
public void write(Variable v, Array values) throws java.io.IOException, InvalidRangeException {
    if (ncfile != v.getNetcdfFile())
      throw new IllegalArgumentException("Variable is not owned by this writer.");

    write(v, new int[values.getRank()], values);
  }
Write data to the named variable, origin assumed to be 0. Must not be in define mode.

@param v      variable to write to
@param values write this array; must be same type and rank as Variable
@throws IOException                    if I/O error
@throws ucar.ma2.InvalidRangeException if values Array has illegal shape