NCEPLIBS-ip  5.0.0
sptrun.f File Reference

Truncate gridded scalar fields. More...

Go to the source code of this file.

Functions/Subroutines

subroutine sptrun (IROMB, MAXWV, IDRTI, IMAXI, JMAXI, IDRTO, IMAXO, JMAXO, KMAX, IPRIME, ISKIPI, JSKIPI, KSKIPI, ISKIPO, JSKIPO, KSKIPO, JCPU, GRIDI, GRIDO)
 This subprogram spectrally truncates scalar fields on a global cylindrical grid, returning the fields to a possibly different global cylindrical grid. More...
 

Detailed Description

Truncate gridded scalar fields.

Author
IREDELL
Date
96-02-29

Definition in file sptrun.f.

Function/Subroutine Documentation

◆ sptrun()

subroutine sptrun (   IROMB,
  MAXWV,
  IDRTI,
  IMAXI,
  JMAXI,
  IDRTO,
  IMAXO,
  JMAXO,
  KMAX,
  IPRIME,
  ISKIPI,
  JSKIPI,
  KSKIPI,
  ISKIPO,
  JSKIPO,
  KSKIPO,
  JCPU,
real, dimension(*)  GRIDI,
real, dimension(*)  GRIDO 
)

This subprogram spectrally truncates scalar fields on a global cylindrical grid, returning the fields to a possibly different global cylindrical grid.

The wave-space can be either triangular or rhomboidal. either 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.

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
Parameters
IROMBSpectral domain shape (0 for triangular, 1 for rhomboidal)
MAXWVSpectral truncation
IDRTIInput grid identifier
  • IDRTI=4 for Gaussian grid
  • IDRTI=0 for equally-spaced grid including poles
  • IDRTI=256 for equally-spaced grid excluding poles
IMAXIEven number of input longitudes
JMAXINumber of input latitudes
IDRTOOutput grid identifier
  • IDRTO=4 for Gaussian grid
  • IDRTO=0 for equally-spaced grid including poles
  • IDRTO=256 for equally-spaced grid excluding poles
IMAXOEven number of output longitudes
JMAXONumber of output latitudes
KMAXNumber of fields to transform
IPRIMEInput longitude index for the prime meridian.
  • Defaults to 1 if IPRIME=0
  • Output longitude index for prime meridian assumed 1
ISKIPISkip number between input longitudes (defaults to 1 if ISKIPI=0)
JSKIPISkip number between input latitudes from south (defaults to -IMAXI if JSKIPI=0)
KSKIPISkip number between input grid fields (defaults to IMAXI*JMAXI if KSKIPI=0)
ISKIPOSkip number between output longitudes (defaults to 1 if ISKIPO=0)
JSKIPOSkip number between output latitudes from south (defaults to -IMAXO if JSKIPO=0)
KSKIPOSkip number between output grid fields (defaults to IMAXO*JMAXO if KSKIPO=0)
JCPUNumber of CPUs over which to multiprocess (defaults to environment NCPUS if JCPU=0)
GRIDIInput grid fields
GRIDOOutput grid fields (may overlay input fields if grid shape is appropriate)
Author
IREDELL
Date
96-02-29

Definition at line 55 of file sptrun.f.

References ncpus(), and sptran().

Referenced by spectral_interp_mod::polates4::polates4_grib1(), and spectral_interp_mod::polates4::polates4_grib2().