C  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *  
C     FUNCTION SUBPROGRAM FOR VELOCITY OF EARTHQUAKE MOTION BY KANAI    
C  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *  
C                                                                       
C                                                  CODED BY Y.OHSAKI    
C                                                                       
C     PURPOSE                                                           
C       TO COMPUTE THE MAX. VELOCITY IN KINES OF EARTHQUAKE MOTION AT   
C       BEDROCK BY MODIFIED KANAI'S FORMULA FOR GIVEN MAGNITUDE AND     
C       EPICENTRAL DISTANCE. AS THE FOCAL DEPTH, HALF OF IIDA'S RADIUS  
C       OF THE AFTER-SHOCK REGION IS ASSUMED.                           
C                                                                       
C     USAGE                                                             
C       VELK(EM,R) AS PRIMARY                                           
C                                                                       
C     DESCRIPTION OF ARGUMENTS                                          
C       EM - MAGNITUDE                                                  
C       R  - EPICENTRAL DISTANCE IN KILOMETERS                          
C                                                                       
C     SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED                     
C       NONE                                                            
C                                                                       
      FUNCTION VELK(EM,R)                                               
C                                                                       
      D=10.**(0.353*EM-1.435)                                           
      X=SQRT(R*R+D*D)                                                   
      P=1.66+3.60/X                                                     
      Q=0.631+1.83/X                                                    
      VELK=10.**(0.61*EM-P*ALOG10(X)-Q)                                 
      RETURN                                                            
      END                                                               
                                                                        
