NCEPLIBS-w3emc
2.12.0
Loading...
Searching...
No Matches
iw3jdn.f
Go to the documentation of this file.
1
C> @file
2
C> @brief Computes julian day number from year (4 digits), month, and day.
3
C> @author Ralph Jones @date 1987-03-29
4
5
C> Computes julian day number from year (4 digits), month,
6
C> and day. iw3jdn is valid for years 1583 a.d. to 3300 a.d.
7
C> Julian day number can be used to compute day of week, day of
8
C> year, record numbers in an archive, replace day of century,
9
C> find the number of days between two dates.
10
C>
11
C> Program history log:
12
C> - Ralph Jones 1987-03-29
13
C> - Ralph Jones 1989-10-25 Convert to cray cft77 fortran.
14
C>
15
C> @param[in] IYEAR Integer year (4 Digits)
16
C> @param[in] MONTH Integer month of year (1 - 12)
17
C> @param[in] IDAY Integer day of month (1 - 31)
18
C> @return IW3JDN Integer Julian day number
19
C> - Jan 1, 1960 is Julian day number 2436935
20
C> - Jan 1, 1987 is Julian day number 2446797
21
C>
22
C> @note Julian period was devised by joseph scaliger in 1582.
23
C> Julian day number #1 started on Jan. 1,4713 B.C. Three major
24
C> chronological cycles begin on the same day. A 28-year solar
25
C> cycle, a 19-year luner cycle, a 15-year indiction cycle, used
26
C> in ancient rome to regulate taxes. It will take 7980 years
27
C> to complete the period, the product of 28, 19, and 15.
28
C> scaliger named the period, date, and number after his father
29
C> Julius (not after the julian calendar). This seems to have
30
C> caused a lot of confusion in text books. Scaliger name is
31
C> spelled three different ways. Julian date and Julian day
32
C> number are interchanged. A Julian date is used by astronomers
33
C> to compute accurate time, it has a fraction. When truncated to
34
C> an integer it is called an Julian day number. This function
35
C> was in a letter to the editor of the communications of the acm
36
C> volume 11 / number 10 / october 1968. The Julian day number
37
C> can be converted to a year, month, day, day of week, day of
38
C> year by calling subroutine w3fs26.
39
C>
40
C> @author Ralph Jones @date 1987-03-29
41
FUNCTION
iw3jdn
(IYEAR,MONTH,IDAY)
42
C
43
iw3jdn
= iday - 32075
44
& + 1461 * (iyear + 4800 + (month - 14) / 12) / 4
45
& + 367 * (month - 2 - (month -14) / 12 * 12) / 12
46
& - 3 * ((iyear + 4900 + (month - 14) / 12) / 100) / 4
47
RETURN
48
END
iw3jdn
function iw3jdn(iyear, month, iday)
Computes julian day number from year (4 digits), month, and day.
Definition
iw3jdn.f:42
src
iw3jdn.f
Generated by
1.9.8