visad/src/main/java/ucar/nc2/iosp/grid/GridVariable.java
public void showRecord(int recnum, Formatter f) {
    if ((recnum < 0) || (recnum > recordTracker.length - 1)) {
      f.format("%d out of range [0,%d]%n", recnum, recordTracker.length - 1);
      return;
    }
    GridRecord gr = recordTracker[recnum];

    if (hasEnsemble()) {
      // recnum = ens * (ntimes * nlevels) + (time * nlevels) + level
      int ens = recnum / (nlevels * ntimes);
      int tmp = recnum - ens *(nlevels * ntimes);
      int time = tmp / nlevels;
      int level = tmp % nlevels;
      f.format("recnum=%d (record hash=%d) ens=%d time=%s(%d) level=%f(%d)%n", recnum, gr.hashCode(), ens, tcs.getCoord(time), time, vc.getCoord(level), level);
    }  else {
      int time = recnum / nlevels;
      int level = recnum % nlevels;
      f.format("recnum=%d (record hash=%d) time=%s(%d) level=%f(%d)%n", recnum, gr.hashCode(), tcs.getCoord(time), time, vc.getCoord(level), level);
    }
  }
public void showRecord(int recnum, Formatter f) {
    if ((recnum < 0) || (recnum > recordTracker.length - 1)) {
      f.format("%d out of range [0,%d]%n", recnum, recordTracker.length - 1);
      return;
    }
    GridRecord gr = recordTracker[recnum];

    if (hasEnsemble()) {
      // recnum = ens * (ntimes * nlevels) + (time * nlevels) + level
      int ens = recnum / (nlevels * ntimes);
      int tmp = recnum - ens *(nlevels * ntimes);
      int time = tmp / nlevels;
      int level = tmp % nlevels;
      f.format("recnum=%d (record hash=%d) ens=%d time=%s(%d) level=%f(%d)%n", recnum, gr.hashCode(), ens, tcs.getCoord(time), time, vc.getCoord(level), level);
    }  else {
      int time = recnum / nlevels;
      int level = recnum % nlevels;
      f.format("recnum=%d (record hash=%d) time=%s(%d) level=%f(%d)%n", recnum, gr.hashCode(), tcs.getCoord(time), time, vc.getCoord(level), level);
    }
  }
public void showRecord ( int recnum , Formatter f ) { if ( ( recnum < 0 ) || ( recnum > recordTracker . length - 1 ) ) { f . format ( "%d out of range [0,%d]%n" , recnum , recordTracker . length - 1 ) ; return ; } GridRecord gr = recordTracker [ recnum ] ; if ( hasEnsemble ( ) ) { // recnum = ens * (ntimes * nlevels) + (time * nlevels) + level int ens = recnum / ( nlevels * ntimes ) ; int tmp = recnum - ens * ( nlevels * ntimes ) ; int time = tmp / nlevels ; int level = tmp % nlevels ; f . format ( "recnum=%d (record hash=%d) ens=%d time=%s(%d) level=%f(%d)%n" , recnum , gr . hashCode ( ) , ens , tcs . getCoord ( time ) , time , vc . getCoord ( level ) , level ) ; } else { int time = recnum / nlevels ; int level = recnum % nlevels ; f . format ( "recnum=%d (record hash=%d) time=%s(%d) level=%f(%d)%n" , recnum , gr . hashCode ( ) , tcs . getCoord ( time ) , time , vc . getCoord ( level ) , level ) ; } }
debugging
debugging