-
Notifications
You must be signed in to change notification settings - Fork 3
/
jdt.f
41 lines (33 loc) · 1.34 KB
/
jdt.f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
function jdt(numdays,i,m)
!! ~ ~ ~ PURPOSE ~ ~ ~
!! this subroutine computes the julian date given the month and
!! the day of the month
!! ~ ~ ~ INCOMING VARIABLES ~ ~ ~
!! name |units |definition
!! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
!! numdays(:) |julian date |julian date for last day of preceding
!! |month (where the array location is the
!! |number of the month). The dates are for
!! |leap years (numdays=ndays)
!! m |none |month
!! i |none |day
!! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
!! ~ ~ ~ OUTGOING VARIABLES ~ ~ ~
!! name |units |definition
!! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
!! jdt |julian date |julian date
!! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
!! ~ ~ ~ ~ ~ ~ END SPECIFICATIONS ~ ~ ~ ~ ~ ~
integer, intent (in), dimension (13) :: numdays
integer, intent (in) :: m, i
integer :: jdt
jdt = 0
if (m /= 0) then
if (m <= 2) then
jdt = numdays(m) + i
else
jdt = numdays(m) - 1 + i
end if
end if
return
end