NCEPLIBS-sp 2.4.0
sptgpsv.f File Reference

Transform spectral vector to polar stereo. More...

Go to the source code of this file.

Functions/Subroutines

subroutine sptgpsv (IROMB, MAXWV, KMAX, NPS, KWSKIP, KGSKIP, NISKIP, NJSKIP, TRUE, XMESH, ORIENT, WAVED, WAVEZ, UN, VN, US, VS)
 This subprogram performs a spherical transform from spectral coefficients of divergences and curls to vector fields on a pair of polar stereographic grids. More...
 

Detailed Description

Transform spectral vector to polar stereo.

Program History Log

Date Programmer Comments
96-02-29 Iredell Initial.
1998-12-15 Iredell Openmp directives inserted.
Author
Iredell
Date
96-02-29

Definition in file sptgpsv.f.

Function/Subroutine Documentation

◆ sptgpsv()

subroutine sptgpsv (   IROMB,
  MAXWV,
  KMAX,
  NPS,
  KWSKIP,
  KGSKIP,
  NISKIP,
  NJSKIP,
  TRUE,
  XMESH,
  ORIENT,
real, dimension(*)  WAVED,
real, dimension(*)  WAVEZ,
real, dimension(*)  UN,
real, dimension(*)  VN,
real, dimension(*)  US,
real, dimension(*)  VS 
)

This subprogram performs a spherical transform from spectral coefficients of divergences and curls to vector 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 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.

Parameters
IROMBspectral domain shape (0 for triangular, 1 for rhomboidal)
MAXWVspectral truncation
KMAXnumber of fields to transform.
NPSodd order of the polar stereographic grids
KWSKIPskip number between wave fields (defaults to (MAXWV+1)*((IROMB+1)*MAXWV+2) if KWSKIP=0)
KGSKIPskip number between grid fields (defaults to NPS*NPS if KGSKIP=0)
NISKIPskip number between grid i-points (defaults to 1 if NISKIP=0)
NJSKIPskip number between grid j-points (defaults to NPS if NJSKIP=0)
TRUElatitude at which ps grid is true (usually 60.)
XMESHgrid length at true latitude (m)
ORIENTlongitude at bottom of northern ps grid (southern ps grid will have opposite orientation.)
WAVEDwave divergence fields
WAVEZwave vorticity fields
UNnorthern polar stereographic u-winds
VNnorthern polar stereographic v-winds
USsouthern polar stereographic u-winds
VSsouthern polar stereographic v-winds
Author
Iredell
Date
96-02-29

Definition at line 80 of file sptgpsv.f.

References spdz2uv(), splegend(), spsynth(), and spwget().

Referenced by sptgpsd(), and sptrunsv().