Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | Longitude |
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.
REAL(r64) Function GetSTM(Longitude)
! FUNCTION INFORMATION:
! AUTHOR Linda K. Lawrie
! DATE WRITTEN August 2003
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! This function determines the "standard time meridian" from the input
! longitude. Calculates the proper Meridian from Longitude. This
! value is needed for weather calculations so that the sun comes
! up and goes down at the right times.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: Longitude ! Longitude from user input
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
REAL(r64) longl(-12:12) ! Lower Longitude value for a Time Zone
REAL(r64) longh(-12:12) ! Upper Longitude value for a Time Zone
INTEGER i ! Loop variable
REAL(r64) temp ! temporary value used to determine time zone
REAL(r64) tz ! resultant tz meridian
GetSTM=0.0d0
!
longl(0)=-7.5d0
longh(0)=7.5d0
do i=1,12
longl(i)=longl(i-1)+15.d0
longh(i)=longh(i-1)+15.d0
enddo
do i=1,12
longl(-i)=longl(-i+1)-15.d0
longh(-i)=longh(-i+1)-15.d0
enddo
temp=Longitude
temp=mod(temp,360.d0)
if (temp > 180.d0) temp=temp-180.d0
do i=-12,12
if (temp > longl(i) .and. temp <= longh(i)) then
tz=i
tz=mod(tz,24.d0)
GetSTM=tz
exit
endif
enddo
RETURN
!
END FUNCTION GetSTM