da_get_julian_time.inc

References to this file elsewhere.
1 subroutine da_get_julian_time(year,month,day,hour,minute,gstime)
2 
3    !------------------------------------------------------------------------------
4    ! Purpose: Calculate Julian time from year/month/day/hour/minute.
5    !------------------------------------------------------------------------------
6 
7    implicit none
8 
9    integer, intent(in)  :: year
10    integer, intent(in)  :: month
11    integer, intent(in)  :: day
12    integer, intent(in)  :: hour
13    integer, intent(in)  :: minute
14    real,    intent(out) :: gstime
15 
16    integer    :: iw3jdn, ndays, nmind
17 
18    if (trace_use) call da_trace_entry("da_get_julian_time")
19 
20    iw3jdn  =    day - 32075 &
21               + 1461 * (year + 4800 + (month - 14) / 12) / 4 &
22               + 367 * (month - 2 - (month - 14) / 12 * 12) / 12 &
23               - 3 * ((year + 4900 + (month - 14) / 12) / 100) / 4
24    ndays = iw3jdn - 2443510
25 
26    nmind = ndays*1440 + hour * 60 + minute
27    gstime = float(nmind)
28 
29    if (trace_use) call da_trace_exit("da_get_julian_time")
30 
31 end subroutine da_get_julian_time