NCEPLIBS-sp 2.4.0
|
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... | |
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.
I | spectral domain shape (0 for triangular, 1 for rhomboidal) |
M | spectral truncation |
ENN1 | |
ELONN1 | |
EON | EPSILON/N*A |
EONTOP | EPSILON/N*A over top |
Q | scalar field |
QDX | zonal gradient (times coslat) |
QDY | merid gradient (times coslat) |
QDYTOP | merid gradient (times coslat) over top |