*$ CREATE USRINI.FOR
*COPY USRINI
*
*=== usrini ===========================================================*
*
      SUBROUTINE USRINI ( WHAT, SDUM )

      INCLUDE '(DBLPRC)'
      INCLUDE '(DIMPAR)'
      INCLUDE '(IOUNIT)'
*
*----------------------------------------------------------------------*
*                                                                      *
*     Copyright (C) 1991-2005      by    Alfredo Ferrari & Paola Sala  *
*     All Rights Reserved.                                             *
*                                                                      *
*                                                                      *
*     USeR INItialization: this routine is called every time the       *
*                          USRICALL card is found in the input stream  *
*                                                                      *
*                                                                      *
*     Created on 01 january 1991   by    Alfredo Ferrari & Paola Sala  *
*                                                   Infn - Milan       *
*                                                                      *
*     Last change on 04-nov-19    by    Advanced FLUKA course teacher  *
*                                                                      *
*                                                                      *
*----------------------------------------------------------------------*
*
      DIMENSION WHAT (6)
      CHARACTER SDUM*8
      COMMON /MYDATA/ DIPFLD, QUAFLD
*
*  Don't change the following line:
      LUSRIN = .TRUE.
**** Write from here on *** *
*     standard values
*     - dipole field (T):
      DIPFLD = 1.66782D+00 
*     - quadrupole field (T/m):
      QUAFLD =  4.9D+00
      IF ( SDUM .EQ. 'FIELDS' ) THEN
         IF ( WHAT (1) .GT. ZERZER ) DIPFLD = WHAT (1)
         WRITE (LUNOUT,*) ' Dipole  field modified'
***   quad  field: fill here
         
      END IF
      RETURN
*=== End of subroutine Usrini =========================================*
      END

