NCEPLIBS-sp
2.3.3
|
Go to the source code of this file.
Functions/Subroutines | |
subroutine | sptgpsd (IROMB, MAXWV, KMAX, NPS, KWSKIP, KGSKIP, NISKIP, NJSKIP, TRUE, XMESH, ORIENT, WAVE, XN, YN, XS, YS) |
this subprogram performs a spherical transform from spectral coefficients of scalar fields to gradient fields on a pair of polar stereographic grids. More... | |
subroutine sptgpsd | ( | IROMB, | |
MAXWV, | |||
KMAX, | |||
NPS, | |||
KWSKIP, | |||
KGSKIP, | |||
NISKIP, | |||
NJSKIP, | |||
TRUE, | |||
XMESH, | |||
ORIENT, | |||
real, dimension(*) | WAVE, | ||
real, dimension(*) | XN, | ||
real, dimension(*) | YN, | ||
real, dimension(*) | XS, | ||
real, dimension(*) | YS | ||
) |
this subprogram performs a spherical transform from spectral coefficients of scalar fields to gradient 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 vectors are automatically rotated to be resolved relative to the respective polar stereographic grids.
The transform is made efficient \ 4 | 5 / by combining points in eight sectors \ | / of each polar stereographic grid, 3 \ | / 6 numbered as in the diagram at right. |/ The pole and the sector boundaries -—+-— are treated specially in the code. /|\ Unfortunately, this approach induces 2 / | \ 7 some hairy indexing and code loquacity, / | \ for which the developer apologizes. / 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 |
XN | - REAL (*) NORTHERN POLAR STEREOGRAPHIC X-GRADIENTS |
YN | - REAL (*) NORTHERN POLAR STEREOGRAPHIC Y-GRADIENTS |
XS | - REAL (*) SOUTHERN POLAR STEREOGRAPHIC X-GRADIENTS |
YS | - REAL (*) SOUTHERN POLAR STEREOGRAPHIC Y-GRADIENTS |
SUBPROGRAMS CALLED: