NCEPLIBS-sp
2.3.3
|
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... | |
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.
PROGRAM HISTORY LOG:
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. | |
IP | - INTEGER LONGITUDE INDEX FOR THE PRIME MERIDIAN | |
IS | - INTEGER SKIP NUMBER BETWEEN LONGITUDES | |
JN | - INTEGER SKIP NUMBER BETWEEN N.H. LATITUDES FROM NORTH | |
JS | - INTEGER SKIP NUMBER BETWEEN S.H. LATITUDES FROM SOUTH | |
KW | - INTEGER SKIP NUMBER BETWEEN WAVE FIELDS | |
KG | - INTEGER SKIP NUMBER BETWEEN GRID FIELDS | |
JB | - INTEGER LATITUDE INDEX (FROM POLE) TO BEGIN TRANSFORM | |
JE | - INTEGER LATITUDE INDEX (FROM POLE) TO END TRANSFORM | |
JC | - INTEGER NUMBER OF CPUS OVER WHICH TO MULTIPROCESS | |
[out] | WAVE | - REAL (*) WAVE FIELDS IF IDIR>0 |
[out] | GRIDN | - REAL (*) N.H. GRID FIELDS (STARTING AT JB) IF IDIR<0 |
[out] | GRIDS | - REAL (*) S.H. GRID FIELDS (STARTING AT JB) IF IDIR<0 |
IDIR | - INTEGER TRANSFORM FLAG (IDIR>0 FOR WAVE TO GRID, IDIR<0 FOR GRID TO WAVE) |
SUBPROGRAMS CALLED:
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 |