Hand-derived closed form for Test 2's target quantity (a different product of VSH inner products than Test 1, with nonzero content), evaluated over a colatitude grid at a fixed for comparison against TEST2_VSH and TEST2_GW.
Returns: Complex array of size NTH, the analytic Test 2 values.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=i4), | intent(in) | :: | NTH |
Number of colatitude samples over . |
FUNCTION TEST2_ANALYTIC(NTH) IMPLICIT NONE INTEGER(KIND=i4), INTENT(IN) :: NTH INTEGER(KIND=i4) :: I REAL(KIND=dp) :: TH,PH COMPLEX(KIND=dp), DIMENSION(NTH) :: TEST2_ANALYTIC PH = 1.006d0 !- arbitrary choice DO I=1,NTH TH = (I-1)*pi/(NTH-1) TEST2_ANALYTIC(I)=15.d0*DSQRT(15.d0*7.d0)/128.d0/pi**2* & (DSIN(TH)*DCOS(TH))**3*DSIN(TH)/DSQRT(2.d0)* & exp(4.d0*j*PH) ENDDO RETURN END FUNCTION TEST2_ANALYTIC