NCEPLIBS-sp 2.4.0
spgradx.f File Reference

Compute x-gradient in Fourier space. More...

Go to the source code of this file.

Functions/Subroutines

subroutine spgradx (M, INCW, KMAX, MP, CLAT, W, WX)
 This subprogram computes the x-gradient of fields in complex Fourier space. More...
 

Detailed Description

Compute x-gradient in Fourier space.

Author
IREDELL
Date
96-02-20

Definition in file spgradx.f.

Function/Subroutine Documentation

◆ spgradx()

subroutine spgradx ( integer, intent(in)  M,
integer, intent(in)  INCW,
integer, intent(in)  KMAX,
integer, dimension(kmax), intent(in)  MP,
real, intent(in)  CLAT,
real, dimension(2*incw,kmax), intent(inout)  W,
real, dimension(2*incw,kmax), intent(out)  WX 
)

This subprogram computes the x-gradient of fields in complex Fourier space.

The x-gradient of a vector field W is WX=CONJG(W)*L/RERTH where L is the wavenumber and RERTH is the Earth radius, so that the result is the x-gradient of the pseudo-vector.

The x-gradient of a scalar field W is WX=CONJG(W)*L/(RERTH*CLAT) where CLAT is the cosine of latitude.

At the pole this is undefined, so the way to get the x-gradient at the pole is by passing both the weighted wavenumber 0 and the unweighted wavenumber 1 amplitudes at the pole and setting MP=10. In this case, the wavenumber 1 amplitudes are used to compute the x-gradient and then zeroed out.

Note
This subprogram is thread-safe.
Parameters
MFourier wavenumber truncation
INCWfirst dimension of the complex amplitude array (INCW >= M+1)
KMAXnumber of Fourier fields
MPidentifiers (0 or 10 for scalar, 1 for vector)
CLATcosine of latitude
[out]WFourier amplitudes corrected when MP=10 and CLAT=0
[out]WXcomplex amplitudes of x-gradients
Author
IREDELL
Date
96-02-20

Definition at line 37 of file spgradx.f.

Referenced by sptgptsd(), and sptgptvd().