Array dataArray = Array.factory(DataType.FLOAT, section.getShape());
GradsVariable gradsVar = findVar(v2);
// Canonical ordering is ens, time, level, lat, lon
int rangeIdx = 0;
Range ensRange = (gradsDDF.getEnsembleDimension() != null)
? section.getRange(rangeIdx++)
: new Range(0, 0);
Range timeRange = (section.getRank() > 2)
? section.getRange(rangeIdx++)
: new Range(0, 0);
Range levRange = (gradsVar.getNumLevels() > 0)
? section.getRange(rangeIdx++)
: new Range(0, 0);
Range yRange = section.getRange(rangeIdx++);
Range xRange = section.getRange(rangeIdx);
IndexIterator ii = dataArray.getIndexIterator();
// loop over ens
for (int ensIdx = ensRange.first(); ensIdx <= ensRange.last();