NCEPLIBS-sp 2.4.0
spgradq.f File Reference

Compute gradient in spectral space. More...

Go to the source code of this file.

Functions/Subroutines

subroutine spgradq (I, M, ENN1, ELONN1, EON, EONTOP, Q, QDX, QDY, QDYTOP)
 Computes the horizontal vector gradient of a scalar field in spectral space. More...
 

Detailed Description

Compute gradient in spectral space.

Author
Iredell
Date
92-10-31

Definition in file spgradq.f.

Function/Subroutine Documentation

◆ spgradq()

subroutine spgradq (   I,
  M,
real, dimension((m+1)*((i+1)*m+2)/2)  ENN1,
real, dimension((m+1)*((i+1)*m+2)/2)  ELONN1,
real, dimension((m+1)*((i+1)*m+2)/2)  EON,
real, dimension(m+1)  EONTOP,
real, dimension((m+1)*((i+1)*m+2))  Q,
real, dimension((m+1)*((i+1)*m+2))  QDX,
real, dimension((m+1)*((i+1)*m+2))  QDY,
real, dimension(2*(m+1))  QDYTOP 
)

Computes the horizontal vector 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 zonal gradient of q(l,n) is simply i*l/a*q(l,n) while 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.

Parameters
Ispectral domain shape (0 for triangular, 1 for rhomboidal)
Mspectral truncation
ENN1
ELONN1
EONEPSILON/N*A
EONTOPEPSILON/N*A over top
Qscalar field
QDXzonal gradient (times coslat)
QDYmerid gradient (times coslat)
QDYTOPmerid gradient (times coslat) over top
Author
IREDELL
Date
92-10-31

Definition at line 33 of file spgradq.f.