SPGRADY

The SPGRADY routine computes the horizontal vector y-gradient
            of a scalar field in spectral space.
            Subprogram speps should be called already.
            If L is the zonal wavenumber, N is the total wavenumber,
            EPS(L,N)=SQRT((N**2-L**2)/(4*N**2-1)) and a is earth radius,
            then the meridional gradient of Q(L,N) is computed as
            EPS(L,N+1)*(N+2)/A*Q(L,N+1)-EPS(L,N+1)*(N-1)/A*Q(L,N-1).
            Extra terms are computed over top of the spectral domain.
            advantage is taken of the fact that EPS(L,L)=0
            In order to vectorize over the entire spectral domain.
 
USAGE:    CALL SPGRADY(I,M,ENN1,EON,EONTOP,Q,QDY,QDYTOP)

   Input argument list:
      I        - INTEGER SPECTRAL DOMAIN SHAPE
                 (0 FOR TRIANGULAR, 1 FOR RHOMBOIDAL)
      M        - INTEGER SPECTRAL TRUNCATION
      ENN1     - REAL ((M+1)*((I+1)*M+2)/2) N*(N+1)/A**2
      EON      - REAL ((M+1)*((I+1)*M+2)/2) EPSILON/N*A
      EONTOP   - REAL (M+1) EPSILON/N*A OVER TOP
      Q        - REAL ((M+1)*((I+1)*M+2)) SCALAR FIELD
 
   Output argument list:
      QDY      - REAL ((M+1)*((I+1)*M+2)) MERID GRADIENT (TIMES COSLAT)
      QDYTOP   - REAL (2*(M+1)) MERID GRADIENT (TIMES COSLAT) OVER TOP

 
SPLIB.tar Library contains routines to be be used for a variety of spectral transform functions. (Fortran90)
Date posted: 2/23/2007