NCEPLIBS-ip  5.0.0
sptgps.f File Reference

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...
 

Detailed Description

Transform spectral scalar 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 sptgps.f.

Function/Subroutine Documentation

◆ sptgps()

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.

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.)
WAVEwave fields
GNnorthern polar stereographic fields
GSsouthern polar stereographic fields
Author
Iredell
Date
96-02-29

Definition at line 78 of file sptgps.f.

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

Referenced by sptruns(), and sptrunsv().