Sunrise
✖
Sunrise

Details and Options




- Sunrise, also known as sunup, is defined as the instant of time when the upper rim of the Sun's disk appears to make contact with the horizon as it is rising.
- The observation location can be any point on the surface of a body in the solar system, defining the local horizon.
- Locations can be specified as Entity objects, assuming they represent objects with geographic coordinates, or they can be latitude/longitude pairs, assuming degrees as units.
- Sunrise[] makes use of $GeoLocation and $TimeZone to determine your location and time zone.
- datespec can be a DateObject expression, a TimeObject expression, a date string or a {y,m,d,h,m,s} date list.
- datespec is assumed to be in $TimeZone, unless it is a DateObject or TimeObject expression with an explicit TimeZone option value.
- locationspec and datespec can be either individual items or lists of them.
- If datespec is a list of dates, then the results will contain EventSeries objects.
- datespec can be specified as {start,end,increment} for compatibility with DateRange specifications.
- Sunrise[…,func] is used to specify the format of output when extended locations are specified.
- Possible settings for func include:
-
Automatic returns intervals for extended locations only Interval returns intervals for all specified locations Mean returns mean value for extended locations Min returns minimum values for extended locations Max returns maximum values for extended locations StandardDeviation returns standard deviation for extended locations - Sunrise[TimeZone->z] gives the date of the next sunrise with date and time inferred for time zone z by assuming that your computer is set for the time zone specified by $TimeZone.
- Sunrise[TimeDirection->-1] gives the date of the last sunrise.
- Sunrise can accept the following options:
-
ReferenceAltitude Automatic altitude value defining the instant of rise/set TimeDirection 1 whether to return the next or last Sunrise TimeZone $TimeZone time zone to be used for dates - Possible settings for TimeDirection include:
-
1 returns the next sunrise from the specified date -1 returns the last sunrise from the specified date - Possible values of the ReferenceAltitude option include:
-
Automatic upper limb of the Sun crosses zero altitude alt center of the Sun crosses numeric altitude alt {alt,limb} the given limb of the Sun crosses numeric altitude alt - The reference altitude angle alt can be given as a Quantity angle or as a numeric expression interpreted in angular degrees. These are the traditional values of reference altitude:
-
"Civil" the center of the Sun has altitude –6 degrees "Nautical" the center of the Sun has altitude –12 degrees "Astronomical" the center of the Sun has altitude –18 degrees - Possible values for the limb of the Sun include:
-
"UpperLimb" upper limb of the Sun "Center" central point of the Sun "LowerLimb" lower limb of the Sun limb numeric value between –1 (lower limb) and 1 (upper limb) - Calculations are based on atmospheric refraction models that cannot be accurately predicted. This, combined with local topography deviations, can result in errors on the order of several minutes from actual observed times.

Examples
open allclose allBasic Examples (6)Summary of the most common use cases
Compute the next sunrise for your current location:

https://wolfram.com/xid/0puplvehwe-etsbfd

Compute the next sunrise after a specified date:

https://wolfram.com/xid/0puplvehwe-bv5fc0

Compute the next sunrise for a specified location:

https://wolfram.com/xid/0puplvehwe-frupmt

Compute the next sunrise for a specified latitude/longitude and date:

https://wolfram.com/xid/0puplvehwe-k5huuj

Compute the next sunrise for a specified city and date:

https://wolfram.com/xid/0puplvehwe-bild8d

Generate the time of the next sunrise:

https://wolfram.com/xid/0puplvehwe-ggnw8l

Scope (13)Survey of the scope of standard use cases
Dates (4)
Dates can be specified as a DateObject:

https://wolfram.com/xid/0puplvehwe-vhcefo

Dates can be specified as a date string:

https://wolfram.com/xid/0puplvehwe-zbahi

Dates can be specified as a TimeObject:

https://wolfram.com/xid/0puplvehwe-ewvxdv

Generate the next sunrise for a range of dates:

https://wolfram.com/xid/0puplvehwe-g0c68v

Locations (7)
Locations can be latitude/longitude pairs:

https://wolfram.com/xid/0puplvehwe-mmgexd

Locations can include elevation:

https://wolfram.com/xid/0puplvehwe-chyss5

Cities are treated as single, specific locations:

https://wolfram.com/xid/0puplvehwe-gzg19x

Results for extended locations are intervals, by default:

https://wolfram.com/xid/0puplvehwe-wqynpq

The form of the results for extended locations can be overridden:

https://wolfram.com/xid/0puplvehwe-kvgc4s

Locations can also be off Earth:

https://wolfram.com/xid/0puplvehwe-cb3zbt

Generate the next sunrise for multiple locations:

https://wolfram.com/xid/0puplvehwe-ur769m

Options (4)Common values & functionality for each option
ReferenceAltitude (2)
By default, Sunrise reports the instant when the upper limb of the Sun has altitude zero:

https://wolfram.com/xid/0puplvehwe-5fz330

Therefore, the actual center of the body is below the horizon:

https://wolfram.com/xid/0puplvehwe-o20s3w


https://wolfram.com/xid/0puplvehwe-nk6yf4

Use a specific value of altitude and choice of limb:

https://wolfram.com/xid/0puplvehwe-jc97d3


