NCEPLIBS-sp
2.3.3
|
Go to the source code of this file.
Functions/Subroutines | |
subroutine | sptgps (IROMB, MAXWV, KMAX, NPS, KWSKIP, KGSKIP, NISKIP, NJSKIP, TRUE, XMESH, ORIENT, WAVE, GN, GS) |
This subprogram performs a spherical transform from spectral coefficients of scalar quantities to scalar fields on a pair of polar stereographic grids. More... | |
subroutine sptgps | ( | IROMB, | |
MAXWV, | |||
KMAX, | |||
NPS, | |||
KWSKIP, | |||
KGSKIP, | |||
NISKIP, | |||
NJSKIP, | |||
TRUE, | |||
XMESH, | |||
ORIENT, | |||
real, dimension(*) | WAVE, | ||
real, dimension(*) | GN, | ||
real, dimension(*) | GS | ||
) |
This subprogram performs a spherical transform from spectral coefficients of scalar quantities to scalar fields on a pair of polar stereographic grids.
The wave-space can be either triangular or rhomboidal. 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. The two square polar stereographic grids are centered on the respective poles, with the orientation longitude of the southern hemisphere grid 180 degrees opposite that of the northern hemisphere grid.
The transform is made efficient by combining points in eight sectors of each polar stereographic grid,
numbered as in the diagram below. The pole and the sector boundaries
are treated specially in the code.
Unfortunately, this approach induces some hairy indexing and code loquacity, for which the developer apologizes.
\ 4 | 5 / \ | / 3 \ | / 6 |/ ----+---- /|\ 2 / | \ 7 / | \ / 1 | 8 \
The transforms are all multiprocessed over sector points. 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 |
KMAX | - INTEGER NUMBER OF FIELDS TO TRANSFORM. |
NPS | - INTEGER ODD ORDER OF THE POLAR STEREOGRAPHIC GRIDS |
KWSKIP | - INTEGER SKIP NUMBER BETWEEN WAVE FIELDS (DEFAULTS TO (MAXWV+1)*((IROMB+1)*MAXWV+2) IF KWSKIP=0) |
KGSKIP | - INTEGER SKIP NUMBER BETWEEN GRID FIELDS (DEFAULTS TO NPS*NPS IF KGSKIP=0) |
NISKIP | - INTEGER SKIP NUMBER BETWEEN GRID I-POINTS (DEFAULTS TO 1 IF NISKIP=0) |
NJSKIP | - INTEGER SKIP NUMBER BETWEEN GRID J-POINTS (DEFAULTS TO NPS IF NJSKIP=0) |
TRUE | - REAL LATITUDE AT WHICH PS GRID IS TRUE (USUALLY 60.) |
XMESH | - REAL GRID LENGTH AT TRUE LATITUDE (M) |
ORIENT | - REAL LONGITUDE AT BOTTOM OF NORTHERN PS GRID (SOUTHERN PS GRID WILL HAVE OPPOSITE ORIENTATION.) |
WAVE | - REAL (*) WAVE FIELDS |
GN | - REAL (*) NORTHERN POLAR STEREOGRAPHIC FIELDS |
GS | - REAL (*) SOUTHERN POLAR STEREOGRAPHIC FIELDS |
SUBPROGRAMS CALLED: