Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | inMonthReport | |||
character(len=*), | intent(in) | :: | inVariMeter | |||
character(len=*), | intent(in) | :: | inColHead | |||
integer, | intent(in) | :: | inAggregate |
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 AddMonthlyFieldSetInput(inMonthReport, inVariMeter, inColHead, inAggregate)
! SUBROUTINE INFORMATION:
! AUTHOR Jason Glazer
! DATE WRITTEN August 2008
! MODIFIED
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Assigns the column information for predefined
! monthly reports
! METHODOLOGY EMPLOYED:
! Simple assignments to public variables.
! REFERENCES:
! na
! USE STATEMENTS:
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER,INTENT(IN) :: inMonthReport
CHARACTER(len=*),INTENT(IN) :: inVariMeter
CHARACTER(len=*),INTENT(IN) :: inColHead
INTEGER,INTENT(IN) :: inAggregate
! SUBROUTINE PARAMETER DEFINITIONS:
INTEGER, PARAMETER :: sizeIncrement = 50
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
! na
IF (.NOT. ALLOCATED(MonthlyFieldSetInput)) THEN
ALLOCATE(MonthlyFieldSetInput(sizeIncrement))
sizeMonthlyFieldSetInput = sizeIncrement
MonthlyFieldSetInputCount = 1
ELSE
MonthlyFieldSetInputCount = MonthlyFieldSetInputCount + 1
! if larger then current size then make a temporary array of the same
! type and put stuff into it while reallocating the main array
IF (MonthlyFieldSetInputCount .GT. sizeMonthlyFieldSetInput) THEN
ALLOCATE(MonthlyFieldSetInputCopy(sizeMonthlyFieldSetInput))
MonthlyFieldSetInputCopy = MonthlyFieldSetInput
DEALLOCATE(MonthlyFieldSetInput)
ALLOCATE(MonthlyFieldSetInput(sizeMonthlyFieldSetInput + sizeIncrement))
MonthlyFieldSetInput(1:sizeMonthlyFieldSetInput) = MonthlyFieldSetInputCopy
DEALLOCATE(MonthlyFieldSetInputCopy)
sizeMonthlyFieldSetInput = sizeMonthlyFieldSetInput + sizeIncrement
END IF
END IF
! initialize new record)
MonthlyFieldSetInput(MonthlyFieldSetInputCount)%variMeter = inVariMeter
MonthlyFieldSetInput(MonthlyFieldSetInputCount)%colHead = inColHead
MonthlyFieldSetInput(MonthlyFieldSetInputCount)%aggregate = inAggregate
!update the references from the MonthlyInput array
IF ((inMonthReport .GT. 0) .AND. (inMonthReport .LE. MonthlyInputCount)) THEN
IF (MonthlyInput(inMonthReport)%firstFieldSet .EQ. 0) THEN
MonthlyInput(inMonthReport)%firstFieldSet = MonthlyFieldSetInputCount
MonthlyInput(inMonthReport)%numFieldSet = 1
ELSE
MonthlyInput(inMonthReport)%numFieldSet = MonthlyInput(inMonthReport)%numFieldSet + 1
END IF
END IF
END SUBROUTINE AddMonthlyFieldSetInput