# Hong Kong daylight and sky

Source: Hong Kong Observatory open data, accessed 2026-11-09.

- [Sunrise, sun transit and sunset dataset](https://data.gov.hk/en-data/dataset/hk-hko-rss-times-of-sunrise-suntransit-sunset). The selected year's JSON is requested directly from `https://data.weather.gov.hk/weatherAPI/opendata/opendata.php?dataType=SRS&year=2026&rformat=json` (with the selected year). Its daily transit anchors the solar path; its sunrise/sunset times are displayed for the selected date.
- [Current weather report](https://data.weather.gov.hk/weatherAPI/opendata/weather.php?dataType=rhrread&lang=en). The HKO condition code drives an artistic cloud/haze interpretation while following the current Hong Kong clock. The condition's issue time is shown. These are visual settings, not measured cloud fractions, visibility or a local forecast.
- [HKO weather condition codes](https://www.hko.gov.hk/textonly/v2/explain/wxicon_e.htm).
- [HKO API documentation](https://data.weather.gov.hk/weatherAPI/doc/HKO_Open_Data_API_Documentation.pdf).
- [HKO data use and disclaimer](https://www.hko.gov.hk/en/abouthko/disclaimer.htm).

Solar geometry is calculated for 22.283°N, 114.174°E using the Meeus equations documented by [NOAA](https://gml.noaa.gov/grad/solcalc/calcdetails.html). Elevation is geometric; the scene's atmosphere renders the illumination. North is -Z and east is +X, matching the coastline. This is an illustrative ocean scene, not an observational instrument.

All controls use Hong Kong standard time (UTC+8), independent of the visitor's timezone. The day slider covers the current Hong Kong calendar year, including February 29 in leap years. Moving either slider pauses live time and uses illustrative clouds; it does not present current weather as historical or future weather. **Now** returns to the current Hong Kong date, time and weather. Camera presets preserve the selected date and time.

The top strip offers Sunrise, Day (solar transit), and Sunset for the selected date. It uses published HKO times when available, or calculated apparent-horizon crossings when offline. Changing the date keeps the chosen preset; moving the time slider clears it. The adjacent **Now …°C** reading always means the current Hong Kong Observatory temperature, including while the scene explores a different time. Temperature reports older than two hours are shown as unavailable.

The clock refreshes every 30 seconds and on returning to the tab. Weather is checked every ten minutes. Reports older than three hours, or conditions issued more than 24 hours ago, fall back to illustrative clouds with an unavailable label. If daylight data is unavailable, the calculated solar path still works and the panel identifies the fallback. No API key or visitor location is required.

## Night visibility

An approximate lunar ephemeris follows the selected Hong Kong date and time, using SunCalc 1.9.0 equations with topocentric parallax. The Moon's illuminated fraction, height and the scene cloud coverage modulate cool moonlight. A phase-shaded moon disc appears above the horizon; its light is shared by terrain, water and reflections. The calculation is illustrative and can differ by several degrees from the actual Moon. It is not HKO lunar-position data. SunCalc's BSD-2-Clause terms are distributed in THIRD_PARTY_NOTICES.md.

A faint blue night-sky floor also illuminates land and water on moonless or overcast nights. This is an artistic visibility aid, not a measured brightness or a simulation of Hong Kong light pollution. The panel identifies the moon fraction and whether it is above the horizon.

The expanded live panel also shows the HKO Observatory temperature and the maximum reported past-hour rainfall across the island's four districts. Rainfall is a past-hour district ceiling, not an instantaneous rain rate. Missing, stale or maintenance readings remain unavailable. These expanded-panel readings are hidden while exploring other dates; the top strip retains the clearly labelled current temperature.

## Wind trails

Source: [Hong Kong Observatory latest ten-minute wind information](https://data.gov.hk/en-data/dataset/hk-hko-rss-latest-ten-minute-wind-info), checked 2026-11-10. The [CSV schema](https://data.weather.gov.hk/weatherAPI/hko_data/regional-weather/HKO_open_data_10min_wind_Documentation.pdf) supplies observation time in Hong Kong time, station, mean direction, mean speed and maximum gust in km/h. These observations are provisional. The [wind direction convention](https://www.hko.gov.hk/en/education/weather/wind-and-pressure/00111-the-origin-of-wind.html) describes where wind comes from; a north wind therefore moves the trails south across the map.

Central Pier is preferred, with North Point and Green Island as named harbour fallbacks. The panel says **Wind now**, including while the sun explores another time or date. It identifies the station, mean direction and speed; its tooltip gives the observation time. Reports older than 40 minutes, missing directions, calm or variable winds produce no directional trails. Failed refreshes may retain the last observation only while it remains fresh. Reduced-motion preferences disable the trails.

The thin white curves are illustrations of that station's direction and relative mean speed, drawn at four times map-scale travel speed for visibility. Their curves, clearance above land and placement are artistic. They are not a city-wide airflow measurement or building-level turbulence simulation. The ocean's existing wave controls remain independent.

The CSV has no browser CORS header, so a fixed same-origin relay at `/api/lab/ultra-water/wind.csv` requests only the public HKO feed. The client refreshes every ten minutes; the relay permits five-minute shared caching. No API key or visitor location is used.
