NCEPLIBS-sp 2.4.0
|
Perform a gradient spherical transform. More...
Go to the source code of this file.
Functions/Subroutines | |
subroutine | sptrand (IROMB, MAXWV, IDRT, IMAX, JMAX, KMAX, IPRIME, ISKIP, JNSKIP, JSSKIP, KWSKIP, KGSKIP, JBEG, JEND, JCPU, WAVE, GRIDMN, GRIDXN, GRIDXS, GRIDYN, GRIDYS, IDIR) |
This subprogram performs a spherical transform between spectral coefficients of scalar fields and their means and gradients on a global cylindrical grid. More... | |
Perform a gradient spherical transform.
Date | Programmer | Comments |
---|---|---|
96-02-29 | IREDELL | Initial |
1998-12-15 | IREDELL | openmp directives inserted |
Definition in file sptrand.f.
subroutine sptrand | ( | IROMB, | |
MAXWV, | |||
IDRT, | |||
IMAX, | |||
JMAX, | |||
KMAX, | |||
IPRIME, | |||
ISKIP, | |||
JNSKIP, | |||
JSSKIP, | |||
KWSKIP, | |||
KGSKIP, | |||
JBEG, | |||
JEND, | |||
JCPU, | |||
real, dimension(*) | WAVE, | ||
real, dimension(kmax) | GRIDMN, | ||
real, dimension(*) | GRIDXN, | ||
real, dimension(*) | GRIDXS, | ||
real, dimension(*) | GRIDYN, | ||
real, dimension(*) | GRIDYS, | ||
IDIR | |||
) |
This subprogram performs a spherical transform between spectral coefficients of scalar fields and their means and gradients on a global cylindrical grid.
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 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.
Transforms are done in latitude pairs for efficiency; thus grid arrays for each hemisphere must be passed. if so requested, just a subset of the latitude pairs may be transformed in each invocation of the subprogram.
The transforms are all multiprocessed over latitude except the transform from Fourier to spectral is multiprocessed over zonal wavenumber to ensure reproducibility.
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 |
IROMB | spectral domain shape (0 for triangular, 1 for rhomboidal) | |
MAXWV | spectral truncation | |
IDRT | grid identifier
| |
IMAX | even number of longitudes. | |
JMAX | number of latitudes. | |
KMAX | number of fields to transform. | |
IPRIME | longitude index for the prime meridian. (defaults to 1 if IPRIME=0) | |
ISKIP | skip number between longitudes (defaults to 1 if ISKIP=0) | |
JNSKIP | skip number between n.h. latitudes from north (defaults to IMAX if JNSKIP=0) | |
JSSKIP | skip number between s.h. latitudes from south (defaults to -IMAX if JSSKIP=0) | |
KWSKIP | skip number between wave fields (defaults to (MAXWV+1)*((IROMB+1)*MAXWV+2) if KWSKIP=0) | |
KGSKIP | skip number between grid fields (defaults to IMAX*JMAX if KGSKIP=0) | |
JBEG | latitude index (from pole) to begin transform (defaults to 1 if JBEG=0). If JBEG=0 and IDIR<0, wave is zeroed before transform. | |
JEND | latitude index (from pole) to end transform (defaults to (JMAX+1)/2 if JEND=0) | |
JCPU | number of cpus over which to multiprocess | |
[out] | WAVE | wave fields if IDIR>0 |
[out] | GRIDMN | global means if IDIR<0 |
[out] | GRIDXN | n.h. x-gradients (starting at JBEG) if IDIR<0 |
[out] | GRIDXS | s.h. x-gradients (starting at JBEG) if IDIR<0 [GRIDX=(D(WAVE)/DLAM)/(CLAT*RERTH)] |
[out] | GRIDYN | n.h. y-gradients (starting at JBEG) if IDIR<0 |
[out] | GRIDYS | s.h. y-gradients (starting at JBEG) if IDIR<0 [GRIDY=(D(WAVE)/DPHI)/RERTH] |
IDIR | transform flag (IDIR>0 for wave to grid, IDIR<0 for grid to wave) |
Definition at line 88 of file sptrand.f.
References splaplac(), sptranv(), and spwget().