	SUBROUTINE PLM(THET,LPLUS,MPLUS)
	IMPLICIT REAL*8(A-H,O-Z)

C  CALCULATES ASSOCIATED LEGENDRE POLYNOMIALS

	INCLUDE 'ANGCOR.INC'

	THETA=THET /57.295779
	Y=COS(THETA)
	Z=SIN(THETA)
	DO 1 M=1,MPLUS
	LX=M-1
	L2=0
	P3=1.
	FL1=LX
	IF(LX.EQ.0) GO TO 2
	DO 3 LT=1,LX
	FL1=FL1+1.
	P3=P3*FL1*Z/2.0
3	CONTINUE
2	CONTINUE
	P2=0.
	FL2=FL1+1.
	FL3=1.
	DO 4 LT=1,LPLUS
	IF(L2-LX)5,7,6
5	PL(LT,M)=0.
	GO TO 8
6	P3=(FL2*Y*P2-FL1*P1)/FL3
	FL1=FL1+1.
	FL2=FL2+2.
	FL3=FL3+1.
7	PL(LT,M)=P3
	P1=P2
	P2=P3
8	L2=L2+1
4	CONTINUE
1	CONTINUE
	RETURN
	END
