NCEPLIBS-ip  5.0.0
sptranv.f File Reference

Perform a vector spherical transform. More...

Go to the source code of this file.

Functions/Subroutines

subroutine sptranv (IROMB, MAXWV, IDRT, IMAX, JMAX, KMAX, IPRIME, ISKIP, JNSKIP, JSSKIP, KWSKIP, KGSKIP, JBEG, JEND, JCPU, WAVED, WAVEZ, GRIDUN, GRIDUS, GRIDVN, GRIDVS, IDIR)
 This subprogram performs a spherical transform between spectral coefficients of divergences and curls and vector fields on a global cylindrical grid. More...
 

Detailed Description

Perform a vector spherical transform.

Program History Log

Date Programmer Comments
96-02-29 IREDELL Initial.
1998-12-15 IREDELL Generic fft used, openmp directives inserted
Author
IREDELL
Date
96-02-29

Definition in file sptranv.f.

Function/Subroutine Documentation

◆ sptranv()

subroutine sptranv (   IROMB,
  MAXWV,
  IDRT,
  IMAX,
  JMAX,
  KMAX,
  IPRIME,
  ISKIP,
  JNSKIP,
  JSSKIP,
  KWSKIP,
  KGSKIP,
  JBEG,
  JEND,
  JCPU,
real, dimension(*)  WAVED,
real, dimension(*)  WAVEZ,
real, dimension(*)  GRIDUN,
real, dimension(*)  GRIDUS,
real, dimension(*)  GRIDVN,
real, dimension(*)  GRIDVS,
  IDIR 
)

This subprogram performs a spherical transform between spectral coefficients of divergences and curls 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. 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.
IPRIMELONGITUDE INDEX FOR THE PRIME MERIDIAN. (DEFAULTS TO 1 IF IPRIME=0)
ISKIPSKIP NUMBER BETWEEN LONGITUDES (DEFAULTS TO 1 IF ISKIP=0)
JNSKIPSKIP NUMBER BETWEEN N.H. LATITUDES FROM NORTH (DEFAULTS TO IMAX IF JNSKIP=0)
JSSKIPSKIP NUMBER BETWEEN S.H. LATITUDES FROM SOUTH (DEFAULTS TO -IMAX IF JSSKIP=0)
KWSKIPSKIP NUMBER BETWEEN WAVE FIELDS (DEFAULTS TO (MAXWV+1)*((IROMB+1)*MAXWV+2) IF KWSKIP=0)
KGSKIPSKIP NUMBER BETWEEN GRID FIELDS (DEFAULTS TO IMAX*JMAX IF KGSKIP=0)
JBEGLATITUDE INDEX (FROM POLE) TO BEGIN TRANSFORM
  • DEFAULTS TO 1 IF JBEG=0
  • IF JBEG=0 AND IDIR<0, WAVE IS ZEROED BEFORE TRANSFORM
JENDLATITUDE INDEX (FROM POLE) TO END TRANSFORM (DEFAULTS TO (JMAX+1)/2 IF JEND=0)
JCPUNUMBER OF CPUS OVER WHICH TO MULTIPROCESS
[out]WAVED(*) WAVE DIVERGENCE FIELDS IF IDIR>0 [WAVED=(D(GRIDU)/DLAM+D(CLAT*GRIDV)/DPHI)/(CLAT*RERTH)]
[out]WAVEZ(*) WAVE VORTICITY FIELDS IF IDIR>0 [WAVEZ=(D(GRIDV)/DLAM-D(CLAT*GRIDU)/DPHI)/(CLAT*RERTH)]
[out]GRIDUNN.H. GRID U-WINDS (STARTING AT JBEG) IF IDIR<0
[out]GRIDUSS.H. GRID U-WINDS (STARTING AT JBEG) IF IDIR<0
[out]GRIDVNN.H. GRID V-WINDS (STARTING AT JBEG) IF IDIR<0
[out]GRIDVSS.H. GRID V-WINDS (STARTING AT JBEG) IF IDIR<0
IDIRTRANSFORM FLAG
  • IDIR>0 FOR WAVE TO GRID,
  • IDIR<0 FOR GRID TO WAVE

Definition at line 87 of file sptranv.f.

References ncpus(), and sptranfv().

Referenced by sptrand(), sptrungv(), sptrunmv(), sptrunsv(), and sptrunv().