https://wolfram.com/xid/0puplvehwe-uf0anv


https://wolfram.com/xid/0puplvehwe-uhaagu

Find the next date of sunrise, by default using the horizon and the upper limb of the Sun:

https://wolfram.com/xid/0puplvehwe-jm8ox8

Use the same horizon at zero apparent altitude, but now comparing to the center of the Sun:

https://wolfram.com/xid/0puplvehwe-0re96x

Find the starting time of civil, nautical and astronomical twilight, all defined by the center of the Sun:

https://wolfram.com/xid/0puplvehwe-zyw1ji


https://wolfram.com/xid/0puplvehwe-kob4xs


https://wolfram.com/xid/0puplvehwe-qdttdk

TimeZone (1)
Applications (2)Sample problems that can be solved with this function
Next sunrise from the capital cities of South America:

https://wolfram.com/xid/0puplvehwe-h38uu

Determine your final location if you walk toward the Sun from sunrise to sunset at a constant speed:

https://wolfram.com/xid/0puplvehwe-47ugf6
Iterate the bearing in 10-minute increments to obtain a new course and destination:

https://wolfram.com/xid/0puplvehwe-hvg1om

https://wolfram.com/xid/0puplvehwe-dlf24m

Find the distance between the starting and ending points:

https://wolfram.com/xid/0puplvehwe-ikzvgm

Properties & Relations (3)Properties of the function, and connections to other functions
By default, location is specified by $GeoLocation and the date is specified by the current date:

https://wolfram.com/xid/0puplvehwe-x72irg


https://wolfram.com/xid/0puplvehwe-cx7drs

Results are in the form of an EventSeries when a range of dates is specified:

https://wolfram.com/xid/0puplvehwe-rfwbr

Calculate the next sunrise, defined as when the upper edge of the Sun's apparent disk touches the horizon:

https://wolfram.com/xid/0puplvehwe-lamzq

Find the position of the center of the Sun at that time:

https://wolfram.com/xid/0puplvehwe-jfk5zk

The altitude of the Sun corresponds to its angular radius:

https://wolfram.com/xid/0puplvehwe-kiaai5

Eliminating atmospheric refraction effects, the true position of the Sun is revealed to be even further below the horizon at sunrise:

https://wolfram.com/xid/0puplvehwe-te9ke

Possible Issues (3)Common pitfalls and unexpected behavior
Since the value of $TimeZone may change throughout the year, the results for specified dates may vary depending on when you evaluate the input:

https://wolfram.com/xid/0puplvehwe-bpk2jc


https://wolfram.com/xid/0puplvehwe-hcb3tk

If the above behavior is a concern, the TimeZone option can be used to enforce a consistent value:

https://wolfram.com/xid/0puplvehwe-gs73ey

With Sunrise[locationspec,Interval], results for specific locations are coerced into intervals:

https://wolfram.com/xid/0puplvehwe-ex0nzz

Sunrise returns values taking into account atmospheric refraction effects:

https://wolfram.com/xid/0puplvehwe-b0a825

These effects are especially large near the horizon, but the effects are turned off a few degrees below the horizon:

https://wolfram.com/xid/0puplvehwe-twz7q

Use the "TrueAltitude" method to deactivate atmospheric refraction and compare with the previous result:

https://wolfram.com/xid/0puplvehwe-ccwfjk

Neat Examples (4)Surprising or curious use cases
Plot the position of the Sun for your location between sunrise and sunset for the solstices and equinox:

https://wolfram.com/xid/0puplvehwe-btu0lb

Generate a map of Italy with the illumination set for sunrise:

https://wolfram.com/xid/0puplvehwe-gmwjxz

Generate a table of sunrises for the capital cities in Europe and display only the first and last five:

https://wolfram.com/xid/0puplvehwe-4onv67

Plot the length of daylight throughout a given year:

https://wolfram.com/xid/0puplvehwe-bbelwt

https://wolfram.com/xid/0puplvehwe-gx0luw

https://wolfram.com/xid/0puplvehwe-d9vv4a

Wolfram Research (2014), Sunrise, Wolfram Language function, https://reference.wolfram.com/language/ref/Sunrise.html (updated 2024).
Text
Wolfram Research (2014), Sunrise, Wolfram Language function, https://reference.wolfram.com/language/ref/Sunrise.html (updated 2024).
Wolfram Research (2014), Sunrise, Wolfram Language function, https://reference.wolfram.com/language/ref/Sunrise.html (updated 2024).
CMS
Wolfram Language. 2014. "Sunrise." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/Sunrise.html.
Wolfram Language. 2014. "Sunrise." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/Sunrise.html.
APA
Wolfram Language. (2014). Sunrise. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Sunrise.html
Wolfram Language. (2014). Sunrise. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Sunrise.html
BibTeX
@misc{reference.wolfram_2025_sunrise, author="Wolfram Research", title="{Sunrise}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/Sunrise.html}", note=[Accessed: 02-April-2025
]}
BibLaTeX
@online{reference.wolfram_2025_sunrise, organization={Wolfram Research}, title={Sunrise}, year={2024}, url={https://reference.wolfram.com/language/ref/Sunrise.html}, note=[Accessed: 02-April-2025
]}