NCEPLIBS-sp 2.4.0
speps.f
Go to the documentation of this file.
1C> @file
2C> @brief Compute utility spectral fields.
3C> @author Iredell @date 92-10-31
4
5C> Computes constant fields indexed in the spectral domain
6C> in "IBM ORDER" (Zonal wavenumber is the slower index).
7C>
8C> If L is the zonal wavenumber and N is the total wavenumber
9C> and A is the earth radius, then the fields returned are:
10C> - (1) normalizing factor EPSILON=SQRT((N**2-L**2)/(4*N**2-1))
11C> - (2) Laplacian factor N*(N+1)/A**2
12C> - (3) zonal derivative/Laplacian factor L/(N*(N+1))*A
13C> - (4) Meridional derivative/Laplacian factor EPSILON/N*A
14C>
15C> @param I spectral domain shape (0 for triangular, 1 for rhomboidal)
16C> @param M spectral truncation
17C> @param EPS ((M+1)*((I+1)*M+2)/2) SQRT((N**2-L**2)/(4*N**2-1))
18C> @param EPSTOP (M+1) SQRT((N**2-L**2)/(4*N**2-1)) OVER TOP
19C> @param ENN1 ((M+1)*((I+1)*M+2)/2) N*(N+1)/A**2
20C> @param ELONN1 ((M+1)*((I+1)*M+2)/2) L/(N*(N+1))*A
21C> @param EON ((M+1)*((I+1)*M+2)/2) EPSILON/N*A
22C> @param EONTOP (M+1) EPSILON/N*A OVER TOP
23C>
24C> @author Iredell @date 92-10-31
25 SUBROUTINE speps(I,M,EPS,EPSTOP,ENN1,ELONN1,EON,EONTOP)
26 REAL EPS((M+1)*((I+1)*M+2)/2),EPSTOP(M+1)
27 REAL ENN1((M+1)*((I+1)*M+2)/2),ELONN1((M+1)*((I+1)*M+2)/2)
28 REAL EON((M+1)*((I+1)*M+2)/2),EONTOP(M+1)
29 parameter(rerth=6.3712e6,ra2=1./rerth**2)
30
31 DO l=0,m
32 k=l*(2*m+(i-1)*(l-1))/2+l+1
33 eps(k)=0.
34 enn1(k)=ra2*l*(l+1)
35 elonn1(k)=rerth/(l+1)
36 eon(k)=0.
37 ENDDO
38 DO l=0,m
39 DO n=l+1,i*l+m
40 k=l*(2*m+(i-1)*(l-1))/2+n+1
41 eps(k)=sqrt(float(n**2-l**2)/float(4*n**2-1))
42 enn1(k)=ra2*n*(n+1)
43 elonn1(k)=rerth*l/(n*(n+1))
44 eon(k)=rerth/n*eps(k)
45 ENDDO
46 ENDDO
47 DO l=0,m
48 n=i*l+m+1
49 epstop(l+1)=sqrt(float(n**2-l**2)/float(4*n**2-1))
50 eontop(l+1)=rerth/n*epstop(l+1)
51 ENDDO
52 RETURN
53 END
subroutine speps(I, M, EPS, EPSTOP, ENN1, ELONN1, EON, EONTOP)
Computes constant fields indexed in the spectral domain in "IBM ORDER" (Zonal wavenumber is the slowe...
Definition: speps.f:26