  private void readEntry(int ent) {
    try {
      int te = entry[ent] * 4;
      System.out.println("Entry 0 = "+te);
      byte[] gridHeader = new byte[256];
      fn.seek(te);
      fn.readFully(gridHeader);
      McIDASGridDirectory mgd = new McIDASGridDirectory(gridHeader);
      System.out.println("grid header ="+mgd.toString());
      CoordinateSystem c = mgd.getCoordinateSystem();
      int rows = mgd.getRows();
      int cols = mgd.getColumns();
      System.out.println("# rows & cols = "+rows+" "+cols);
      double scale = mgd.getParamScale();
      System.out.println("param scale = "+scale+" gridType="+mgd.getGridType());
      double[] data = new double[rows*cols];
      int n = 0;
      for (int nc=0; nc<cols; nc++) {
        for (int nr=0; nr<rows; nr++) {
         int temp = fn.readInt();           
         data[(rows-nr-1)*cols + nc] = 
           (temp == McIDASUtil.MCMISSING)
             ? Double.NaN
             : ( (double) temp) / scale ;
        }
      }
      gridH = new ArrayList();
      gridD = new ArrayList();
      gridH.add(mgd);
      gridD.add(data);
    } catch (Exception esc) {System.out.println(esc);}
  }

  private void readEntry(int ent) {
    try {
      int te = entry[ent] * 4;
      System.out.println("Entry 0 = "+te);
      byte[] gridHeader = new byte[256];
      fn.seek(te);
      fn.readFully(gridHeader);
      McIDASGridDirectory mgd = new McIDASGridDirectory(gridHeader);
      System.out.println("grid header ="+mgd.toString());
      CoordinateSystem c = mgd.getCoordinateSystem();
      int rows = mgd.getRows();
      int cols = mgd.getColumns();
      System.out.println("# rows & cols = "+rows+" "+cols);
      double scale = mgd.getParamScale();
      double[] data = new double[rows*cols];
      int n = 0;
      for (int nc=0; nc<cols; nc++) {
        for (int nr=0; nr<rows; nr++) {
         int temp = fn.readInt();           
         data[(rows-nr-1)*cols + nc] = 
           (temp == McIDASUtil.MCMISSING)
             ? Double.NaN
             : ( (double) temp) / scale ;
        }
      }
      gridH = new ArrayList();
      gridD = new ArrayList();
      gridH.add(mgd);
      gridD.add(data);
    } catch (Exception esc) {System.out.println(esc);}
  }
