TSURPHU CALENDAR SOFTWARE. Version 1.20. 15 February 2012. The program is called tcgbk.exe, and simply needs to be run from a command line prompt - it does not need to be installed. When the program is run, it sets the default epoch of 1852, (Jamgon Kongtrul) and then displays the following menu, from which selections are made by pressing the relevant numeric key: TSURPHU CALENDAR SOFTWARE Version 1.20 (Includes byed-rtsis Sun) Use numeric keys to select from the following: 1. Set epoch. 2. Print calendar. 3. Calendar cycle. 4. Run search test. 5. Calculate New Years. 9. Finish. The software has been developed from the source code of tcg.exe. which is currently at version 1.05. For this reason this first version of Tsurphu calendar software has been given a version number higher than 1.00. Option 1 allows the selection of two epochs. The first is the default epoch of 1852. The second is the Kalacakra Tantra epoch of 806 CE. This has been added so that calendars can be calculated for years before 1852. Option 2 prints to disk a calendar for a range of years - this can be just a single year. If the program is started normally, it prints in a text file a calendar identical to those given as an archive on this web site, with a name such as tsa_2013.txt. Alternatively, the program can be started with the command: tcgbk full If started in this way, when option 2 is selected, two text files are written to disk; the second will have a name such as ts2_2013.txt. This file contains much more extensive information, and is designed for aid in printing and publishing a full calendar. This extra information will be described later. The third selection runs the main calendar cycle, printing on screen information for one day at a time. First you need to enter a three-field number as the starting date for calculations. This needs the Tibetan lunar day (tshes pa), month number and western year. For example: 1 3 2013 would start calculations for the 1st lunar day (tshes pa) in the 3rd Tibetan month of the year starting early in 2013. Once the daily information has been displayed, single key commands are used to display further information. N/n - goes back to select a new start date. E/e - returns to the main menu. T/t - adds 1 to the Tibetan lunar day, "tshes pa". M/m - adds 1 to the month number. Y/y - adds 1 to the year. R/r - prints the current information on screen to file, in REPORT.DAT. P/p - goes to the previous lunar day. In the block of data for any lunar date, the following information is given. The top three lines appear as follows: 2. Kongtrul Tshurphu, 1852. The ZLA-DAG is: 1991;43, Month = 3, Year = 2013 DATE is: 1 / 3 / 2013, Corrected Month = 3, nag pa The first line indicates the epoch. The next two lines indicate that the data is for the first lunar day (tshes pa, tithi) in the month calculated as the 3rd month. If the month were intercalary, the month number would have a negative value. The month name is given in Tibetan - here it is "nag pa", Caitra in Sanskrit. On the next line of the screen is data for the Moon's node, Rahu, calculated for the 15th and 30th of the month - the new and full Moon days, when eclipses can occur. The "ril-cha" is the lunar anomaly: Rahu month: 101, gdong, 15th: 15;5,5,1,7 - 30th: 15;1,33,5,11 ril cha = 22;47 In the next main block of six lines of data, the figures "gza-bar" (mean weekday) and "gza-dag" (true weekday) give data for the time of the end of the first lunar day in weekdays, nadi (chu tshod), pala (chu srang), breaths (dbugs) and fractional units. When a lunar day is omitted from the calendar there will be a "gza-dag" on one day such as 5;0,22,5,3 (very early in the morning) and on the next day figures such as 5;55,41,5,7 (very late, just before mean daybreak). Notice that the weekday value has not changed, and on the lower lines these will both register as the same day in the western calendar. If a lunar day is duplicated, there will be "gza-dag" figures such as 6;58,38,5,11 (late, just before daybreak) and 1;2,44,4,0 (very early in the morning) on the following day. The weekday figure has increased by two (it is calculated modulo 7), and the western date will also advance by two. The gza-bar is: 5; 32, 23, 2, 136 The (grub) nyi-bar is: 26; 7, 18, 2, 10, 0 - 348.290216 The (byed) nyi-bar is: 26; 38, 34, 1, 7, 0 - 355.237987 The gza-dag is: 5; 22, 21, 0, 108 The (grub) nyi-dag is: 26; 17, 54, 5, 42, 0 - 350.647918 The (byed) nyi-dag is: 26; 49, 24, 4, 5, 0 - 357.647151 The lines for "nyi-bar" (mean Sun) and "nyi-dag" (true Sun) give the mean and true longitudes of the Sun, calculated for the end of the lunar day. The decimal figures at the ends of these lines give these solar longitude values calculated in terms of degrees. One addition here for the Tsurphu calendar is that the Solar longitudes are given twice - when "grub" is given in brackets that figure is for the siddhanta calculation and when "byed" is given this is for the karana calculation. Both are given for comparison purposes. The next line has the longitude of the Moon, calculated both at the end of the lunar day and at the start of the solar day, at daybreak. Next comes the general day factors - these are fractional units used to calculate data for the very end of the solar day. This is important in most traditions (not Tsurphu) for calculating planetary data. Moon, Lunar day: 0;11,54,5,42,0 - Daybreak: 26;49,33,4,1,0. General day factors: 55, 340 The next block contains planetary data for the five planets, in the format: Mars sgos zhag = 663: 26;34,51,3,159 - myur: 26;36,20,4,7 The planets are calculated using a count of solar days in their mean cycle from the beginning of the zodiac. The "sgos zhag" (particular or specific day) is this count of days. The next figures are the mean (heliocentric) longitude of the planet, and then the last figures (myur) are the apparent (geocentric) longitudes. Below the planetary data we have the following: SPYI ZHAG = 58796. Julian day = 2456394. Western date = Thu, 11/4/2013 This gives the Julian date starting at noon GMT for the solar day in question, followed by the western date, in dd/mm/yyyy format. The "spyi zhag" (general day) is the number of solar days since the epoch. (This information is crucial to the planetary calculations, and is also used to determine the western date.) The bottom line gives the following information: Julian tithi time, mean: 2456393.995379, true: 2456393.828063 The time for the lunar day (tithi) is the time for the very end of that lunar day in Julian days of Universal Time. So, as this example is for the second lunar day, the times given are for the end of that lunar day, the first value being for the mean lunar day, and the second the true lunar day. These values are important because this is the main timescale of the set of calculations for the whole calendar. The true lunar day is the one used in the calendar. To calculate these data a longitude of 91 degrees (that of Lhasa) has been assumed. The next selection on the main menu, "4. Run search test." runs a routine to search for particular values occuring in a calendar. This requires setting the search criteria in the source code - no generic search routine has been developed, and would probably not be worth the effort. The next selection, "F5. Calculate New Years." calculates a set of new year dates for a range of years, and stores the results in a text file (years.dat) on disk. As with the main calendar routine, you need to enter a start and finish year. The final selection (F9) of the main menu exits the program. The software is split into several main modules: T1.C - the main calendar and new year routines T2.C - the data for the different epochs and the main subroutines for the calendar T2A.C - routines for "byed rtsis", karana calculations for the Sun T3.C - the routines for planetary calculations T4.C - the routines to print whole year calendars to disk T4A.C - routines for calendar symbolic information T4B.C - routine for the earth-lords (sa bdag) T5.C - the routines to print calendars to disk for publication BCD.C - binary coded decimal routines for very large integer arithmetic TESTS.C - search routines for finding particular calendar characteristics. Requires programming ability to use these functions. UTILS.C - various utility routines The source code contains a reasonable number of comments. In particular, comments labelled "KTC" give page number references to particular algorithms in the book "Kalacakra and the Tibetan Calendar". Contents of the calendar files First, of the two calendar files that the software can produce, the more simple one, such as tsa_2013.txt (which is taken here as an example) has the following structure: Each file starts with a header describing the year in terms of the element and animal from Chinese symbolism: New Year: 2013, Water-female-Snake Each month has a header: Tibetan Lunar Month: 1 - Wood-male-Tiger Month: 1989;39 Anomaly: 18;45 Mean Weekday: 1;29,39,2,574 Mean Sun: 22;12,15,2,4 The first line describes the month, also with the element and animal from Chinese symbolism. The next four lines give data that are calculated for the mean new Moon at the beginning of the month, and are usually given in Tibetan almanacs. The first is the month count from the epoch together with the intercalation index. Next is the value for the (lunar) anomaly. The third figures are the value of the mean weekday at the new Moon - effectively the time of the mean new Moon. The fourth line is mean longitude of the Sun at mean new Moon. Apart from omitted lunar dates, each lunar date has the following four, five or six lines: 1: Mon. Shatabhishaj/mon gru. Water-Earth; 11 Feb 2013 Parigha/yongs 'joms, Vava/gdab pa, Tiger, li 1 2;11,24 23;4,36 22;22,1 18;26,38 9;28,13 Solar: Earth-Monkey. Bi From 1st to 15th, Demonstration of Miracles. zin phung 1: Mon. Shatabhishaj/mon gru. Water-Earth; 11 Feb 2013 The first line gives: the lunar date, the weekday, the lunar mansion at daybreak in Sanskrit/Tibetan, the element combination of the weekday and lunar mansion, and, the date in the Gregorian calendar. Parigha/yongs 'joms, Vava/gdab pa, Tiger, li 1 The second line gives: the yoga in Sanskrit/Tibetan, the karana in Sanskrit/Tibetan (those are two of the five components of the calendar), animal, trigram and number associated with the lunar date. 2;11,24 23;4,36 22;22,1 18;26,38 9;28,13 The third line gives: the time of the end of the lunar day, lunar longitude at daybreak, the solar longitude and the "longitude" of the yoga. Solar: Earth-Monkey. Bi The fourth line gives Chinese symbolic data associated with the solar day: the element and cyclic animal, and, the lunar mansion. These first four lines are always present. From 1st to 15th, Demonstration of Miracles. The fifth and sixth lines give information regarding any festivals or otherwise special days; also given are the movements of some earth-lords. This information was requested by several users of the Tsurphu calendar. Those currently included are: "yan kwong", "klu bzlog", "klu thebs", "zin phung" and "nyi nag". Extensive earth-lord information is given in the calendar file intended for publication, such as ts2_2013.txt. Finally, on the 15th and 30th dates (full and new Moon), the following information is given regarding the planets: Mars, slow: 24;31,36,2,38 - fast: 24;2,17,3,34 North 10;20,30 Jupiter, slow: 4;38,14,1,275 - fast: 3;47,15,4,240 West 1;20,30 Saturn, slow: 14;3,24,1,4985 - fast: 14;28,26,5,4351 South 6;12,59 Mercury, slow: 5;14,21,0,1098 - fast: 24;33,41,5,7550 South 10;27,29 Venus, slow: 20;46,32,3,105 - fast: 22;19,15,4,115 North 9;27,36 Rahu, head: 15;19,10,2,14 For each planet is given the slow and fast motion longitudes. The slow motion is effectively the planet's heliocentric longitude and the fast motion geocentric. At the end of each line is given the tradition direction of the planet - this comes from the epicycle calculation - and the geocentric longitude in terms of sign of the zodiac, degrees and minutes. On the last line is the longitude of the head of Rahu, the ascending node of the Moon's orbit, important in eclipse predictions. Extensive daily data The second file, ts2_2013.txt, has basically the same structure, but includes more extensive information for each date. 17 items are listed for each day; these are labelled 'a' to 'q' (the first four labels are not printed, as all four items are on the first line): 1: dga' a, zla. mon gru. e) chu-sa f) bdud rtsi g) stag gi 1 nas khrums stod. chu-me, gtun shing h) i) yongs 'joms j) 'du byed k) l) stag li 1 m) khra drag shar du 'tshog nor rdzas mi dbyung dbul nyi n) mgron o) sa-spre'u p) bi'i No: 2;11,24 23;4,36 22;22,1 18;26,38 9;28,13 11.02.2013 a) The lunar date. b) One of five pairs of characteristics associated with the lunar day from the Svarodaya (dbyangs 'char) symbolic system. The first word is one of the five: joy, excellence, victory, emptiness and perfection (dga' bzang rgyal stong rdzogs); these are called the Svarodaya emblems (mtshan ma). This is followed by a vowel (svarodaya means "arising of vowels"). c) The weekday. d) The lunar mansion. e) The element combination ('byung 'phrod) of the weekday and lunar mansion. f) One of 27 "great conjunctions" ('phrod chen) that are derived from the weekday and lunar mansion. g) If the lunar mansion changes during the day, this item lists the time of that change, the new element combination and the new great conjunction. The time of lunar mansion change is given in terms of the nadi (chu tshod) in the double-hour at which the change occurs. There are five nadi in each double-hour; the double-hour is identified by its cyclic animal. h) If relevant, this item lists other yogas and daily characteristics (thun mong dang thun min gyi 'phrod) that arise from the combination of weekday and lunar mansion. i) The yoga (sbyor ba), one of the five components (yan lag lnga) of the calendar. j) The link - one of the 12 links of dependent origination (rten 'brel). k) Vishti, one of the 11 karanas, described briefly in the Kalacakra Tantra and refered to by Banda Gelek as "the Rahu that arises through the lunar days". l) The cyclic animal, trigram and number associated with the lunar day. m) Details of any earth-lord (sa bdag) movements. n) One of ten "sky door" (gnam sgo) of the lunar day. o) Element and cyclic animal associated with the solar day. p) Chinese lunar mansion associated with the solar day. q) If relevant, the earth-lord "ba dan". Finally, there are two further lines. The first of these gives: the time of the end of the lunar day, lunar longitude at daybreak, the solar longitude, the "longitude" of the yoga, and, the solar longitude in terms of signs, degrees and minutes. The final line gives the Gregorian date. E Henning.