cdm/src/main/java/ucar/nc2/NCdumpW.java
static public String printVariableDataSection(Variable v, String sectionSpec, ucar.nc2.util.CancelTask ct) throws IOException, InvalidRangeException {
    Array data = v.read(sectionSpec);

    StringWriter writer = new StringWriter(20000);
    printArray(data, v.getFullName(), new PrintWriter(writer), new Indent(2), ct);
    return writer.toString();
  }
static public String printVariableDataSection(Variable v, String sectionSpec, ucar.nc2.util.CancelTask ct) throws IOException, InvalidRangeException {
    Array data = v.read(sectionSpec);

    StringWriter writer = new StringWriter(20000);
    printArray(data, v.getFullName(), new PrintWriter(writer), new Indent(2), ct);
    return writer.toString();
  }
Print a section of the data of the given Variable.

@param v           variable to print
@param sectionSpec string specification
@param ct          allow task to be cancelled; may be null.
@return String result formatted data ouptut
@throws IOException           on write error
@throws InvalidRangeException is specified section doesnt match variable shape