      FUNCTION PSEMI(Z,B)
C
C  THERMAL P-FUNCTION FOR SEMIC EMPIRICAL COLLISION RATES
C  REFERENCE: SOBEL'MAN - 'ATOMIC PHYSICS II.  '
C
C:
C: PSEMI  94-08-29  MODIFICATIONS: (MATS CARLSSON)
C:        MULTIPLE RETURN CHANGED TO SINGLE RETURN TO AVOID
C:        COMPILER BUG IN DIGITAL FORTRAN
C:
      INCLUDE 'PREC'
      PARAMETER (N1=10)
      DIMENSION  BETREF(N1),PNREF(N1),PCREF(N1)
      INTEGER Z
      DATA BETREF/-2.0,-1.699,-1.398,-1.0,-0.699,-0.398,0.0
     +  ,0.301,0.602,1.0/
      DATA PNREF/1.160,0.956,0.758,0.493,0.331,0.209
     +  ,0.100,0.063,0.040,0.023/
      DATA PCREF/1.160,0.977,0.788,0.554,0.403
     +  ,0.290,0.214,0.201,0.200,0.200/
C
C  LIMIT OF HIGH TEMPERATURE: KT >> E
C
      IF (B .LT. 0.01)THEN
        PSEMI = 0.27566 * (0.577 + LOG(B))
C
C  INTERMEDIATE TEMPS (MOST IMPORTANT FOR EQM PLASMAS)
C  SPLINE INTERPOLATION ONTO LOGB GRID:
C
      ELSE IF(B .GT. 0.01 .AND. B .LT. 10.0)THEN
        BB=LOG10(B)
        IF (Z .EQ. 1) PSEMI = SPLIN(BB,BETREF,PNREF,N1,N1)
        IF (Z .GT. 1) PSEMI = SPLIN(BB,BETREF,PCREF,N1,N1)
C
C  LIMIT OF LOW TEMPERATURE: KT << E
C
      ELSE  IF(B .GT. 10.0)THEN
        IF(Z .EQ. 1) PSEMI = 0.066 / SQRT(B)
        IF(Z .GT. 1) PSEMI = 0.200
      ENDIF
      RETURN
      END
C
C **********************************************************************
