NCEPLIBS-sp  2.3.3
sppad.f
Go to the documentation of this file.
1 C> @file
2 C>
3 C> Pad or truncate a spectral field
4 C> @author IREDELL @date 92-10-31
5 
6 C> Pad or truncate a spectral field.
7 C>
8 C> @param I1 - INTEGER INPUT SPECTRAL DOMAIN SHAPE
9 C> (0 FOR TRIANGULAR, 1 FOR RHOMBOIDAL)
10 C> @param M1 - INTEGER INPUT SPECTRAL TRUNCATION
11 C> @param Q1 - REAL ((M+1)*((I+1)*M+2)) INPUT FIELD
12 C> @param I2 - INTEGER OUTPUT SPECTRAL DOMAIN SHAPE
13 C> (0 FOR TRIANGULAR, 1 FOR RHOMBOIDAL)
14 C> @param M2 - INTEGER OUTPUT SPECTRAL TRUNCATION
15 C>
16 C> @param Q2 - REAL ((M+1)*((I+1)*M+2)) OUTPUT FIELD
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 C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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 C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
36  RETURN
37  END
sppad
subroutine sppad(I1, M1, Q1, I2, M2, Q2)
Pad or truncate a spectral field.
Definition: sppad.f:18