integer HEADER_SIZE
parameter( HEADER_SIZE=8+MAXLEN_COMP_NAME )
parameter( MAX_R4_BUFLEN=HEADER_SIZE+256*256 )
parameter( MAX_R8_BUFLEN=HEADER_SIZE+256*256 )
if (HEADER_SIZE+Ni*Nj.gt.MAX_R4_BUFLEN)
count=HEADER_SIZE+MAX_R4_BUFLEN
ij=HEADER_SIZE+i+Ni*(j-1)
if (HEADER_SIZE+Ni*Nj.gt.MAX_R8_BUFLEN)
count=HEADER_SIZE+MAX_R8_BUFLEN
count=HEADER_SIZE+Ni*Nj