da_get_julian_time.inc

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