suncalc
Sections
NAME
suncalc - Sunrise, sunset calculator
SYNOPSIS
suncalc [parameters...] location date
PARAMETERS
Command Line | Resource | Default | Description |
---|---|---|---|
-h | help | No | Lists basic help information. |
-df=filename | default | wxp.cfg | Sets the name of the resource file. |
-na=name | name | the program name | Specifies the name used in resource file parsing. |
-me=level | message | out2 | Specifies level of messages to be displayed |
-fp=path | file_path | the current directory | Specifies location of database files. |
-cf=filename | city_file | program specific | Specifies the name of the city database file |
-pa=param[,param...] | parameter | none | Specifies addition parameters to program. |
locate | none | Specifies the location. This is either a 4 letter station identifier or a latitude and longitude "lat,lon[,tz]". | |
date | none | The date is either: |
DESCRIPTION
This program does general sunrise and sunset computations. The input to the program is two parameters:
- location -- This is specified with either the latitude and longitude of the site or a station identifier which is looked up in the sao.cty city database file for location. Remember that latitude is positive north and longitude is positive east. If the time zone offset is not specified, the time zone is computed from the longitude but this often does not give the true time zone. The zone parameter is an hour offset from GMT. For example, EST is "-5".
- date -- This is specified either with the exact date or with the current date which can be cyear, cmonth, or cday. An optional minute increment can be specified "+nn".
The "DST" environment variable can be set to toggle the zone computation into daylight time.
setenv DST yes
The program output varies on the input to the program.
- year only -- This specifies to give sunrise, sunset
information for an entire year.
Lat: 39.30 Lon: -94.72 Zone: -6.0 Year: 2013 Day Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec 1 0739-1707 0726-1740 0651-1812 0603-1843 0520-1912 0454-1940 0456-1949 0519-1931 0548-1849 0615-1801 0647-1717 0720-1656 2 0739-1708 0725-1741 0650-1813 0601-1844 0519-1913 0454-1940 0457-1949 0520-1930 0549-1848 0616-1759 0648-1716 0721-1656 3 0739-1708 0724-1742 0648-1814 0600-1845 0518-1914 0453-1941 0457-1949 0521-1928 0549-1846 0617-1758 0649-1715 0722-1656 4 0739-1709 0723-1743 0647-1815 0558-1846 0516-1915 0453-1942 0458-1949 0522-1927 0550-1844 0618-1756 0650-1714 0723-1656 5 0739-1710 0722-1745 0645-1816 0557-1847 0515-1916 0453-1942 0458-1949 0523-1926 0551-1843 0619-1755 0652-1713 0724-1656 ... 27 0730-1734 0654-1809 0611-1838 0525-1909 0456-1936 0454-1950 0515-1936 0543-1857 0611-1807 0642-1723 0716-1657 0738-1703 28 0729-1735 0653-1811 0609-1839 0524-1910 0456-1937 0455-1950 0516-1935 0544-1855 0612-1806 0643-1722 0717-1657 0738-1703 29 0728-1736 0608-1840 0522-1911 0455-1938 0455-1950 0517-1934 0545-1854 0613-1804 0644-1721 0718-1657 0738-1704 30 0727-1738 0606-1841 0521-1912 0455-1938 0456-1949 0517-1933 0546-1852 0614-1803 0645-1720 0719-1656 0738-1705 31 0727-1739 0604-1842 0455-1939 0518-1932 0547-1851 0646-1718 0739-1706
- year and month only -- This specifies to give more
detailed information on sunrise, sunset, twilight and solar noon for
each day during the month.
Lat: 39.30 Lon: -94.72 Zone: -6.0 Year: 2013 Month: 11 Day Dawn | Sunrise Sunset | Dusk = Noon DayLen Twilight 1 : 06:19:16 | 06:47:07 17:17:21 | 17:45:10 = 12:02:14 10:30:14 00:27:50 2 : 06:20:20 | 06:48:13 17:16:13 | 17:44:06 = 12:02:13 10:28:00 00:27:54 3 : 06:21:23 | 06:49:20 17:15:07 | 17:43:04 = 12:02:14 10:25:47 00:27:58 4 : 06:22:26 | 06:50:27 17:14:03 | 17:42:03 = 12:02:15 10:23:35 00:28:01 5 : 06:23:30 | 06:51:34 17:13:00 | 17:41:04 = 12:02:17 10:21:25 00:28:05 ... 27 : 06:46:21 | 07:15:49 16:57:13 | 17:26:41 = 12:06:31 09:41:23 00:29:28 28 : 06:47:20 | 07:16:51 16:56:52 | 17:26:24 = 12:06:52 09:40:01 00:29:32 29 : 06:48:17 | 07:17:52 16:56:34 | 17:26:09 = 12:07:13 09:38:42 00:29:35 30 : 06:49:14 | 07:18:52 16:56:19 | 17:25:57 = 12:07:35 09:37:26 00:29:38
- year, month and day -- This specifies to give sunrise,
sunset, extended twilight information for that day
Lat: 39.30 Lon: -94.72 Zone: -6.0 Year: 2013 Month: 11 Day: 26 Ast Dawn: 05:40:12 Nau Dawn: 06:12:21 Dawn: 06:45:22 Sunrise: 07:14:47 Sunset: 16:57:35 Dusk: 17:27:00 Nau Dusk: 18:00:00 Ast Dusk: 18:32:09 ------------------- Sol Noon: 12:06:11 Daylength: 09:42:48 Twilight: 00:29:25
- year, month, day and minute increment -- This specifies to
give detailed solar location information including elevation, azimuth,
zenith angle and declination. The minute increment sets the difference
between each computation which is 10 minutes in the sample output.
Lat: 39.30 Lon: -94.72 Zone: -6.0 Year: 2013 Month: 11 Day: 26 Time UTC Elev Elev(R) Azimuth Zenith Declin RtAscen 00:00 06:00 -71.63 355.43 161.63 -20.97 242.16 00:10 06:10 -71.66 2.84 161.66 -20.97 242.16 00:20 06:20 -71.44 10.19 161.44 -20.97 242.17 00:30 06:30 -70.98 17.30 160.98 -20.97 242.18 00:40 06:40 -70.30 24.03 160.30 -20.98 242.19 00:50 06:50 -69.42 30.31 159.42 -20.98 242.19 ... 05:30 11:30 -19.93 101.31 109.93 -21.01 242.40 05:40 11:40 -18.04 102.76 108.04 -21.02 242.41 ---- AST DAWN ---------------------------------------------------- 05:50 11:50 -16.16 104.20 106.16 -21.02 242.41 06:00 12:00 -14.29 105.65 104.29 -21.02 242.42 06:10 12:10 -12.44 107.11 102.44 -21.02 242.43 ---- NAU DAWN ---------------------------------------------------- 06:20 12:20 -10.59 108.57 100.59 -21.02 242.44 06:30 12:30 -8.77 110.05 98.77 -21.02 242.44 06:40 12:40 -6.96 111.53 96.96 -21.02 242.45 ------ DAWN ------------------------------------------------------ 06:50 12:50 -5.17 113.04 95.17 -21.02 242.46 07:00 13:00 -3.40 114.57 93.40 -21.03 242.47 07:10 13:10 -1.66 116.11 91.66 -21.03 242.47 ----- SUNRISE ---------------------------------------------------- 07:20 13:20 0.07 0.54 117.69 89.93 -21.03 242.48 07:30 13:30 1.77 2.07 119.28 88.23 -21.03 242.49 07:40 13:40 3.44 3.65 120.91 86.56 -21.03 242.50 ... 16:30 22:30 3.83 4.02 238.60 86.17 -21.10 242.89 16:40 22:40 2.16 2.44 240.24 87.84 -21.10 242.90 16:50 22:50 0.47 0.89 241.84 89.53 -21.10 242.90 ----- SUNSET ----------------------------------------------------- 17:00 23:00 -1.25 243.42 91.25 -21.10 242.91 17:10 23:10 -2.99 244.97 92.99 -21.10 242.92 17:20 23:20 -4.75 246.49 94.75 -21.11 242.93 ------ DUSK ------------------------------------------------------ 17:30 23:30 -6.54 248.00 96.54 -21.11 242.93 17:40 23:40 -8.34 249.49 98.34 -21.11 242.94 17:50 23:50 -10.16 250.97 100.16 -21.11 242.95 ---- NAU DUSK ---------------------------------------------------- 18:00 00:00 -12.00 252.43 102.00 -21.11 242.96 18:10 00:10 -13.85 253.89 103.85 -21.11 242.96 18:20 00:20 -15.72 255.33 105.72 -21.11 242.97 18:30 00:30 -17.60 256.77 107.60 -21.11 242.98 ---- AST DUSK ---------------------------------------------------- 18:40 00:40 -19.49 258.22 109.49 -21.12 242.99 18:50 00:50 -21.38 259.66 111.38 -21.12 242.99 19:00 01:00 -23.29 261.11 113.29 -21.12 243.00 ... 23:00 05:00 -66.94 317.07 156.94 -21.15 243.18 23:10 05:10 -68.20 322.23 158.20 -21.15 243.19 23:20 05:20 -69.31 327.89 159.31 -21.15 243.19 23:30 05:30 -70.25 334.06 160.25 -21.15 243.20 23:40 05:40 -70.99 340.72 160.99 -21.15 243.21 23:50 05:50 -71.52 347.79 161.52 -21.15 243.21
The output has the following data:
- sunrise - the time at which the first part of the sun appears above the horizon in the morning.
- sunset - the time at this the last part of the sun disappears below the horizon in the evening.
- dawn or civil dawn - this is the time at which the sun is 6 degrees below the horizon in the morning. Civil dawn is defined as that time at which there is enough light for objects to be distinguishable and that outdoor activities can commence.
- nautical dawn - this is the time at which the sun is 12 degrees below the horizon in the morning. Nautical dawn is defined as that time at which there is just enough sunlight for objects to be distiguishable.
- astronomical dawn - this is the time at which the sun is 18 degrees below the horizon in the morning. Astronomical dawn is that point in time at which the sun starts lightening the sky. Prior to this time, the sky is completely dark
- dusk or civil dusk - this is the time at which the sun is 6 degrees below the horizon in the evening. At this time objects are distinguishable but there is no longer enough light to perform any outdoor activities.
- nautical dusk - this is the time at which the sun is 12 degrees below the horizon in the evening. At this time, objects are no longer distinguishable.
- astronomical dusk - this is the time at which the sun is 18 degrees below the horizon in the evening. At this time the sun no longer illuminates the sky.
- solar noon - this is the time at which the sun is the highest in the sky. This time varies through the year due to the change in speed of the earth's orbit around the sun.
- daylength - the total time the sun is above the horizon
- twilight - the average time of civil twilight which is the time between civil dawn and sunrise and sunset and civil dusk.
- elevation - the angle that the sun is above the horizon (assuming no atmosphere)
- elevation (r) - the angle that the sun appears to be above the horizon assuming the refraction of the earth's atmosphere.
- azimuth - the direction that the sun appears to be over with 0 degrees being north, 90 being east, 180 being south and 270 being west.
- zenith angle - the angle between the sun and directly overhead, the zenith
- declination - the latitude that the sun is directly over which is ~23N in the summer, ~23S in the winter and 0 at the equinoxes.
- right ascension - the celestial longitude of the sun. This value is 0 at the vernal equinox, 90 at the summer solstice, 180 at the autumnal equinox and 270 at the winter solstice.
EXAMPLES
suncalc 40.3,-86.4,-4 cmonth
This lists the sunrise/set data for the location 40.3N, 86.4W. This is using a time zone offset of -4 hours. So this is for summer where the GMT offset is only 4 hours.suncalc 40.3,-86.4,-4 2012/06/24+10
This list the sunrise/set data for the same location but for June 24, 2012. The output will be solar data every 10 minutes for that day.
FILES
- sao.cty - used to cross reference station identifiers with location
SEE ALSO
Last updated November 2013