visad/src/main/java/ucar/nc2/iosp/gempak/GempakSurfaceFileReader.java
public void printOb(int row, int col) {
    int stnIndex = (getFileSubType().equals(CLIMATE))
            ? row
            : col;
    List<GempakStation> stations = getStations();
    if (stations.isEmpty() || stnIndex > stations.size()) {
      System.out.println("\nNo data available");
      return;
    }
    GempakStation station = getStations().get(stnIndex - 1);
    StringBuilder builder = new StringBuilder();
    builder.append("\nStation:\n");
    builder.append(station.toString());
    builder.append("\nObs\n\t");
    List<GempakParameter> params = getParameters(SFDT);
    for (GempakParameter parm : params) {
      builder.append(StringUtil2.padLeft(parm.getName(), 7));
      builder.append("\t");
    }
    builder.append("\n");
    RData rd;
    try {
      rd = DM_RDTR(row, col, SFDT);
    } catch (IOException ioe) {
      ioe.printStackTrace();
      rd = null;
    }
    if (rd == null) {
      builder.append("No Data Available");
    } else {
      builder.append("\t");
      float[] data = rd.data;
      for (int i = 0; i < data.length; i++) {
        builder.append( StringUtil2.padLeft( Format.formatDouble(data[i], 7, 1), 7));
        builder.append("\t");
      }
      int[] header = rd.header;
      if (header.length > 0) {
        builder.append("\nOb Time = ");
        builder.append(header[0]);
      }
    }
    System.out.println(builder.toString());
  }
public void printOb(int row, int col) {
    int stnIndex = (getFileSubType().equals(CLIMATE))
            ? row
            : col;
    List<GempakStation> stations = getStations();
    if (stations.isEmpty() || stnIndex > stations.size()) {
      System.out.println("\nNo data available");
      return;
    }
    GempakStation station = getStations().get(stnIndex - 1);
    StringBuilder builder = new StringBuilder();
    builder.append("\nStation:\n");
    builder.append(station.toString());
    builder.append("\nObs\n\t");
    List<GempakParameter> params = getParameters(SFDT);
    for (GempakParameter parm : params) {
      builder.append(StringUtil2.padLeft(parm.getName(), 7));
      builder.append("\t");
    }
    builder.append("\n");
    RData rd;
    try {
      rd = DM_RDTR(row, col, SFDT);
    } catch (IOException ioe) {
      ioe.printStackTrace();
      rd = null;
    }
    if (rd == null) {
      builder.append("No Data Available");
    } else {
      builder.append("\t");
      float[] data = rd.data;
      for (int i = 0; i < data.length; i++) {
        builder.append( StringUtil2.padLeft( Format.formatDouble(data[i], 7, 1), 7));
        builder.append("\t");
      }
      int[] header = rd.header;
      if (header.length > 0) {
        builder.append("\nOb Time = ");
        builder.append(header[0]);
      }
    }
    System.out.println(builder.toString());
  }
public void printOb ( int row , int col ) { int stnIndex = ( getFileSubType ( ) . equals ( CLIMATE ) ) ? row : col ; List < GempakStation > stations = getStations ( ) ; if ( stations . isEmpty ( ) || stnIndex > stations . size ( ) ) { System . out . println ( "\nNo data available" ) ; return ; } GempakStation station = getStations ( ) . get ( stnIndex - 1 ) ; StringBuilder builder = new StringBuilder ( ) ; builder . append ( "\nStation:\n" ) ; builder . append ( station . toString ( ) ) ; builder . append ( "\nObs\n\t" ) ; List < GempakParameter > params = getParameters ( SFDT ) ; for ( GempakParameter parm : params ) { builder . append ( StringUtil2 . padLeft ( parm . getName ( ) , 7 ) ) ; builder . append ( "\t" ) ; } builder . append ( "\n" ) ; RData rd ; try { rd = DM_RDTR ( row , col , SFDT ) ; } catch ( IOException ioe ) { ioe . printStackTrace ( ) ; rd = null ; } if ( rd == null ) { builder . append ( "No Data Available" ) ; } else { builder . append ( "\t" ) ; float [ ] data = rd . data ; for ( int i = 0 ; i < data . length ; i ++ ) { builder . append ( StringUtil2 . padLeft ( Format . formatDouble ( data [ i ] , 7 , 1 ) , 7 ) ) ; builder . append ( "\t" ) ; } int [ ] header = rd . header ; if ( header . length > 0 ) { builder . append ( "\nOb Time = " ) ; builder . append ( header [ 0 ] ) ; } } 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