NCEPLIBS-sp  2.3.3
sptrunsv.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine sptrunsv (IROMB, MAXWV, IDRTI, IMAXI, JMAXI, KMAX, NPS, IPRIME, ISKIPI, JSKIPI, KSKIPI, KGSKIP, NISKIP, NJSKIP, JCPU, TRUE, XMESH, ORIENT, GRIDUI, GRIDVI, LUV, UN, VN, US, VS, LDZ, DN, ZN, DS, ZS, LPS, PN, SN, PS, SS)
 THIS SUBPROGRAM SPECTRALLY TRUNCATES VECTOR FIELDS ON A GLOBAL CYLINDRICAL GRID, RETURNING THE FIELDS TO SPECIFIC PAIRS OF POLAR STEREOGRAPHIC SCALAR FIELDS. More...
 

Detailed Description

Spectrally interpolate vectors to polar stereo

Author
IREDELL
Date
96-02-29

Definition in file sptrunsv.f.

Function/Subroutine Documentation

◆ sptrunsv()

subroutine sptrunsv (   IROMB,
  MAXWV,
  IDRTI,
  IMAXI,
  JMAXI,
  KMAX,
  NPS,
  IPRIME,
  ISKIPI,
  JSKIPI,
  KSKIPI,
  KGSKIP,
  NISKIP,
  NJSKIP,
  JCPU,
  TRUE,
  XMESH,
  ORIENT,
real, dimension(*)  GRIDUI,
real, dimension(*)  GRIDVI,
logical  LUV,
real, dimension(*)  UN,
real, dimension(*)  VN,
real, dimension(*)  US,
real, dimension(*)  VS,
logical  LDZ,
real, dimension(*)  DN,
real, dimension(*)  ZN,
real, dimension(*)  DS,
real, dimension(*)  ZS,
logical  LPS,
real, dimension(*)  PN,
real, dimension(*)  SN,
real, dimension(*)  PS,
real, dimension(*)  SS 
)

THIS SUBPROGRAM SPECTRALLY TRUNCATES VECTOR FIELDS ON A GLOBAL CYLINDRICAL GRID, RETURNING THE FIELDS TO SPECIFIC PAIRS OF POLAR STEREOGRAPHIC SCALAR FIELDS.

THE WAVE-SPACE CAN BE EITHER TRIANGULAR OR RHOMBOIDAL. THE GRID-SPACE CAN BE EITHER AN EQUALLY-SPACED GRID (WITH OR WITHOUT POLE POINTS) OR A GAUSSIAN GRID. THE GRID FIELDS MAY HAVE GENERAL INDEXING. THE TRANSFORMS ARE ALL MULTIPROCESSED. TRANSFORM SEVERAL FIELDS AT A TIME TO IMPROVE VECTORIZATION. SUBPROGRAM CAN BE CALLED FROM A MULTIPROCESSING ENVIRONMENT.

PROGRAM HISTORY LOG:

  • 96-02-29 IREDELL
  • 1998-12-15 IREDELL OPENMP DIRECTIVES INSERTED
