NCEPLIBS-sp
2.5.0
|
Transform spectral scalar to polar stereo. More...
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... | |
Transform spectral scalar to polar stereo.
Date | Programmer | Comments |
---|---|---|
96-02-29 | Iredell | Initial. |
1998-12-15 | Iredell | Openmp directives inserted. |
Definition in file sptgps.f.
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.
\ 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.
IROMB | spectral domain shape (0 for triangular, 1 for rhomboidal) |
MAXWV | spectral truncation |
KMAX | number of fields to transform. |
NPS | odd order of the polar stereographic grids. |
KWSKIP | skip number between wave fields (defaults to (MAXWV+1)*((IROMB+1)*MAXWV+2) if KWSKIP=0) |
KGSKIP | skip number between grid fields (defaults to NPS*NPS if KGSKIP=0) |
NISKIP | skip number between grid i-points (defaults to 1 if NISKIP=0) |
NJSKIP | skip number between grid j-points (defaults to NPS if NJSKIP=0) |
TRUE | latitude at which ps grid is true (usually 60.) |
XMESH | grid length at true latitude (m) |
ORIENT | longitude at bottom of northern ps grid (southern ps grid will have opposite orientation.) |
WAVE | wave fields |
GN | northern polar stereographic fields |
GS | southern polar stereographic fields |
Definition at line 78 of file sptgps.f.
References splegend(), spsynth(), and spwget().
Referenced by sptruns(), and sptrunsv().