44 SUBROUTINE splegend(I,M,SLAT,CLAT,EPS,EPSTOP,PLN,PLNTOP)
47 REAL EPS((M+1)*((I+1)*M+2)/2),EPSTOP(M+1)
48 REAL PLN((M+1)*((I+1)*M+2)/2),PLNTOP(M+1)
49 REAL(KIND=selected_real_kind(15,45)):: dln((m+1)*((i+1)*m+2)/2)
50 REAL :: TINYREAL=tiny(1.0), rdln1, rdln2
55 mx=(m+1)*((i+1)*m+2)/2
56 IF(abs(clat).LT.tinyreal)
THEN
60 dln(2)=slat*dln(1)/eps(2)
63 dln(m1+2)=slat*dln(m1+1)/eps(m1+2)
64 dln(3)=(slat*dln(2)-eps(2)*dln(1))/eps(3)
67 dln(k)=(slat*dln(k-1)-eps(k-1)*dln(k-2))/eps(k)
69 dln(k)=(slat*dln(k-1)-eps(k-1)*dln(k-2))/eps(k)
73 dln(k)=(slat*dln(k-1)-eps(k-1)*dln(k-2))/eps(k)
84 plntop(1)=(slat*rdln1-eps(k-1)*rdln2)/epstop(1)
89 plntop(2)=(slat*rdln1-eps(k-1)*rdln2)/epstop(2)
102 k=l*(2*m+(i-1)*(l-1))/2+l+nml+1
103 dln(k)=dln(kp)*clat*sqrt(float(2*l+1)/float(2*l))
110 k=l*(2*m+(i-1)*(l-1))/2+l+nml+1
111 dln(k)=slat*dln(k-1)/eps(k)
118 k=l*(2*m+(i-1)*(l-1))/2+l+nml+1
119 dln(k)=(slat*dln(k-1)-eps(k-1)*dln(k-2))/eps(k)
126 k=l*(2*m+(i-1)*(l-1))/2+l+nml+1
129 plntop(l+1)=(slat*rdln1-eps(k-1)*rdln2)/epstop(l+1)
subroutine splegend(i, m, slat, clat, eps, epstop, pln, plntop)
Evaluates the orthonormal associated Legendre polynomials in the spectral domain at a given latitude.