
C OPENS THE MOINTS FILE WITH THE RECORD LENGTH SPECIFIED IN ROUTINE
C ACES_INIT_RTE.

      SUBROUTINE OPENMO(IUNIT,NAME)
      CHARACTER*6 NAME
      LOGICAL EXISTS
      COMMON /FILSPC/ ILNBUF,IPRCLN,IPRCWD
      COMMON /IOPOS/ ICRSIZ,ICHCSZ,IOFF(2),LENREC
 
#include "icdacc.com"

      INQUIRE(FILE=NAME,EXIST=EXISTS)

c YAU - old
c      IF (EXISTS) THEN
c         OPEN(UNIT=IUNIT,FILE=NAME,FORM='UNFORMATTED',ACCESS='DIRECT',
c     &        RECL=idaccr,STATUS='OLD')
c      ELSE
c         OPEN(UNIT=IUNIT,FILE=NAME,FORM='UNFORMATTED',ACCESS='DIRECT',
c     &        RECL=idaccr,STATUS='NEW')
c      END IF
c YAU - new
      IF (EXISTS) THEN
         OPEN(UNIT=IUNIT,FILE=NAME,FORM='UNFORMATTED',ACCESS='DIRECT',
     &        RECL=IPRCWD*idaccm,STATUS='OLD')
      ELSE
         OPEN(UNIT=IUNIT,FILE=NAME,FORM='UNFORMATTED',ACCESS='DIRECT',
     &        RECL=IPRCWD*idaccm,STATUS='NEW')
      END IF
c YAU - end

      RETURN
      END

