* Last processed by NICE on 12-Jun-2000 15:53:00
* Customized for :  IEEE, LINUX, UNIX, MOTIF, F77
C     $Header: /scisoft/gildas/sou/nic/main/nic_init.for,v 1.41 2000/03/07 01:15:05 broguier Exp $
C     $Log: nic_init.for,v $
C     Revision 1.41  2000/03/07 01:15:05  broguier
C     initialize FIELD_ROTATION
C
C Revision 1.40  99/02/12  11:12:05  11:12:05  broguier ()
C initialize IADDR_PHASES = 0
C
C Revision 1.39  98/01/29  04:05:43  04:05:43  broguier ()
C REFERENCE_RECEIVER = 1
C
C Revision 1.38  97/12/18  15:31:45  15:31:45  broguier ()
C add TOTPOW variables
C
C
C Revision 1.26  96/10/25  16:44:20  16:44:20  broguier (Dominique Broguiere)
C raz IADDR_SIMUL
C
C Revision 1.21  96/03/19  14:58:07  14:58:07  broguier (Dominique Broguiere)
C IADDR_SUBFLAG = 0
C
C Revision 1.13  95/10/13  09:51:31  09:51:31  broguier (Dominique Broguiere)
C FORWARD_EFFICIENCY = .86
C
C Revision 1.4  94/11/23  14:41:37  14:41:37  neri (Roberto Neri)
C constant defined
C
C
*
      SUBROUTINE INIT_NIC
      INCLUDE 'nic.inc'
      INCLUDE 'parameter.inc'
      INCLUDE 'par.inc'
      INCLUDE 'const.inc'
      INTEGER  I, SIC_GETVM, IER
      INTEGER*4 IADDR_POINT, POINTER
*
      ILUN = 0
      INPUTSTREAM = 0
      SCAN_NUMBER = -1
*
      IADDRRECORD = 0
      IADDRSPIKE  = 0
      IADDR_AA = 0
*
      JANSKY_FLAG = .FALSE.
*
      OLD_FILENAME = ' '
      COMMAND_OPACITY = ' '
*
      BEAM_AZIMUTH = 0
      BEAM_ELEVATION = 0
      FORWARD_EFFICIENCY = .86
*
      FIRST_CALL = .TRUE.
      FIRST_SAVE = .TRUE.
*
      NUMBER_OF_SKYDIPS = 0
      MANUAL_OPACITY = 0
*
      DATA_SHMID=0
      IADDR_FIT = 0
      IADDR_SUBFLAG = 0
      IADDR_SIMUL = 0
      IADDR_SUPPORT = 0
      IADDR_POINTING = 0
      IADDR_PHASES = 0
*
      INIT_FUNC = .FALSE.
*
      DO I=1,MNSEC
         SECTION(I) = 0
      ENDDO
*
      LIST_FLAG = .FALSE.
*
      GAIN_REC = .FALSE.
      REFERENCE_RECEIVER = 1
*
      REFERENCE_SUPPORT = ' '
      SUPPORT_ORIGIN = 0
*
      FIELD_ROTATION = 1
*
      IER = SIC_GETVM (12*4,IADDR_POINT)
      IF (IER.NE.1) THEN
         CALL MESSAGE (2,1,'SOLVE','Memory allocation failure')
         RETURN
      ENDIF
      IP_POINTING  = POINTER(IADDR_POINT,MEMORY)
      CALL ZERO(MEMORY(IP_POINTING),12)
      END
*
      SUBROUTINE ZERO(FIT,N)
      INTEGER I,N
      REAL FIT(N)
      DO I=1,N
         FIT(I) = 0
      ENDDO
      RETURN
      END
