Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(inout) | :: | PrintEnvrnStamp |
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 ReportWeatherAndTimeInformation(PrintEnvrnStamp)
! SUBROUTINE INFORMATION:
! AUTHOR Rick Strand
! DATE WRITTEN June 1997
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is the main driver of the weather reporting. This
! routine is also responsible for printing the time and environment
! stamps.
! METHODOLOGY EMPLOYED:
! Reporting is only done for non-warmup days. The environment stamp
! is only reported at the beginning of an environment, but after the
! warmup days (to allow all modules to print the report headers to the
! output file. This is controlled by the PrintEnvrnStamp variable
! which is passed in and reset if necessary.
! REFERENCES:
! na
! USE STATEMENTS:
!unused0909 USE DataSystemVariables, ONLY: ReportDuringWarmup
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
LOGICAL, INTENT(INOUT) :: PrintEnvrnStamp ! Set to true when the environment header should be printed
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: EndOfHeaderFormat = "('End of Data Dictionary')" ! End of data dictionary marker
CHARACTER(len=*), PARAMETER :: EnvironmentStampFormat = "(a,',',a,3(',',f7.2),',',f7.2)" ! Format descriptor for environ stamp
! CHARACTER(len=*), PARAMETER :: TimeStampFormat = "(i3,',',i4,',',i2,',',i2,',',i2)" ! Format descriptor for the date/time stamp
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
CHARACTER(len=100) :: Title
! FLOW:
! Report the time stamp and the current weather to the output file
Title = Environment(Envrn)%Title
IF(.NOT.WarmupFlag) THEN ! Write the required output information
! The first time through in a non-warmup day, the environment header
! must be printed. This must be done here and not in the generic
! BeginEnvrnFlag block above because other modules in the simulation
! must also print out header information. This can be done during
! the simulation warmup if the environment stamp printing is delayed
! until the warmup is completed. The stamp should only be printed once
! per environment (set/reset of PrintEnvrnStamp). In addition, before
! the first environment, the end of the header block flag must also be
! sent to the output file.
IF (PrintEnvrnStamp) THEN
IF (PrintEndDataDictionary .AND. DoOutputReporting) THEN
WRITE (OutputFileStandard,EndOfHeaderFormat)
WRITE (OutputFileMeters,EndOfHeaderFormat)
PrintEndDataDictionary = .FALSE.
ENDIF
IF (DoOutputReporting) THEN
WRITE (OutputFileStandard,EnvironmentStampFormat) TRIM(EnvironmentReportChr), &
Trim(Title),Latitude,Longitude,TimeZoneNumber,Elevation
WRITE (OutputFileMeters,EnvironmentStampFormat) TRIM(EnvironmentReportChr), &
Trim(Title),Latitude,Longitude,TimeZoneNumber,Elevation
PrintEnvrnStamp=.FALSE.
END IF
END IF
END IF ! ... end of .NOT.WarmupFlag IF-THEN block.
RETURN
END SUBROUTINE ReportWeatherAndTimeInformation