& tapeFileCounter, tapeMaxCounter, tapeFileUnit, tapeFileUnitS
integer tapeFileCounter, tapeMaxCounter
jrec=tapeFileCounter+tapeMaxCounter*(irec-1)
if (tapeFileCounter.GT.tapeMaxCounter) stop
if (tapeFileCounter.GT.tapeMaxCounter) then
& tapeFileCounter, tapeMaxCounter
tapeMaxCounter=nWh
iWh=tapeMaxCounter*MAX(nchklev_2,nchklev_3)/nWh+1