Test 1's target quantity computed via the GWI-coefficient expansion in scalar spherical harmonics, rather than direct VSH DOT products -- must agree with TEST1_ANALYTIC and TEST1_VSH to machine precision. This is the check that specifically exercises GWI (see also TEST2_GW for the GWJ counterpart).
Returns: Complex array of size NTH, matching TEST1_ANALYTIC's
grid.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=i4), | intent(in) | :: | NTH |
Number of colatitude samples over . |
FUNCTION TEST1_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) :: TEST1_GW PH = 0.123d0 !- 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=1,3,2 TEMP1 = TEMP1-((8.d0-I1*(I1+1.d0))/2.d0/DSQRT(12.d0))* & GWI(2,0,1,1,I1,1)*SSH(I1,1,TH,PH) ENDDO I2 = 1 TEMP2 = -(1.d0/DSQRT(3.d0))*GWI(1,-1,1,1,0,0)* & CONJG(SSH(1,1,TH,PH)) TEST1_GW(I) = TEMP1*TEMP2 ENDDO RETURN END FUNCTION TEST1_GW