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 ReportMissing_RangeData
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN January 2002
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine reports the counts of missing/out of range data
! for weather file environments.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: MissString='Missing Data Found on Weather Data File'
CHARACTER(len=*), PARAMETER :: msFmt="('Missing ',A,', Number of items=',I5)"
CHARACTER(len=*), PARAMETER :: InvString='Invalid Data Found on Weather Data File'
CHARACTER(len=*), PARAMETER :: ivFmt="('Invalid ',A,', Number of items=',I5)"
CHARACTER(len=*), PARAMETER :: RangeString='Out of Range Data Found on Weather Data File'
CHARACTER(len=*), PARAMETER :: rgFmt="('Out of Range ',A,' [',A,',',A,'], Number of items=',I5)"
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
LOGICAL MissedHeader
LOGICAL OutOfRangeHeader
CHARACTER(len=120) ErrString
IF (.not. DisplayWeatherMissingDataWarnings) RETURN
MissedHeader=.false.
IF (Missed%DryBulb>0) THEN
IF (.not. MissedHeader) THEN
CALL ShowWarningError(MissString)
MissedHeader=.true.
ENDIF
WRITE(ErrString,msFMT) '"Dry Bulb Temperatures"',Missed%DryBulb
CALL ShowMessage(ErrString)
ENDIF
IF (Missed%StnPres>0) THEN
IF (.not. MissedHeader) THEN
CALL ShowWarningError(MissString)
MissedHeader=.true.
ENDIF
WRITE(ErrString,msFMT) '"Atmospheric Pressure"',Missed%StnPres
CALL ShowMessage(ErrString)
ENDIF
IF (Missed%RelHumid>0) THEN
IF (.not. MissedHeader) THEN
CALL ShowWarningError(MissString)
MissedHeader=.true.
ENDIF
WRITE(ErrString,msFMT) '"Relative Humidity"',Missed%RelHumid
CALL ShowMessage(ErrString)
ENDIF
IF (Missed%DewPoint>0) THEN
IF (.not. MissedHeader) THEN
CALL ShowWarningError(MissString)
MissedHeader=.true.
ENDIF
WRITE(ErrString,msFMT) '"Dew Point Temperatures"',Missed%DewPoint
CALL ShowMessage(ErrString)
ENDIF
IF (Missed%WindSpd>0) THEN
IF (.not. MissedHeader) THEN
CALL ShowWarningError(MissString)
MissedHeader=.true.
ENDIF
WRITE(ErrString,msFMT) '"Wind Speed"',Missed%WindSpd
CALL ShowMessage(ErrString)
ENDIF
IF (Missed%WindDir>0) THEN
IF (.not. MissedHeader) THEN
CALL ShowWarningError(MissString)
MissedHeader=.true.
ENDIF
WRITE(ErrString,msFMT) '"Wind Direction"',Missed%WindDir
CALL ShowMessage(ErrString)
ENDIF
IF (Missed%DirectRad>0) THEN
IF (.not. MissedHeader) THEN
CALL ShowWarningError(MissString)
MissedHeader=.true.
ENDIF
WRITE(ErrString,msFMT) '"Direct Radiation"',Missed%DirectRad
CALL ShowMessage(ErrString)
ENDIF
IF (Missed%DiffuseRad>0) THEN
IF (.not. MissedHeader) THEN
CALL ShowWarningError(MissString)
MissedHeader=.true.
ENDIF
WRITE(ErrString,msFMT) '"Diffuse Radiation"',Missed%DiffuseRad
CALL ShowMessage(ErrString)
ENDIF
! IF (Missed%Visibility>0) THEN
! IF (.not. MissedHeader) THEN
! CALL ShowWarningError(MissString)
! MissedHeader=.true.
! ENDIF
! WRITE(ErrString,msFMT) 'Visibility',Missed%Visibility
! CALL ShowMessage(ErrString)
! ENDIF
! IF (Missed%AerOptDepth>0) THEN
! IF (.not. MissedHeader) THEN
! CALL ShowWarningError(MissString)
! MissedHeader=.true.
! ENDIF
! WRITE(ErrString,msFMT) 'Aerosol Optical Depth',Missed%AerOptDepth
! CALL ShowMessage(ErrString)
! ENDIF
IF (Missed%TotSkyCvr>0) THEN
IF (.not. MissedHeader) THEN
CALL ShowWarningError(MissString)
MissedHeader=.true.
ENDIF
WRITE(ErrString,msFMT) '"Total Sky Cover"',Missed%TotSkyCvr
CALL ShowMessage(ErrString)
ENDIF
IF (Missed%OpaqSkyCvr>0) THEN
IF (.not. MissedHeader) THEN
CALL ShowWarningError(MissString)
MissedHeader=.true.
ENDIF
WRITE(ErrString,msFMT) '"Opaque Sky Cover"',Missed%OpaqSkyCvr
CALL ShowMessage(ErrString)
ENDIF
! IF (Missed%Ceiling>0) THEN
! IF (.not. MissedHeader) THEN
! CALL ShowWarningError(MissString)
! MissedHeader=.true.
! ENDIF
! WRITE(ErrString,msFMT) 'Ceiling Height',Missed%Ceiling
! CALL ShowMessage(ErrString)
! ENDIF
! IF (Missed%PrecipWater>0) THEN
! IF (.not. MissedHeader) THEN
! CALL ShowWarningError(MissString)
! MissedHeader=.true.
! ENDIF
! WRITE(ErrString,msFMT) 'Water Precipitation',Missed%PrecipWater
! CALL ShowMessage(ErrString)
! ENDIF
IF (Missed%SnowDepth>0) THEN
IF (.not. MissedHeader) THEN
CALL ShowWarningError(MissString)
MissedHeader=.true.
ENDIF
WRITE(ErrString,msFMT) '"Snow Depth"',Missed%SnowDepth
CALL ShowMessage(ErrString)
ENDIF
IF (Missed%WeathCodes>0) THEN
CALL ShowWarningError(InvString)
WRITE(ErrString,ivFMT) '"Weather Codes" (not equal 9 digits)',Missed%WeathCodes
CALL ShowMessage(ErrString)
ENDIF
! IF (Missed%Albedo>0) THEN
! IF (.not. MissedHeader) THEN
! CALL ShowWarningError(MissString)
! MissedHeader=.true.
! ENDIF
! WRITE(ErrString,msFMT) '"Albedo"',Missed%Albedo
! CALL ShowMessage(ErrString)
! ENDIF
IF (Missed%LiquidPrecip>0) THEN
IF (.not. MissedHeader) THEN
CALL ShowWarningError(MissString)
MissedHeader=.true.
ENDIF
WRITE(ErrString,msFMT) '"Liquid Precipitation Depth"',Missed%LiquidPrecip
CALL ShowMessage(ErrString)
ENDIF
! IF (Missed%DaysLastSnow>0) THEN
! IF (.not. MissedHeader) THEN
! CALL ShowWarningError(MissString)
! MissedHeader=.true.
! ENDIF
! WRITE(ErrString,msFMT) 'Days Since Last Snow',Missed%DaysLastSnow
! CALL ShowMessage(ErrString)
! ENDIF
OutOfRangeHeader=.false.
IF (OutOfRange%DryBulb>0) THEN
IF (.not. OutOfRangeHeader) THEN
CALL ShowWarningError(RangeString)
OutOfRangeHeader=.true.
ENDIF
WRITE(ErrString,rgFmt) 'Dry Bulb Temperatures','>=-90','<=70',OutOfRange%DryBulb
CALL ShowMessage(ErrString)
ENDIF
IF (OutOfRange%StnPres>0) THEN
IF (.not. OutOfRangeHeader) THEN
CALL ShowWarningError(RangeString)
OutOfRangeHeader=.true.
ENDIF
WRITE(ErrString,rgFmt) 'Atmospheric Pressure','>31000','<=120000',OutOfRange%StnPres
CALL ShowMessage(ErrString)
CALL ShowMessage('Out of Range values set to last good value')
ENDIF
IF (OutOfRange%RelHumid>0) THEN
IF (.not. OutOfRangeHeader) THEN
CALL ShowWarningError(RangeString)
OutOfRangeHeader=.true.
ENDIF
WRITE(ErrString,rgFmt) 'Relative Humidity','>=0','<=110',OutOfRange%RelHumid
CALL ShowMessage(ErrString)
ENDIF
IF (OutOfRange%DewPoint>0) THEN
IF (.not. OutOfRangeHeader) THEN
CALL ShowWarningError(RangeString)
OutOfRangeHeader=.true.
ENDIF
WRITE(ErrString,rgFmt) 'Dew Point Temperatures','>=-90','<=70',OutOfRange%DewPoint
CALL ShowMessage(ErrString)
ENDIF
IF (OutOfRange%WindSpd>0) THEN
IF (.not. OutOfRangeHeader) THEN
CALL ShowWarningError(RangeString)
OutOfRangeHeader=.true.
ENDIF
WRITE(ErrString,rgFmt) 'Wind Speed','>=0','<=40',OutOfRange%WindSpd
CALL ShowMessage(ErrString)
ENDIF
IF (OutOfRange%WindDir>0) THEN
IF (.not. OutOfRangeHeader) THEN
CALL ShowWarningError(RangeString)
OutOfRangeHeader=.true.
ENDIF
WRITE(ErrString,rgFmt) 'Wind Direction','>=0','<=360',OutOfRange%WindDir
CALL ShowMessage(ErrString)
ENDIF
IF (OutOfRange%DirectRad>0) THEN
IF (.not. OutOfRangeHeader) THEN
CALL ShowWarningError(RangeString)
OutOfRangeHeader=.true.
ENDIF
WRITE(ErrString,rgFmt) 'Direct Radiation','>=0','NoLimit',OutOfRange%DirectRad
CALL ShowMessage(ErrString)
ENDIF
IF (OutOfRange%DiffuseRad>0) THEN
IF (.not. OutOfRangeHeader) THEN
CALL ShowWarningError(RangeString)
OutOfRangeHeader=.true.
ENDIF
WRITE(ErrString,rgFmt) 'Diffuse Radiation','>=0','NoLimit',OutOfRange%DiffuseRad
CALL ShowMessage(ErrString)
ENDIF
RETURN
END SUBROUTINE ReportMissing_RangeData