56 SUBROUTINE sptgpm(IROMB,MAXWV,KMAX,MI,MJ,
57 & KWSKIP,KGSKIP,NISKIP,NJSKIP,
58 & RLAT1,RLON1,DLAT,DLON,WAVE,GM)
61 REAL EPS((MAXWV+1)*((IROMB+1)*MAXWV+2)/2),EPSTOP(MAXWV+1)
62 REAL ENN1((MAXWV+1)*((IROMB+1)*MAXWV+2)/2)
63 REAL ELONN1((MAXWV+1)*((IROMB+1)*MAXWV+2)/2)
64 REAL EON((MAXWV+1)*((IROMB+1)*MAXWV+2)/2),EONTOP(MAXWV+1)
66 REAL WTOP(2*(MAXWV+1),KMAX)
67 REAL PLN((MAXWV+1)*((IROMB+1)*MAXWV+2)/2),PLNTOP(MAXWV+1)
68 REAL F(2*MAXWV+3,2,KMAX)
69 REAL CLAT(MJ),SLAT(MJ),CLON(MAXWV,MI),SLON(MAXWV,MI)
70 parameter(rerth=6.3712e6)
71 parameter(pi=3.14159265358979,dpr=180./pi)
74 CALL spwget(iromb,maxwv,eps,epstop,enn1,elonn1,eon,eontop)
75 mx=(maxwv+1)*((iromb+1)*maxwv+2)/2
87 rlon=mod(rlon1+dlon*(i-1)+3600,360.)
89 clon(l,i)=cos(l*rlon/dpr)
90 slon(l,i)=sin(l*rlon/dpr)
93 ye=1-log(tan((rlat1+90)/2/dpr))*dpr/dlat
95 rlat=atan(exp(dlat/dpr*(j-ye)))*2*dpr-90
108 CALL splegend(iromb,maxwv,slat(j),clat(j),eps,epstop,
110 CALL spsynth(iromb,maxwv,2*maxwv,idim,kw,2*mxtop,kmax,
111 & clat(j),pln,plntop,mp,wave,wtop,f)
114 ijk=(i-1)*ni+(j-1)*nj+(k-1)*kg+1
119 ijk=(i-1)*ni+(j-1)*nj+(k-1)*kg+1
120 gm(ijk)=gm(ijk)+2.*(f(2*l+1,1,k)*clon(l,i)
121 & -f(2*l+2,1,k)*slon(l,i))