Parameters
IROMB- INTEGER SPECTRAL DOMAIN SHAPE (0 FOR TRIANGULAR, 1 FOR RHOMBOIDAL)
MAXWV- INTEGER SPECTRAL TRUNCATION
IDRTI- INTEGER INPUT GRID IDENTIFIER (IDRTI=4 FOR GAUSSIAN GRID, IDRTI=0 FOR EQUALLY-SPACED GRID INCLUDING POLES, IDRTI=256 FOR EQUALLY-SPACED GRID EXCLUDING POLES)
IMAXI- INTEGER EVEN NUMBER OF INPUT LONGITUDES.
JMAXI- INTEGER NUMBER OF INPUT LATITUDES.
KMAX- INTEGER NUMBER OF FIELDS TO TRANSFORM.
NPS- INTEGER ODD ORDER OF THE POLAR STEREOGRAPHIC GRIDS
IPRIME- INTEGER INPUT LONGITUDE INDEX FOR THE PRIME MERIDIAN. (DEFAULTS TO 1 IF IPRIME=0) (OUTPUT LONGITUDE INDEX FOR PRIME MERIDIAN ASSUMED 1.)
ISKIPI- INTEGER SKIP NUMBER BETWEEN INPUT LONGITUDES (DEFAULTS TO 1 IF ISKIPI=0)
JSKIPI- INTEGER SKIP NUMBER BETWEEN INPUT LATITUDES FROM SOUTH (DEFAULTS TO -IMAXI IF JSKIPI=0)
KSKIPI- INTEGER SKIP NUMBER BETWEEN INPUT GRID FIELDS (DEFAULTS TO IMAXI*JMAXI IF KSKIPI=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)
JCPU- INTEGER NUMBER OF CPUS OVER WHICH TO MULTIPROCESS (DEFAULTS TO ENVIRONMENT NCPUS IF JCPU=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.)
GRIDUI- REAL (*) INPUT GRID U-WINDS
GRIDVI- REAL (*) INPUT GRID V-WINDS
LUV- LOGICAL FLAG WHETHER TO RETURN WINDS
LDZ- LOGICAL FLAG WHETHER TO RETURN DIVERGENCE AND VORTICITY
LPS- LOGICAL FLAG WHETHER TO RETURN POTENTIAL AND STREAMFCN
UN- REAL (*) NORTHERN PS U-WINDS IF LUV
VN- REAL (*) NORTHERN PS V-WINDS IF LUV
US- REAL (*) SOUTHERN PS U-WINDS IF LUV
VS- REAL (*) SOUTHERN PS V-WINDS IF LUV
DN- REAL (*) NORTHERN DIVERGENCES IF LDZ
ZN- REAL (*) NORTHERN VORTICITIES IF LDZ
DS- REAL (*) SOUTHERN DIVERGENCES IF LDZ
ZS- REAL (*) SOUTHERN VORTICITIES IF LDZ
PN- REAL (*) NORTHERN POTENTIALS IF LPS
SN- REAL (*) NORTHERN STREAMFCNS IF LPS
PS- REAL (*) SOUTHERN POTENTIALS IF LPS
SS- REAL (*) SOUTHERN STREAMFCNS IF LPS

SUBPROGRAMS CALLED:

  • SPWGET GET WAVE-SPACE CONSTANTS
  • SPLAPLAC COMPUTE LAPLACIAN IN SPECTRAL SPACE
  • SPTRANV PERFORM A VECTOR SPHERICAL TRANSFORM
  • SPTGPS TRANSFORM SPECTRAL SCALAR TO POLAR STEREO.
  • SPTGPSV TRANSFORM SPECTRAL VECTOR TO POLAR STEREO.
  • NCPUS GETS ENVIRONMENT NUMBER OF CPUS

REMARKS: MINIMUM GRID DIMENSIONS FOR UNALIASED TRANSFORMS TO SPECTRAL:

DIMENSION LINEAR QUADRATIC
IMAX 2*MAXWV+2 3*MAXWV/2*2+2
JMAX (IDRT=4,IROMB=0) 1*MAXWV+1 3*MAXWV/2+1
JMAX (IDRT=4,IROMB=1) 2*MAXWV+1 5*MAXWV/2+1
JMAX (IDRT=0,IROMB=0) 2*MAXWV+3 3*MAXWV/2*2+3
JMAX (IDRT=0,IROMB=1) 4*MAXWV+3 5*MAXWV/2*2+3
JMAX (IDRT=256,IROMB=0) 2*MAXWV+1 3*MAXWV/2*2+1
JMAX (IDRT=256,IROMB=1) 4*MAXWV+1 5*MAXWV/2*2+1

Definition at line 95 of file sptrunsv.f.