1 subroutine da_get_julian_time(year,month,day,hour,minute,gstime)
3 !------------------------------------------------------------------------------
4 ! Purpose: Calculate Julian time from year/month/day/hour/minute.
5 !------------------------------------------------------------------------------
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*8, intent(out) :: gstime
16 integer :: iw3jdn, ndays, nmind
18 if (trace_use) call da_trace_entry("da_get_julian_time")
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
26 nmind = ndays*1440 + hour * 60 + minute
29 if (trace_use) call da_trace_exit("da_get_julian_time")
31 end subroutine da_get_julian_time