NCEPLIBS-ip 5.2.0
Loading...
Searching...
No Matches
sppad.f
Go to the documentation of this file.
1C> @file
2C> @brief Pad or truncate a spectral field.
3C> @author Iredell @date 92-10-31
4
5C> Pad or truncate a spectral field.
6C>
7C> @param I1 input spectral domain shape
8C> (0 for triangular, 1 for rhomboidal)
9C> @param M1 input spectral truncation
10C> @param Q1 ((M+1)*((I+1)*M+2)) input field
11C> @param I2 output spectral domain shape
12C> (0 for triangular, 1 for rhomboidal)
13C> @param M2 output spectral truncation
14C> @param Q2 ((M+1)*((I+1)*M+2)) output field
15C>
16C> @author Iredell @date 92-10-31
17 SUBROUTINE sppad(I1,M1,Q1,I2,M2,Q2)
18
19 REAL Q1((M1+1)*((I1+1)*M1+2))
20 REAL Q2((M2+1)*((I2+1)*M2+2))
21
22 DO l=0,m2
23 DO n=l,i2*l+m2
24 ks2=l*(2*m2+(i2-1)*(l-1))+2*n
25 IF(l.LE.m1.AND.n.LE.i1*l+m1) THEN
26 ks1=l*(2*m1+(i1-1)*(l-1))+2*n
27 q2(ks2+1)=q1(ks1+1)
28 q2(ks2+2)=q1(ks1+2)
29 ELSE
30 q2(ks2+1)=0
31 q2(ks2+2)=0
32 ENDIF
33 ENDDO
34 ENDDO
35 RETURN
36 END
subroutine sppad(i1, m1, q1, i2, m2, q2)
Pad or truncate a spectral field.
Definition sppad.f:18