Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | P | |||
character(len=*), | intent(in) | :: | WHAT |
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.
REAL(r64) FUNCTION P01(P, WHAT)
!
! AUTHOR ASHRAE 1311-RP
! DATE WRITTEN unknown
! MODIFIED Bereket Nigusse, May 2013
! Added error messages
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! Constrains property to range 0 - 1
!
! METHODOLOGY EMPLOYED:
! na
!
! REFERENCES:
! na
!
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: P ! property
CHARACTER(len=*), INTENT(IN) :: WHAT ! identifier for err msg
! FUNCTION PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: RoutineName='P01: '
!
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
! na
! Flow
IF (P < -0.05d0 .OR. P > 1.05d0) THEN
CALL ShowWarningMessage(RoutineName//'property value should have been between 0 and 1')
CALL ShowContinueError(WHAT//'=: '//' property value is ='//TRIM(TrimSigDigits(P,4)) )
IF ( P < 0.0d0 ) Then
CALL ShowContinueError('property value is reset to 0.0')
ELSE IF ( P > 1.0d0 ) Then
CALL ShowContinueError('property value is reset to 1.0')
ENDIF
ENDIF
P01 = MAX(0.0d0, MIN( 1.0d0, P))
RETURN
END FUNCTION P01