NCEPLIBS-sp
2.3.3
|
Go to the source code of this file.
Functions/Subroutines | |
subroutine | sptranv (IROMB, MAXWV, IDRT, IMAX, JMAX, KMAX, IPRIME, ISKIP, JNSKIP, JSSKIP, KWSKIP, KGSKIP, JBEG, JEND, JCPU, WAVED, WAVEZ, GRIDUN, GRIDUS, GRIDVN, GRIDVS, IDIR) |
THIS SUBPROGRAM PERFORMS A SPHERICAL TRANSFORM BETWEEN SPECTRAL COEFFICIENTS OF DIVERGENCES AND CURLS AND VECTOR FIELDS ON A GLOBAL CYLINDRICAL GRID. More... | |
subroutine sptranv | ( | IROMB, | |
MAXWV, | |||
IDRT, | |||
IMAX, | |||
JMAX, | |||
KMAX, | |||
IPRIME, | |||
ISKIP, | |||
JNSKIP, | |||
JSSKIP, | |||
KWSKIP, | |||
KGSKIP, | |||
JBEG, | |||
JEND, | |||
JCPU, | |||
real, dimension(*) | WAVED, | ||
real, dimension(*) | WAVEZ, | ||
real, dimension(*) | GRIDUN, | ||
real, dimension(*) | GRIDUS, | ||
real, dimension(*) | GRIDVN, | ||
real, dimension(*) | GRIDVS, | ||
IDIR | |||
) |
THIS SUBPROGRAM PERFORMS A SPHERICAL TRANSFORM BETWEEN SPECTRAL COEFFICIENTS OF DIVERGENCES AND CURLS AND VECTOR FIELDS 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.
PROGRAM HISTORY LOG:
IROMB | - INTEGER SPECTRAL DOMAIN SHAPE (0 FOR TRIANGULAR, 1 FOR RHOMBOIDAL) | |
MAXWV | - INTEGER SPECTRAL TRUNCATION | |
IDRT | - INTEGER GRID IDENTIFIER (IDRT=4 FOR GAUSSIAN GRID, IDRT=0 FOR EQUALLY-SPACED GRID INCLUDING POLES, IDRT=256 FOR EQUALLY-SPACED GRID EXCLUDING POLES) | |
IMAX | - INTEGER EVEN NUMBER OF LONGITUDES. | |
JMAX | - INTEGER NUMBER OF LATITUDES. | |
KMAX | - INTEGER NUMBER OF FIELDS TO TRANSFORM. | |
IPRIME | - INTEGER LONGITUDE INDEX FOR THE PRIME MERIDIAN. (DEFAULTS TO 1 IF IPRIME=0) | |
ISKIP | - INTEGER SKIP NUMBER BETWEEN LONGITUDES (DEFAULTS TO 1 IF ISKIP=0) | |
JNSKIP | - INTEGER SKIP NUMBER BETWEEN N.H. LATITUDES FROM NORTH (DEFAULTS TO IMAX IF JNSKIP=0) | |
JSSKIP | - INTEGER SKIP NUMBER BETWEEN S.H. LATITUDES FROM SOUTH (DEFAULTS TO -IMAX IF JSSKIP=0) | |
KWSKIP | - INTEGER SKIP NUMBER BETWEEN WAVE FIELDS (DEFAULTS TO (MAXWV+1)*((IROMB+1)*MAXWV+2) IF KWSKIP=0) | |
KGSKIP | - INTEGER SKIP NUMBER BETWEEN GRID FIELDS (DEFAULTS TO IMAX*JMAX IF KGSKIP=0) | |
JBEG | - INTEGER 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 | - INTEGER LATITUDE INDEX (FROM POLE) TO END TRANSFORM (DEFAULTS TO (JMAX+1)/2 IF JEND=0) | |
JCPU | - INTEGER NUMBER OF CPUS OVER WHICH TO MULTIPROCESS | |
[out] | WAVED | - REAL (*) WAVE DIVERGENCE FIELDS IF IDIR>0 [WAVED=(D(GRIDU)/DLAM+D(CLAT*GRIDV)/DPHI)/(CLAT*RERTH)] |
[out] | WAVEZ | - REAL (*) WAVE VORTICITY FIELDS IF IDIR>0 [WAVEZ=(D(GRIDV)/DLAM-D(CLAT*GRIDU)/DPHI)/(CLAT*RERTH)] |
[out] | GRIDUN | - REAL (*) N.H. GRID U-WINDS (STARTING AT JBEG) IF IDIR<0 |
[out] | GRIDUS | - REAL (*) S.H. GRID U-WINDS (STARTING AT JBEG) IF IDIR<0 |
[out] | GRIDVN | - REAL (*) N.H. GRID V-WINDS (STARTING AT JBEG) IF IDIR<0 |
[out] | GRIDVS | - REAL (*) S.H. GRID V-WINDS (STARTING AT JBEG) IF IDIR<0 |
IDIR | - INTEGER TRANSFORM FLAG (IDIR>0 FOR WAVE TO GRID, IDIR<0 FOR GRID TO WAVE) |
SUBPROGRAMS CALLED:
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 |