NCEPLIBS-sp  2.5.0
sptranf.f File Reference

Perform a scalar spherical transform. More...

Go to the source code of this file.

Functions/Subroutines

subroutine sptranf (IROMB, MAXWV, IDRT, IMAX, JMAX, KMAX, IP, IS, JN, JS, KW, KG, JB, JE, JC, WAVE, GRIDN, GRIDS, IDIR)
 This subprogram performs a spherical transform between spectral coefficients of scalar quantities and fields on a global cylindrical grid. More...
 

Detailed Description

Perform a scalar spherical transform.

Program History Log

Date Programmer Comments
96-02-29 Iredell Initial.
1998-12-15 Iredell Generic fft used, openmp directives inserted
2013-01-16 Iredell, Mirvis Fixing afft negative sharing effect
Author
Iredell
Date
96-02-29

Definition in file sptranf.f.

Function/Subroutine Documentation

◆ sptranf()

subroutine sptranf (   IROMB,
  MAXWV,
  IDRT,
  IMAX,
  JMAX,
  KMAX,
  IP,
  IS,
  JN,
  JS,
  KW,
  KG,
  JB,
  JE,
  JC,
real, dimension(*)  WAVE,
real, dimension(*)  GRIDN,
real, dimension(*)  GRIDS,
  IDIR 
)

This subprogram performs a spherical transform between spectral coefficients of scalar quantities and 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.

The wave and grid fields may have general indexing, but each wave field is in sequential 'ibm order', i.e. with zonal wavenumber as the slower index.

Transforms are done in latitude pairs for efficiency; thus grid arrays for each hemisphere must be passed.

If so requested, just a subset of the latitude pairs may be transformed in each invocation of the subprogram. The transforms are all multiprocessed over latitude except the transform from fourier to spectral is multiprocessed over zonal wavenumber to ensure reproducibility.

Transform several fields at a time to improve vectorization. Subprogram can be called from a multiprocessing environment.

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
Parameters
IROMBspectral domain shape (0 for triangular, 1 for rhomboidal)
MAXWVspectral truncation
IDRTgrid identifier
  • IDRT=4 for Gaussian grid,
  • IDRT=0 for equally-spaced grid including poles
  • IDRT=256 for equally-spaced grid excluding poles
IMAXeven number of longitudes.
JMAXnumber of latitudes.
KMAXnumber of fields to transform.
IPlongitude index for the prime meridian
ISskip number between longitudes
JNskip number between n.h. latitudes from north
JSskip number between s.h. latitudes from south
KWskip number between wave fields
KGskip number between grid fields
JBlatitude index (from pole) to begin transform
JElatitude index (from pole) to end transform
JCnumber of cpus over which to multiprocess
[out]WAVEwave fields if IDIR>0
[out]GRIDNn.h. grid fields (starting at JB) if IDIR<0
[out]GRIDSs.h. grid fields (starting at JB) if IDIR<0
IDIRtransform flag (IDIR>0 for wave to grid, IDIR<0 for grid to wave)
Author
Iredell
Date
96-02-29

Definition at line 74 of file sptranf.f.

References sptranf0(), and sptranf1().

Referenced by sptez(), sptezm(), and sptran().