NCEPLIBS-sp  2.3.3
sptezmv.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine sptezmv (IROMB, MAXWV, IDRT, IMAX, JMAX, KMAX, WAVED, WAVEZ, GRIDU, GRIDV, IDIR)
 THIS SUBPROGRAM PERFORMS SPHERICAL TRANSFORMS BETWEEN SPECTRAL COEFFICIENTS OF DIVERGENCE AND CURL AND VECTOR FIELDS ON A GLOBAL CYLINDRICAL GRID. More...
 

Detailed Description

Perform simple vector spherical transforms

Author
IREDELL
Date
96-02-29

Definition in file sptezmv.f.

Function/Subroutine Documentation

◆ sptezmv()

subroutine sptezmv (   IROMB,
  MAXWV,
  IDRT,
  IMAX,
  JMAX,
  KMAX,
real, dimension((maxwv+1)*((iromb+1)*maxwv+2),kmax)  WAVED,
real, dimension((maxwv+1)*((iromb+1)*maxwv+2),kmax)  WAVEZ,
real, dimension(imax,jmax,kmax)  GRIDU,
real, dimension(imax,jmax,kmax)  GRIDV,
  IDIR 
)

THIS SUBPROGRAM PERFORMS SPHERICAL TRANSFORMS BETWEEN SPECTRAL COEFFICIENTS OF DIVERGENCE AND CURL AND VECTOR FIELDS ON A GLOBAL CYLINDRICAL GRID.

THE WAVE-SPACE CAN BE EITHER TRIANGULAR OR RHOMBOIDAL. THE GRID-SPACE CAN BE EITHER AN EQUALLY-SPACED GRID (WITH OR WITHOUT POLE POINTS) OR A GAUSSIAN GRID. WAVE FIELDS ARE IN SEQUENTIAL 'IBM ORDER'. GRID FIELDS ARE INDEXED EAST TO WEST, THEN NORTH TO SOUTH. FOR MORE FLEXIBILITY AND EFFICIENCY, CALL SPTRAN. SUBPROGRAM CAN BE CALLED FROM A MULTIPROCESSING ENVIRONMENT.

Parameters
IROMB- INTEGER SPECTRAL DOMAIN SHAPE (0 FOR TRIANGULAR, 1 FOR RHOMBOIDAL)
MAXWV- INTEGER SPECTRAL TRUNCATION
IDRT- INTEGER GRID IDENTIFIER (IDRT=4 FOR GAUSSIAN GRID, IDRT=0 FOR EQUALLY-SPACED GRID INCLUDING POLES, IDRT=256 FOR EQUALLY-SPACED GRID EXCLUDING POLES)
IMAX- INTEGER EVEN NUMBER OF LONGITUDES
JMAX- INTEGER NUMBER OF LATITUDES
KMAX- INTEGER NUMBER OF FIELDS TO TRANSFORM
[out]WAVED- REAL (2*MX,KMAX) WAVE DIVERGENCE FIELD IF IDIR<0 WHERE MX=(MAXWV+1)*((IROMB+1)*MAXWV+2)/2
[out]WAVEZ- REAL (2*MX,KMAX) WAVE VORTICITY FIELD IF IDIR>0 WHERE MX=(MAXWV+1)*((IROMB+1)*MAXWV+2)/2
[out]GRIDU- REAL (IMAX,JMAX,KMAX) GRID U-WIND (E->W,N->S) IF IDIR>0
[out]GRIDV- REAL (IMAX,JMAX,KMAX) GRID V-WIND (E->W,N->S) IF IDIR>0
IDIR- INTEGER TRANSFORM FLAG (IDIR>0 FOR WAVE TO GRID, IDIR<0 FOR GRID TO WAVE)

SUBPROGRAMS CALLED:

  • SPTRANFV PERFORM A VECTOR SPHERICAL TRANSFORM
  • NCPUS GETS ENVIRONMENT NUMBER OF CPUS

REMARKS: MINIMUM GRID DIMENSIONS FOR UNALIASED TRANSFORMS TO SPECTRAL:

DIMENSION LINEAR QUADRATIC
IMAX 2*MAXWV+2 3*MAXWV/2*2+2
JMAX (IDRT=4,IROMB=0) 1*MAXWV+1 3*MAXWV/2+1
JMAX (IDRT=4,IROMB=1) 2*MAXWV+1 5*MAXWV/2+1
JMAX (IDRT=0,IROMB=0) 2*MAXWV+3 3*MAXWV/2*2+3
JMAX (IDRT=0,IROMB=1) 4*MAXWV+3 5*MAXWV/2*2+3
JMAX (IDRT=256,IROMB=0) 2*MAXWV+1 3*MAXWV/2*2+1
JMAX (IDRT=256,IROMB=1) 4*MAXWV+1 5*MAXWV/2*2+1

Definition at line 52 of file sptezmv.f.