C+ C NAME: C Deneq3 C PURPOSE: C Determines the average value at the mid latitude of a three-dimensional array. C C CALLING SEQUENCE: C call 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- subroutine Deneq3(nLng,nLat,nT,Z,RR,DENEQU) real Z(nLng,nLat,nT) NL = nLat/2+1 Bad = BadR4() 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