NCEPLIBS-sp 2.4.0
|
Perform a vector spherical transform. More...
Go to the source code of this file.
Functions/Subroutines | |
subroutine | sptranfv (IROMB, MAXWV, IDRT, IMAX, JMAX, KMAX, IP, IS, JN, JS, KW, KG, JB, JE, JC, 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... | |
Perform a vector spherical transform.
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 during omp loops |
Definition in file sptranfv.f.
subroutine sptranfv | ( | IROMB, | |
MAXWV, | |||
IDRT, | |||
IMAX, | |||
JMAX, | |||
KMAX, | |||
IP, | |||
IS, | |||
JN, | |||
JS, | |||
KW, | |||
KG, | |||
JB, | |||
JE, | |||
JC, | |||
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 |
IROMB | spectral domain shape (0 for triangular, 1 for rhomboidal) | |
MAXWV | spectral truncation | |
IDRT | grid identifier
| |
IMAX | even number of longitudes. | |
JMAX | number of latitudes. | |
KMAX | number of fields to transform. | |
IP | longitude index for the prime meridian | |
IS | skip number between longitudes | |
JN | skip number between n.h. latitudes from north | |
JS | skip number between s.h. latitudes from south | |
KW | skip number between wave fields | |
KG | skip number between grid fields | |
JB | latitude index (from pole) to begin transform | |
JE | latitude index (from pole) to end transform | |
JC | number 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] | GRIDUN | N.H. grid u-winds (starting at jb) if IDIR<0 |
[out] | GRIDUS | S.H. grid u-winds (starting at jb) if IDIR<0 |
[out] | GRIDVN | N.H. grid v-winds (starting at jb) if IDIR<0 |
[out] | GRIDVS | S.H. grid v-winds (starting at jb) if IDIR<0 |
IDIR | transform flag (IDIR>0 for wave to grid, IDIR<0 for grid to wave). |
Definition at line 80 of file sptranfv.f.
References spdz2uv(), sptranf0(), sptranf1(), and spuv2dz().