Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64) | :: | p(nume) | ||||
real(kind=r64) | :: | pvis |
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.
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 VisibleSprectrumAverage(p, pvis)
! SUBROUTINE INFORMATION:
! AUTHOR Adapted by F.Winkelmann from WINDOW 5
! subroutine w4vis
! DATE WRITTEN August 1999
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Calculates visible average of property p by weighting with solar
! spectral irradiance, e, and photopic response, y30
! 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) :: p(nume) ! Quantity to be weighted by solar spectrum
REAL(r64) :: pvis ! Quantity p weighted by solar spectrum and photopic
! response curve
REAL(r64) :: y30ils1,y30new ! Photopic response variables
REAL(r64) :: evis ! Solar spectrum value times photopic response
! times delta wavelength
! FLOW
down = 0.0d0
up = 0.0d0
y30ils1 = 0.0d0
y30new = 0.0d0
do i=1,nume
!EPTeam - Objexx suggested change
!do i=2,nume !Objexx:BoundsViolation e|wle|p(i-1) @ i=1: Changed start index from 1 to 2: wle values prevented this violation from occurring in practice
! Restrict to visible range
if (wle(i) >= 0.37d0 .and. wle(i) <= 0.78d0) then
call Interpolate(wlt3, y30, numt3, wle(i), y30new)
evis = e(i-1) * 0.5d0 * (y30new+y30ils1) * (wle(i)-wle(i-1))
up = up + 0.5d0*(p(i) + p(i-1)) * evis
down = down + evis
y30ils1 = y30new
endif
end do
pvis = up / down
return
END SUBROUTINE VisibleSprectrumAverage