      subroutine readrecs(ncid,VAR_id,T_stp,VAR,vr01,
     &                    LON_len,LAT_len,mm0,nn0)
       
      include 'netcdf.inc'

* netCDF id
      integer*4  ncid
      integer*4  VAR_id
* time step
      integer*4  T_stp
       
* error status return
      integer*4  iret

* netCDF dimension sizes for dimensions used with record variables
      integer*4  LON_len, LAT_len
       
* starts and counts for array sections of record variables
      integer*4  VAR_start(3), VAR_count(3)
       
* data variables
      real*4 VAR(LON_len, LAT_len, 1)
      real*8 vr01(mm0,nn0)
       
c      write(3,*) ' inside:',ncid,TIME_id,VAR_id,T_stp,TIME(1)
      VAR_count(1) = LON_len
      VAR_count(2) = LAT_len
      VAR_count(3) = 1
       
      VAR_start(1) = 1
      VAR_start(2) = 1
      VAR_start(3) = T_stp
c      write(3,*) ' get VAR:',ncid,VAR_id,VAR_start,VAR_count
c      write(3,*) ' VAR_start:',(VAR_start(i),i=1,VAR_rank)
c      write(3,*) ' VAR_count:',(VAR_count(i),i=1,VAR_rank)
      call flush(3)
      iret = nf_get_vara_real(ncid,VAR_id,VAR_start,VAR_count,VAR)
      call check_err(iret)
        do i=1,LON_len
          do j=1,LAT_len
             vr01(i,j) = VAR(i,j,1)
          end do
        end do
c      write(3,*) ' got VAR ',VAR_id
      end
