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