visad/src/main/java/ucar/nc2/iosp/gempak/GempakSoundingFileReader.java
public void printOb(int row, int col) {
    GempakStation station = getStations().get(col - 1);
    String time = getDateString(row - 1);
    StringBuilder builder = new StringBuilder("\n");
    builder.append(makeHeader(station, time));
    builder.append("\n");
    boolean merge = getFileSubType().equals(MERGED);
    List<String> parts;
    if (merge) {
      parts = new ArrayList<>();
      parts.add(SNDT);
    } else {
      parts = unmergedParts;
    }
    for (String part : parts) {
      RData rd;
      try {
        rd = DM_RDTR(row, col, part);
      } catch (IOException ioe) {
        ioe.printStackTrace();
        rd = null;
      }
      if (rd == null) {
        continue;
      }
      if (!merge) {
        builder.append("    ");
        builder.append(part);
        builder.append("    ");
        builder.append(time.substring(time.indexOf("/") + 1));
      }
      builder.append("\n");
      if (!merge) {
        builder.append("\t");
      }
      List<GempakParameter> params = getParameters(part);
      for (GempakParameter parm : params) {
        builder.append(StringUtil2.padLeft(parm.getName(), 7));
        builder.append("\t");
      }
      builder.append("\n");
      if (!merge) {
        builder.append("\t");
      }
      float[] data = rd.data;
      int numParams = params.size();
      int numLevels = data.length / numParams;
      for (int j = 0; j < numLevels; j++) {
        for (int i = 0; i < numParams; i++) {
          builder.append(
                  StringUtil2.padLeft(
                          Format.formatDouble(
                                  data[j * numParams + i], 7, 1), 7));
          builder.append("\t");
        }
        builder.append("\n");
        if (!merge) {
          builder.append("\t");
        }
      }
      builder.append("\n");
    }
    builder.append("\n");
    System.out.println(builder.toString());
  }
public void printOb(int row, int col) {
    GempakStation station = getStations().get(col - 1);
    String time = getDateString(row - 1);
    StringBuilder builder = new StringBuilder("\n");
    builder.append(makeHeader(station, time));
    builder.append("\n");
    boolean merge = getFileSubType().equals(MERGED);
    List<String> parts;
    if (merge) {
      parts = new ArrayList<>();
      parts.add(SNDT);
    } else {
      parts = unmergedParts;
    }
    for (String part : parts) {
      RData rd;
      try {
        rd = DM_RDTR(row, col, part);
      } catch (IOException ioe) {
        ioe.printStackTrace();
        rd = null;
      }
      if (rd == null) {
        continue;
      }
      if (!merge) {
        builder.append("    ");
        builder.append(part);
        builder.append("    ");
        builder.append(time.substring(time.indexOf("/") + 1));
      }
      builder.append("\n");
      if (!merge) {
        builder.append("\t");
      }
      List<GempakParameter> params = getParameters(part);
      for (GempakParameter parm : params) {
        builder.append(StringUtil2.padLeft(parm.getName(), 7));
        builder.append("\t");
      }
      builder.append("\n");
      if (!merge) {
        builder.append("\t");
      }
      float[] data = rd.data;
      int numParams = params.size();
      int numLevels = data.length / numParams;
      for (int j = 0; j < numLevels; j++) {
        for (int i = 0; i < numParams; i++) {
          builder.append(
                  StringUtil2.padLeft(
                          Format.formatDouble(
                                  data[j * numParams + i], 7, 1), 7));
          builder.append("\t");
        }
        builder.append("\n");
        if (!merge) {
          builder.append("\t");
        }
      }
      builder.append("\n");
    }
    builder.append("\n");
    System.out.println(builder.toString());
  }
public void printOb ( int row , int col ) { GempakStation station = getStations ( ) . get ( col - 1 ) ; String time = getDateString ( row - 1 ) ; StringBuilder builder = new StringBuilder ( "\n" ) ; builder . append ( makeHeader ( station , time ) ) ; builder . append ( "\n" ) ; boolean merge = getFileSubType ( ) . equals ( MERGED ) ; List < String > parts ; if ( merge ) { parts = new ArrayList <> ( ) ; parts . add ( SNDT ) ; } else { parts = unmergedParts ; } for ( String part : parts ) { RData rd ; try { rd = DM_RDTR ( row , col , part ) ; } catch ( IOException ioe ) { ioe . printStackTrace ( ) ; rd = null ; } if ( rd == null ) { continue ; } if ( ! merge ) { builder . append ( "    " ) ; builder . append ( part ) ; builder . append ( "    " ) ; builder . append ( time . substring ( time . indexOf ( "/" ) + 1 ) ) ; } builder . append ( "\n" ) ; if ( ! merge ) { builder . append ( "\t" ) ; } List < GempakParameter > params = getParameters ( part ) ; for ( GempakParameter parm : params ) { builder . append ( StringUtil2 . padLeft ( parm . getName ( ) , 7 ) ) ; builder . append ( "\t" ) ; } builder . append ( "\n" ) ; if ( ! merge ) { builder . append ( "\t" ) ; } float [ ] data = rd . data ; int numParams = params . size ( ) ; int numLevels = data . length / numParams ; for ( int j = 0 ; j < numLevels ; j ++ ) { for ( int i = 0 ; i < numParams ; i ++ ) { builder . append ( StringUtil2 . padLeft ( Format . formatDouble ( data [ j * numParams + i ] , 7 , 1 ) , 7 ) ) ; builder . append ( "\t" ) ; } builder . append ( "\n" ) ; if ( ! merge ) { builder . append ( "\t" ) ; } } builder . append ( "\n" ) ; } builder . append ( "\n" ) ; System . out . println ( builder . toString ( ) ) ; }
Print the list of dates in the file

@param row ob row
@param col ob column
Print the list of dates in the file