NCEPLIBS-ip  5.0.0
sptrunsv.f File Reference

Spectrally interpolate vectors to polar stereo. More...

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.

96-02-29 | Iredell | Initial. 1998-12-15 | Iredell | Openmp directives inserted.

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.

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
Parameters
IROMBinteger spectral domain shape (0 for triangular, 1 for rhomboidal)
MAXWVinteger spectral truncation
IDRTIinteger input grid identifier
  • IDRTI=4 for Gaussian grid
  • IDRTI=0 for equally-spaced grid including poles
  • IDRTI=256 for equally-spaced grid excluding poles
IMAXIinteger even number of input longitudes.
JMAXIinteger number of input latitudes.
KMAXinteger number of fields to transform.
NPSinteger odd order of the polar stereographic grids
IPRIMEinteger input longitude index for the prime meridian. (defaults to 1 if IPRIME=0) (output longitude index for prime meridian assumed 1.)
ISKIPIinteger skip number between input longitudes (defaults to 1 if ISKIPI=0)
JSKIPIinteger skip number between input latitudes from south (defaults to -IMAXI if JSKIPI=0)
KSKIPIinteger skip number between input grid fields (defaults to IMAXI*JMAXI if KSKIPI=0)
KGSKIPinteger skip number between grid fields (defaults to NPS*NPS if KGSKIP=0)
NISKIPinteger skip number between grid i-points (defaults to 1 if NISKIP=0)
NJSKIPinteger skip number between grid j-points (defaults to NPS if NJSKIP=0)
JCPUinteger number of cpus over which to multiprocess (defaults to environment NCPUS if JCPU=0)
TRUEreal latitude at which ps grid is true (usually 60.)
XMESHreal grid length at true latitude (m)
ORIENTreal longitude at bottom of Northern PS grid (Southern PS grid will have opposite orientation.)
GRIDUIreal input grid u-winds
GRIDVIreal input grid v-winds
LUVlogical flag whether to return winds
LDZlogical flag whether to return divergence and vorticity
LPSlogical flag whether to return potential and streamfcn
UNreal northern ps u-winds if luv
VNreal northern ps v-winds if luv
USreal southern ps u-winds if luv
VSreal southern ps v-winds if luv
DNreal northern divergences if ldz
ZNreal northern vorticities if ldz
DSreal southern divergences if ldz
ZSreal southern vorticities if ldz
PNreal northern potentials if lps
SNreal northern streamfcns if lps
PSreal southern potentials if lps
SSreal southern streamfcns if lps
Author
Iredell
Date
96-02-29

Definition at line 88 of file sptrunsv.f.

References ncpus(), splaplac(), sptgps(), sptgpsv(), sptranv(), and spwget().

Referenced by spectral_interp_mod::polatev4::polatev4_grib1(), and spectral_interp_mod::polatev4::polatev4_grib2().