C+ C NAME: C Deneq3 C PURPOSE: C Determines the average value at the mid latitude of a 3D array. C CALLING SEQUENCE: subroutine Deneq3(nLng,nLat,nT,Z,RR,DENEQU) C INPUTS: C nLng integer # longitudes C nLat integer # latitudes C nT integer # times C Z(nLng,nLat,nT) real 3D array of function values C RR real Height of source surface in AU C OUTPUTS: C DENEQU real Average density at 1 AU at the solar equator C PROCEDURE: C MODIFICATION HISTORY: C February, 2001, B. Jackson (UCSD) C- real Z(nLng,nLat,nT) NL = nLat/2+1 Bad = BadR4() R1AU = 1.0 DENEQU = 0.0 AN = 0.0 !$omp parallel do private(i,j,k) reduction(+:DENEQU,AN) do k=1,nT do j=NL,NL do i=1,nLng if (Z(i,j,k) .ne. Bad) then DENEQU = DENEQU+Z(i,j,k) AN = AN+1.0 end if end do end do end do !$omp end parallel do if (AN .ne. 0.0) DENEQU = (DENEQU/AN)*(RR*RR) return end