Nodes of different colours represent the following:
Solid arrows point from a parent (sub)module to the submodule which is descended from it. Dashed arrows point from a module being used to the module or program unit using it. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | reportID | |||
character(len=*), | intent(in) | :: | creportID | |||
integer, | intent(in) | :: | timeIndex | |||
real(kind=r64), | intent(in) | :: | repValue | |||
integer, | intent(in) | :: | storeType | |||
real(kind=r64), | intent(in) | :: | numOfItemsStored | |||
integer, | intent(in) | :: | reportingInterval | |||
real(kind=r64), | intent(in) | :: | minValue | |||
integer, | intent(in) | :: | minValueDate | |||
real(kind=r64), | intent(in) | :: | maxValue | |||
integer, | intent(in) | :: | maxValueDate |
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 WriteReportRealData (reportID, creportID, timeIndex, repValue, storeType, numOfItemsStored, &
reportingInterval, minValue, minValueDate, maxValue, maxValueDate)
! SUBROUTINE INFORMATION:
! AUTHOR Greg Stark
! DATE WRITTEN July 2008
! MODIFIED April 2011; Linda Lawrie
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine writes the average real data to the output files and
! SQL database. It supports the WriteRealVariableOutput subroutine.
! Much of the code here was an included in earlier versions
! of the UpdateDataandReport subroutine. The code was moved to facilitate
! easier maintenance and writing of data to the SQL database.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE DataPrecisionGlobals
USE DataGlobals, ONLY: OutputFileStandard
USE General, ONLY: RemoveTrailingZeros
USE SQLiteProcedures
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: reportID ! The variable's report ID
CHARACTER(len=*), INTENT(IN) :: creportID ! variable ID in characters
INTEGER, INTENT(IN) :: timeIndex ! An index that points to the timestamp
REAL(r64), INTENT(IN) :: repValue ! The variable's value
INTEGER, INTENT(IN) :: storeType ! Averaged or Sum
REAL(r64), INTENT(IN) :: numOfItemsStored ! The number of items (hours or timesteps) of data stored
INTEGER, INTENT(IN) :: reportingInterval ! The variable's reporting interval (e.g., daily)
REAL(r64), INTENT(IN) :: maxValue ! The variable's maximum value during the reporting interval
INTEGER, INTENT(IN) :: maxValueDate ! The date the maximum value occurred
REAL(r64), INTENT(IN) :: minValue ! The variable's minimum value during the reporting interval
INTEGER, INTENT(IN) :: minValueDate ! The date the minimum value occurred
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: fmta="(A)"
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
CHARACTER(len=32) :: NumberOut ! Character for producing "number out"
CHARACTER(len=55) :: MaxOut ! Character for Max out string
CHARACTER(len=55) :: MinOut ! Character for Min out string
REAL(r64) :: repVal ! The variable's value
repVal=repValue
IF (storeType == AveragedVar) repVal=repVal/numOfItemsStored
IF (repVal == 0.0d0) THEN
NumberOut = '0.0'
ELSE
WRITE(NumberOut,*) repVal
NumberOut = ADJUSTL(NumberOut)
NumberOut = RemoveTrailingZeros(NumberOut)
ENDIF
IF (maxValue == 0.0d0) THEN
MaxOut = '0.0'
ELSE
WRITE(MaxOut,*) maxValue
MaxOut = ADJUSTL(MaxOut)
MaxOut = RemoveTrailingZeros(MaxOut)
ENDIF
IF (minValue == 0.0d0) THEN
MinOut = '0.0'
ELSE
WRITE(MinOut,*) minValue
MinOut = ADJUSTL(MinOut)
MinOut = RemoveTrailingZeros(MinOut)
ENDIF
! Append the min and max strings with date information
CALL ProduceMinMaxString (MinOut, minValueDate, reportingInterval)
CALL ProduceMinMaxString (MaxOut, maxValueDate, reportingInterval)
IF (WriteOutputToSQLite) THEN
CALL CreateSQLiteReportVariableDataRecord(reportID, TimeIndex, repVal, reportingInterval, &
minValue, minValueDate, maxValue, maxValueDate)
END IF
SELECT CASE (reportingInterval)
CASE (ReportEach, ReportTimeStep, ReportHourly) ! -1, 0, 1
WRITE(OutputFileStandard, fmta) TRIM(creportID)//','//TRIM(NumberOut)
CASE (ReportDaily, ReportMonthly, ReportSim) ! 2, 3, 4
WRITE(OutputFileStandard, fmta) TRIM(creportID)//','//TRIM(NumberOut)//','//TRIM(MinOut)//','//TRIM(MaxOut)
END SELECT
RETURN
END SUBROUTINE WriteReportRealData