Stuff and Dale (1974) describe a method of date conversion for use in the computer handling of climatological and similar data. Their procedure requires a separate test for leap years. The following simple subroutine incorporates a test for occurrence of leap years and also a test for automatic con
A simple method of calendar conversion in computer applications
โ Scribed by R.G. Stuff; R.F. Dale
- Publisher
- Elsevier Science
- Year
- 1973
- Weight
- 70 KB
- Volume
- 12
- Category
- Article
- ISSN
- 0002-1571
No coin nor oath required. For personal study only.
โฆ Synopsis
The day number for a year beginning March 1 can be computed by the relation: day of yr. = month x 30.6 + day of month -91.3 (decimal part deleted).
Indexing weather data with a sequentially numbered day rather than the usual month and day can greatly speed automatic computations of time intervals and rates of changes for seasonal data which extend over or between different months. Most large computer facilities have routines to convert year, month, and day to a Julian or other perpetual date, however, these are cumbersome to incorporate into programs if they are available. Data acquisition systems can be rigged to record the day-of-year number (for example, see Ripley and Ohm, 1973) or if data files are indexed with the month and day, then the technique described here permits rapid interconversion between the two forms for computation, storage, plotting, or printed output.
Agricultural climatologists have traditionally numbered days or weeks of the year beginning with March 1 to avoid special handling of leap years (Barger and Thom, 1949). This arrangement permits computation of the climatological day with the simple formula given as statement 20 in Table I. The conversion factor of 30.6 was derived by TABLE 1 Computation of climatological day from month and day 10IFM<3THENLETM = M+ 12 20 N% = M , 30.6 + D 91.3 M = month (1 ~; M ~ 12); D = day of month (1 ~< D ~ 31); N = climatological day number (1 < N < 366).
fitting a straight line to the accumulated number of days corresponding to months numbered from March 1. This slope is not surprising since it is the average number of days per month if February is excluded. The constant 91.3 accounts for the first counted * Journal Paper No.
๐ SIMILAR VOLUMES