Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | varPointer | |||
real(kind=r64), | intent(out) | :: | sumResult | |||
real(kind=r64), | intent(out) | :: | maxResult |
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 getMaxAndSum(varPointer,sumResult,maxResult)
! SUBROUTINE INFORMATION:
! AUTHOR Jason Glazer of GARD Analytics, Inc.
! DATE WRITTEN July 2004
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Get the annual maximum and sum for the econVariable.
! METHODOLOGY EMPLOYED:
! REFERENCES:
! na
! USE STATEMENTS:
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: varPointer
REAL(r64),INTENT(OUT) :: sumResult
REAL(r64),INTENT(OUT) :: maxResult
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: sumVal
REAL(r64) :: maximumVal
REAL(r64) :: curVal
INTEGER :: jMonth
sumVal = 0.0d0
maximumVal = -HUGE(maximumVal)
DO jMonth = 1,12 !note not all months get printed out if more than 12 are used.- need to fix this later
curVal = econVar(varPointer)%values(jMonth)
sumVal = sumVal + curVal
IF (curVal .GT. maximumVal) THEN
maximumVal = curVal
END IF
END DO
sumResult = sumVal
maxResult = maximumVal
END SUBROUTINE getMaxAndSum