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) | :: | reportIDString | |||
integer, | intent(in) | :: | timeIndex | |||
real(kind=r64), | intent(in) | :: | repValue | |||
integer, | intent(in) | :: | storeType | |||
real(kind=r64), | intent(in), | optional | :: | numOfItemsStored | ||
integer, | intent(in), | optional | :: | reportingInterval | ||
integer, | intent(in), | optional | :: | minValue | ||
integer, | intent(in), | optional | :: | minValueDate | ||
integer, | intent(in), | optional | :: | maxValue | ||
integer, | intent(in), | optional | :: | 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 WriteReportIntegerData (reportID, reportIDString, 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 averaged integer data to the output files and
! SQL database. It supports the WriteIntegerVariableOutput 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 reporting ID
CHARACTER(len=*), INTENT(IN) :: reportIDString ! The variable's reporting ID (character)
INTEGER, INTENT(IN) :: timeIndex ! An index that points to this timestamp for this data
REAL(r64), INTENT(IN) :: repValue ! The variable's value
INTEGER, INTENT(IN) :: storeType ! Type of item (averaged or summed)
REAL(r64), INTENT(IN), OPTIONAL :: numOfItemsStored ! The number of items (hours or timesteps) of data stored !Objexx:OPTIONAL Used without PRESENT check
INTEGER, INTENT(IN), OPTIONAL :: reportingInterval ! The reporting interval (e.g., monthly) !Objexx:OPTIONAL Used without PRESENT check
INTEGER, INTENT(IN), OPTIONAL :: maxValue ! The variable's maximum value during the reporting interval !Objexx:OPTIONAL Used without PRESENT check
INTEGER, INTENT(IN), OPTIONAL :: maxValueDate ! The date the maximum value occurred !Objexx:OPTIONAL Used without PRESENT check
INTEGER, INTENT(IN), OPTIONAL :: minValue ! The variable's minimum value during the reporting interval !Objexx:OPTIONAL Used without PRESENT check
INTEGER, INTENT(IN), OPTIONAL :: minValueDate ! The date the minimum value occurred !Objexx:OPTIONAL Used without PRESENT check
! 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) :: rmaxValue, rminValue
REAL(r64) :: repVal ! The variable's value
repVal=repValue
IF (storeType == AveragedVar) repVal=repVal/numOfItemsStored
IF (repValue == 0.0d0) THEN
NumberOut = '0.0'
ELSE
WRITE(NumberOut,*) repVal
NumberOut = ADJUSTL(NumberOut)
NumberOut = RemoveTrailingZeros(NumberOut)
ENDIF
! Append the min and max strings with date information
WRITE(MinOut,*) minValue
WRITE(MaxOut,*) maxValue
CALL ProduceMinMaxString(MinOut, minValueDate, reportingInterval)
CALL ProduceMinMaxString(MaxOut, maxValueDate, reportingInterval)
IF (WriteOutputToSQLite) THEN
rminValue=minValue
rmaxValue=maxValue
CALL CreateSQLiteReportVariableDataRecord(reportID, TimeIndex, repVal, reportingInterval, &
rminValue, minValueDate, rmaxValue, maxValueDate)
END IF
SELECT CASE (reportingInterval)
CASE (ReportEach, ReportTimeStep, ReportHourly) ! -1, 0, 1
WRITE(OutputFileStandard, fmta) TRIM(reportIDString)//','//TRIM(NumberOut)
CASE (ReportDaily, ReportMonthly, ReportSim) ! 2, 3, 4
WRITE(OutputFileStandard, fmta) TRIM(reportIDString)//','//TRIM(NumberOut)//','//TRIM(MinOut)//','//TRIM(MaxOut)
END SELECT
RETURN
END SUBROUTINE WriteReportIntegerData