visad/src/main/java/ucar/nc2/iosp/gempak/GempakSoundingIOSP.java
private Array readSoundingData(Variable v2, Section section, boolean isMerged) throws IOException {

    Array array = null;
    if (v2 instanceof Structure) {

      Range stationRange = section.getRange(0);
      Range timeRange = section.getRange(1);
      int size = stationRange.length() * timeRange.length();

      Structure pdata = (Structure) v2;
      StructureMembers members = pdata.makeStructureMembers();
      ArrayStructureBB.setOffsets(members);
      ArrayStructureBB abb = new ArrayStructureBB(members, new int[]{size});
      ByteBuffer buf = abb.getByteBuffer();

      for (int stnIdx : stationRange) {
        for (int timeIdx : timeRange) {
          List<String> parts = (isMerged) ? ((GempakSoundingFileReader) gemreader).getMergedParts()
                  : ((GempakSoundingFileReader) gemreader).getUnmergedParts();
          boolean allMissing = true;

          for (String part : parts) {
            List<GempakParameter> params = gemreader.getParameters(part);
            GempakFileReader.RData vals = gemreader.DM_RDTR(timeIdx + 1, stnIdx + 1, part);
            ArraySequence aseq;
            Sequence seq = (Sequence) pdata.findVariable(part);
            if (vals == null) {
              aseq = makeEmptySequence(seq);
            } else {
              allMissing = false;
              aseq = makeArraySequence(seq, params, vals.data);
            }
            int index = abb.addObjectToHeap(aseq);
            buf.putInt(index);
          }
          buf.put((byte) (allMissing ? 1 : 0));
        }
      }
      array = abb;
    }
    return array;
  }
private Array readSoundingData(Variable v2, Section section, boolean isMerged) throws IOException {

    Array array = null;
    if (v2 instanceof Structure) {

      Range stationRange = section.getRange(0);
      Range timeRange = section.getRange(1);
      int size = stationRange.length() * timeRange.length();

      Structure pdata = (Structure) v2;
      StructureMembers members = pdata.makeStructureMembers();
      ArrayStructureBB.setOffsets(members);
      ArrayStructureBB abb = new ArrayStructureBB(members, new int[]{size});
      ByteBuffer buf = abb.getByteBuffer();

      for (int stnIdx : stationRange) {
        for (int timeIdx : timeRange) {
          List<String> parts = (isMerged) ? ((GempakSoundingFileReader) gemreader).getMergedParts()
                  : ((GempakSoundingFileReader) gemreader).getUnmergedParts();
          boolean allMissing = true;

          for (String part : parts) {
            List<GempakParameter> params = gemreader.getParameters(part);
            GempakFileReader.RData vals = gemreader.DM_RDTR(timeIdx + 1, stnIdx + 1, part);
            ArraySequence aseq;
            Sequence seq = (Sequence) pdata.findVariable(part);
            if (vals == null) {
              aseq = makeEmptySequence(seq);
            } else {
              allMissing = false;
              aseq = makeArraySequence(seq, params, vals.data);
            }
            int index = abb.addObjectToHeap(aseq);
            buf.putInt(index);
          }
          buf.put((byte) (allMissing ? 1 : 0));
        }
      }
      array = abb;
    }
    return array;
  }
Read in the data for the variable.  In this case, it should be
a Structure.  The section should be rank 2 (station, time).

@param v2       variable to read
@param section  section of the variable
@param isMerged flag for merged data or not
@return the array of data
@throws IOException problem reading the file