!+ Function to check for the existence of the locking file.
!
! Method:
!	The INQUIRE statement is used. An argument must be given
!	to the function, otherwise it will not be called.
!
! Current Owner of Code: J. M. Edwards
!
! History:
!	 Version 	   Date	  		Comment
!   
!	 1.0		   12-04-95		First Version under RCS
!						(J. M. Edwards)
!
! Description of Code:
!   FORTRAN 77 with extensions listed in documentation. 
!
!- ---------------------------------------------------------------------
      FUNCTION LOCK_CODE(L_APPLY)
!
!
      IMPLICIT NONE
!
!
!     DUMMY ARGUMENTS.
      LOGICAL	!, INTENT(IN)
     &     L_APPLY
!             ARGUMENT TO APPLY TEST: AN ARGUMENT IS REQUIRED FOR THE
!             FUNCTION ACTUALLY TO BE CALLED, EVEN THOUGH IT WILL
!             ALWAYS BE TRUE.
      LOGICAL	!, INTENT(OUT)
     &     LOCK_CODE
!             LOGICAL FOR EXISTENCE OF LOCK-FILE.
!
!     LOCAL VARIABLES.
      CHARACTER
     &     LOCK_FILE*30
!             NAME OF LOCK FILE
!
      DATA LOCK_FILE/'radiation_code.lock           '/
!
!
      IF (L_APPLY) INQUIRE(FILE=LOCK_FILE, EXIST=LOCK_CODE)
!
!
      RETURN
      END
