NCEPLIBS-sp 2.4.0
|
Transform spectral to polar stereographic gradients. More...
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... | |
Transform spectral to polar stereographic gradients.
Date | Programmer | Comments |
---|---|---|
96-02-29 | IREDELL | Initial. |
1998-12-15 | IREDELL | OpenMP directives inserted. |
Definition in file sptgpsd.f.
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 by combining points in eight sectors of each polar stereographic grid, numbered as in the following diagram. 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.
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 |
XN | Northern polar stereographic x-gradients |
YN | Northern polar stereographic y-gradients |
XS | Southern polar stereographic x-gradients |
YS | Southern polar stereographic y-gradients |
Definition at line 71 of file sptgpsd.f.
References splaplac(), sptgpsv(), and spwget().