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 | ||
---|---|---|---|---|---|---|
logical, | intent(inout) | :: | ErrorsFound |
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 ResolveLocationInformation(ErrorsFound)
! SUBROUTINE INFORMATION:
! AUTHOR Rick Strand
! DATE WRITTEN June 1997
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is currently the main interface between the old data
! structure on the BLAST Weather file and the new data structure contained
! in this module. At some point, this subroutine will be converted
! to read information directly from the new input file.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE General, ONLY: RoundSigDigits
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
LOGICAL, INTENT(INOUT) :: ErrorsFound ! Set to true if no location evident
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: LocHdFormat="('! <Site:Location>, Location Name, Latitude {N+/S- Deg}, Longitude {E+/W- Deg}, ', &
& ' Time Zone Number {GMT+/-}, Elevation {m}, ', &
& ' Standard Pressure at Elevation {Pa}, Standard RhoAir at Elevation')"
CHARACTER(len=*), PARAMETER :: LocFormat="('Site:Location',7(',',A))"
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
! na
! FLOW:
IF (Environment(NumOfEnvrn)%KindOfEnvrn == ksRunPeriodWeather .and. WeatherFileExists) THEN
IF (LocationGathered) THEN
! See if "matching" location
IF (ABS(Latitude-WeatherFileLatitude) > 1.d0 .or. &
ABS(Longitude-WeatherFileLongitude) > 1.d0 .or. &
ABS(TimeZoneNumber-WeatherFileTimeZone) > 0.0d0 .or. &
ABS(Elevation-WeatherFileElevation)/Max(Elevation,1.d0) > .10d0) THEN
CALL ShowWarningError('Weather file location will be used rather than entered (IDF) Location object.')
CALL ShowContinueError('..Location object='//TRIM(LocationTitle))
CALL ShowContinueError('..Weather File Location='//TRIM(WeatherFileLocationTitle))
CALL ShowContinueError('..due to location differences, Latitude difference=['// &
trim(RoundSigDigits(ABS(Latitude-WeatherFileLatitude),2))//'] degrees, Longitude difference=['// &
trim(RoundSigDigits(ABS(Longitude-WeatherFileLongitude),2))//'] degrees.')
CALL ShowContinueError('..Time Zone difference=['// &
trim(RoundSigDigits(ABS(TimeZoneNumber-WeatherFileTimeZone),1))//'] hour(s), Elevation difference=['// &
trim(RoundSigDigits(ABS((Elevation-WeatherFileElevation)/Max(Elevation,1.d0))*100.0,2))//'] percent,'// &
' ['//trim(RoundSigDigits(ABS(Elevation-WeatherFileElevation),2))//'] meters.')
ENDIF
ENDIF
LocationTitle=WeatherFileLocationTitle
Latitude = WeatherFileLatitude
Longitude = WeatherFileLongitude
TimeZoneNumber = WeatherFileTimeZone
Elevation=WeatherFileElevation
ELSEIF (.not. LocationGathered) THEN
LocationTitle='Not Entered'
CALL ShowSevereError('No Location given. Must have location information for simulation.')
ErrorsFound=.true.
END IF
IF (.not. ErrorsFound) THEN
StdBaroPress=101.325d0*(1.d0-2.25577d-05*Elevation)**5.2559d0
StdBaroPress=StdBaroPress*1000.d0
StdRhoAir=PsyRhoAirFnPbTdbW(StdBaroPress,constant_twenty,constant_zero)
! Write Final Location Information to the initialization output file
Write(OutputFileInits,LocHdFormat)
Write(OutputFileInits,LocFormat) Trim(LocationTitle),TRIM(RoundSigDigits(Latitude,2)), &
TRIM(RoundSigDigits(Longitude,2)), &
TRIM(RoundSigDigits(TimeZoneNumber,2)), &
TRIM(RoundSigDigits(Elevation,2)), &
TRIM(RoundSigDigits(StdBaroPress,0)), &
TRIM(RoundSigDigits(StdRhoAir,4))
ENDIF
RETURN
END SUBROUTINE ResolveLocationInformation