Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64) | :: | p(nume) | ||||
real(kind=r64) | :: | psol |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
SUBROUTINE SolarSprectrumAverage(p, psol)
! SUBROUTINE INFORMATION:
! AUTHOR Adapted by F.Winkelmann from WINDOW 5 subroutine solar
! DATE WRITTEN August 1999
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Calculates average of property p weighted by solar spectral irradiance, e
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: up,down ! Intermediate variables
INTEGER :: i ! Wavelength counter
REAL(r64) :: esol ! Solar spectrum value times delta wavelength
REAL(r64) :: p(nume) ! Quantity to be weighted by solar spectrum
REAL(r64) :: psol ! Quantity p weighted by solar spectrum
! FLOW
up = 0.0d0
down = 0.0d0
do i=1,nume-1
esol = (wle(i+1) - wle(i)) * 0.5d0 * (e(i) + e(i+1))
up = up + 0.5d0 * (p(i) + p(i+1)) * esol
down = down + esol
END DO
psol = up / down
return
END SUBROUTINE SolarSprectrumAverage