48 SUBROUTINE spuv2dz(I,M,ENN1,ELONN1,EON,EONTOP,U,V,UTOP,VTOP,D,Z)
49 REAL ENN1((M+1)*((I+1)*M+2)/2),ELONN1((M+1)*((I+1)*M+2)/2)
50 REAL EON((M+1)*((I+1)*M+2)/2),EONTOP(M+1)
51 REAL U((M+1)*((I+1)*M+2)),V((M+1)*((I+1)*M+2))
52 REAL UTOP(2*(M+1)),VTOP(2*(M+1))
53 REAL D((M+1)*((I+1)*M+2)),Z((M+1)*((I+1)*M+2))
61 DO k=2,(m+1)*((i+1)*m+2)/2-1
62 d(2*k-1)=-elonn1(k)*u(2*k)+eon(k+1)*v(2*k+1)-eon(k)*v(2*k-3)
63 d(2*k)=elonn1(k)*u(2*k-1)+eon(k+1)*v(2*k+2)-eon(k)*v(2*k-2)
64 z(2*k-1)=-elonn1(k)*v(2*k)-eon(k+1)*u(2*k+1)+eon(k)*u(2*k-3)
65 z(2*k)=elonn1(k)*v(2*k-1)-eon(k+1)*u(2*k+2)+eon(k)*u(2*k-2)
68 d(2*k-1)=-elonn1(k)*u(2*k)-eon(k)*v(2*k-3)
69 d(2*k)=elonn1(k)*u(2*k-1)-eon(k)*v(2*k-2)
70 z(2*k-1)=-elonn1(k)*v(2*k)+eon(k)*u(2*k-3)
71 z(2*k)=elonn1(k)*v(2*k-1)+eon(k)*u(2*k-2)
76 k=l*(2*m+(i-1)*(l-1))/2+i*l+m+1
77 d(2*k-1)=d(2*k-1)+eontop(l+1)*vtop(2*l+1)
78 d(2*k)=d(2*k)+eontop(l+1)*vtop(2*l+2)
79 z(2*k-1)=z(2*k-1)-eontop(l+1)*utop(2*l+1)
80 z(2*k)=z(2*k)-eontop(l+1)*utop(2*l+2)
84 DO k=2,(m+1)*((i+1)*m+2)/2
85 d(2*k-1)=d(2*k-1)*enn1(k)
87 z(2*k-1)=z(2*k-1)*enn1(k)
subroutine spuv2dz(I, M, ENN1, ELONN1, EON, EONTOP, U, V, UTOP, VTOP, D, Z)
Computes the divergence and vorticity from wind components in spectral space.