NCEPLIBS-sp  2.3.3
spgrady.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine spgrady (I, M, ENN1, EON, EONTOP, Q, QDY, QDYTOP)
 COMPUTES THE HORIZONTAL VECTOR Y-GRADIENT OF A SCALAR FIELD IN SPECTRAL SPACE. More...
 

Detailed Description

Compute y-gradient in spectral space

Author
IREDELL
Date
92-10-31

Definition in file spgrady.f.

Function/Subroutine Documentation

◆ spgrady()

subroutine spgrady (   I,
  M,
real, dimension((m+1)*((i+1)*m+2)/2)  ENN1,
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))  QDY,
real, dimension(2*(m+1))  QDYTOP 
)

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.

Parameters
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
QDY- REAL ((M+1)*((I+1)*M+2)) MERID GRADIENT (TIMES COSLAT)
QDYTOP- REAL (2*(M+1)) MERID GRADIENT (TIMES COSLAT) OVER TOP

Definition at line 27 of file spgrady.f.