NCEPLIBS-ip 5.2.0
Loading...
Searching...
No Matches
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.
 

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.