NCEPLIBS-sp 2.4.0
sptgptd.f
Go to the documentation of this file.
1C> @file
2C> @brief Transform spectral to station point gradients.
3C>
4C> ### Program History Log
5C> Date | Programmer | Comments
6C> -----|------------|---------
7C> 96-02-29 | Iredell | Initial.
8C> 1998-12-15 | Iredell | Openmp directives inserted.
9C>
10C> @author Iredell @date 96-02-29
11
12C> This subprogram performs a spherical transform
13c> from spectral coefficients of scalar fields
14c> to specified sets of station point gradients on the globe.
15C>
16C> The wave-space can be either triangular or rhomboidal.
17C>
18C> The wave and point fields may have general indexing,
19c> but each wave field is in sequential 'IBM order',
20c> i.e. with zonal wavenumber as the slower index.
21C>
22C> The transforms are all multiprocessed over stations.
23C>
24C> Transform several fields at a time to improve vectorization.
25C>
26C> Subprogram can be called from a multiprocessing environment.
27C>
28C> @param IROMB spectral domain shape
29c> (0 for triangular, 1 for rhomboidal)
30C> @param MAXWV spectral truncation
31C> @param KMAX number of fields to transform.
32C> @param NMAX number of station points to return
33C> @param KWSKIP skip number between wave fields
34C> (defaults to (MAXWV+1)*((IROMB+1)*MAXWV+2) if KWSKIP=0)
35C> @param KGSKIP skip number between station point sets
36C> (defaults to NMAX if KGSKIP=0)
37C> @param NRSKIP skip number between station lats and lons
38C> (defaults to 1 if NRSKIP=0)
39C> @param NGSKIP skip number between station points
40c> (defaults to 1 if NGSKIP=0)
41C> @param RLAT station latitudes in degrees
42C> @param RLON station longitudes in degrees
43C> @param WAVE wave fields
44C> @param XP station point x-gradient sets
45C> @param YP station point y-gradient sets
46C>
47C> @author Iredell @date 96-02-29
48 SUBROUTINE sptgptd(IROMB,MAXWV,KMAX,NMAX,
49 & KWSKIP,KGSKIP,NRSKIP,NGSKIP,
50 & RLAT,RLON,WAVE,XP,YP)
51
52 REAL RLAT(*),RLON(*),WAVE(*),XP(*),YP(*)
53 REAL EPS((MAXWV+1)*((IROMB+1)*MAXWV+2)/2),EPSTOP(MAXWV+1)
54 REAL ENN1((MAXWV+1)*((IROMB+1)*MAXWV+2)/2)
55 REAL ELONN1((MAXWV+1)*((IROMB+1)*MAXWV+2)/2)
56 REAL EON((MAXWV+1)*((IROMB+1)*MAXWV+2)/2),EONTOP(MAXWV+1)
57 REAL WD((MAXWV+1)*((IROMB+1)*MAXWV+2)/2*2+1,KMAX)
58 REAL WZ((MAXWV+1)*((IROMB+1)*MAXWV+2)/2*2+1,KMAX)
59C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
60C CALCULATE PRELIMINARY CONSTANTS
61 CALL spwget(iromb,maxwv,eps,epstop,enn1,elonn1,eon,eontop)
62 mx=(maxwv+1)*((iromb+1)*maxwv+2)/2
63 mdim=2*mx+1
64 kw=kwskip
65 IF(kw.EQ.0) kw=2*mx
66C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
67C CALCULATE STATION FIELDS
68C$OMP PARALLEL DO PRIVATE(KWS)
69 DO k=1,kmax
70 kws=(k-1)*kw
71 CALL splaplac(iromb,maxwv,enn1,wave(kws+1),wd(1,k),1)
72 wz(1:2*mx,k)=0.
73 ENDDO
74 CALL sptgptv(iromb,maxwv,kmax,nmax,mdim,kgskip,nrskip,ngskip,
75 & rlat,rlon,wd,wz,xp,yp)
76C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
77 END
subroutine splaplac(I, M, ENN1, Q, QD2, IDIR)
Computes the laplacian or the inverse laplacian of a scalar field in spectral space.
Definition: splaplac.f:25
subroutine sptgptd(IROMB, MAXWV, KMAX, NMAX, KWSKIP, KGSKIP, NRSKIP, NGSKIP, RLAT, RLON, WAVE, XP, YP)
This subprogram performs a spherical transform from spectral coefficients of scalar fields to specifi...
Definition: sptgptd.f:51
subroutine sptgptv(IROMB, MAXWV, KMAX, NMAX, KWSKIP, KGSKIP, NRSKIP, NGSKIP, RLAT, RLON, WAVED, WAVEZ, UP, VP)
This subprogram performs a spherical transform from spectral coefficients of divergences and curls to...
Definition: sptgptv.f:54
subroutine spwget(IROMB, MAXWV, EPS, EPSTOP, ENN1, ELONN1, EON, EONTOP)
This subprogram gets wave-space constants.
Definition: spwget.f:18