NCEPLIBS-sp
2.3.3
splaplac.f
Go to the documentation of this file.
1
C> @file
2
C>
3
C> Compute laplacian in spectral space
4
C> @author IREDELL @date 92-10-31
5
6
C> COMPUTES THE LAPLACIAN OR THE INVERSE LAPLACIAN
7
C> OF A SCALAR FIELD IN SPECTRAL SPACE.
8
C> SUBPROGRAM SPEPS SHOULD BE CALLED ALREADY.
9
C> THE LAPLACIAN OF Q(L,N) IS SIMPLY -N*(N+1)/A**2*Q(L,N)
10
C>
11
C> @param I - INTEGER SPECTRAL DOMAIN SHAPE
12
C> (0 FOR TRIANGULAR, 1 FOR RHOMBOIDAL)
13
C> @param M - INTEGER SPECTRAL TRUNCATION
14
C> @param ENN1 - REAL ((M+1)*((I+1)*M+2)/2) N*(N+1)/A**2
15
C> @param[out] Q - IF IDIR > 0, REAL ((M+1)*((I+1)*M+2)) SCALAR FIELD
16
C> (Q(0,0) IS NOT COMPUTED)
17
C> @param[out] QD2 - IF IDIR < 0, REAL ((M+1)*((I+1)*M+2)) LAPLACIAN
18
C> @param IDIR - INTEGER FLAG
19
C> IDIR > 0 TO TAKE LAPLACIAN
20
C> IDIR < 0 TO TAKE INVERSE LAPLACIAN
21
SUBROUTINE
splaplac
(I,M,ENN1,Q,QD2,IDIR)
22
23
REAL
ENN1((M+1)*((I+1)*M+2)/2)
24
REAL
Q((M+1)*((I+1)*M+2))
25
REAL
QD2((M+1)*((I+1)*M+2))
26
C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
27
C TAKE LAPLACIAN
28
IF
(idir.GT.0)
THEN
29
k=1
30
qd2(2*k-1)=0.
31
qd2(2*k)=0.
32
DO
k=2,(m+1)*((i+1)*m+2)/2
33
qd2(2*k-1)=q(2*k-1)*(-enn1(k))
34
qd2(2*k)=q(2*k)*(-enn1(k))
35
ENDDO
36
C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
37
C TAKE INVERSE LAPLACIAN
38
ELSE
39
DO
k=2,(m+1)*((i+1)*m+2)/2
40
q(2*k-1)=qd2(2*k-1)/(-enn1(k))
41
q(2*k)=qd2(2*k)/(-enn1(k))
42
ENDDO
43
ENDIF
44
C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
45
RETURN
46
END
splaplac
subroutine splaplac(I, M, ENN1, Q, QD2, IDIR)
COMPUTES THE LAPLACIAN OR THE INVERSE LAPLACIAN OF A SCALAR FIELD IN SPECTRAL SPACE.
Definition:
splaplac.f:22
src
splaplac.f
Generated by
1.8.17