Test 2's target quantity computed via the GWJ-coefficient expansion (combined with a GWI term) in scalar spherical harmonics -- must agree with TEST2_ANALYTIC and TEST2_VSH to machine precision. This is the check that specifically exercises GWJ.
Returns: Complex array of size NTH, matching TEST2_ANALYTIC's
grid.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=i4), | intent(in) | :: | NTH |
Number of colatitude samples over . |
FUNCTION TEST2_GW(NTH) IMPLICIT NONE INTEGER(KIND=i4), INTENT(IN) :: NTH INTEGER(KIND=i4) :: I,I1,I2 REAL(KIND=dp) :: TH,PH COMPLEX(KIND=dp) :: TEMP1, TEMP2 COMPLEX(KIND=dp), DIMENSION(NTH) :: TEST2_GW PH = 1.006d0 !- arbitrary choice DO I=1,NTH TH = (I-1)*pi/(NTH-1) TEMP1 = DCMPLX(0.d0,0.d0) TEMP2 = DCMPLX(0.d0,0.d0) DO I1=2,4,2 TEMP1 = TEMP1+GWJ(3,2,2,0,I1,2)*SSH(I1,2,TH,PH) ENDDO TEMP1=-TEMP1*j/DSQRT(6.d0*12.d0) DO I2=1,3,2 TEMP2 = TEMP2+GWI(1,0,I2,-2,2,-2)* & CONJG(SSH(I2,-2,TH,PH)) ENDDO TEST2_GW(I) = TEMP1*TEMP2 ENDDO RETURN END FUNCTION TEST2_GW