Methodology, sources and limitations
Every number on this site is computed, not looked up. This page sets out how, and — more importantly — where the model is solid and where it is approximate.
Solar geometry
Solar position uses the NOAA Solar Calculator algorithm, which follows Jean Meeus, Astronomical Algorithms (2nd edition, 1998), chapters 22 and 25. It is accurate to better than 0.01° for the years 1800–2100.
This part is exact and independently checkable. Solstice declinations come out at ±23.44°, the equation of time reaches −14.2 minutes in mid-February and +16.5 minutes in early November, and noon solar elevations match 90° − |latitude − declination| to within 0.01°.
Atmosphere
Relative optical air mass follows Kasten & Young (1989), which stays valid down to the horizon where the simple 1/cos(z) approximation diverges.
UV increases with elevation because there is less atmosphere overhead. This model applies 6% per kilometre, at the conservative end of the 5–10% range reported in the literature.
Column ozone is modelled, not measured. It uses the empirical climatology of van Heuklon (1979), Estimating atmospheric ozone for solar radiation models, Solar Energy 22(1), 63–68 — a formula taking latitude, longitude and day of year, fitted to observed total ozone and in standard use in solar radiation modelling since. Day-to-day ozone variation is real and is not captured.
Two known weaknesses. First, van Heuklon predates the discovery of the Antarctic ozone hole by six years and cannot reproduce it, so an explicit austral-spring depletion is applied below 60°S; that correction is approximate and figures for the far south should be treated with suspicion. Second, its baseline column is 235 DU, roughly 8% below the 250–270 DU typically observed over the equator, which inflates modelled tropical UV by around 10%.
Ultraviolet and vitamin D
Two weighted quantities come from the same geometry: erythemal irradiance (CIE 1987 / ISO 17166), which defines the UV Index and sunburn timing, and previtamin D3 irradiance (CIE 174:2006), which drives synthesis.
The vitamin D action spectrum sits further into the UVB than the erythemal one — it peaks near 295 nm with essentially no production above 315 nm — so a long ozone slant path attenuates it more severely. That is why the two decouple as the sun gets lower, and why vitamin D synthesis shuts down in winter while sunburn remains possible in principle.
That decoupling is modelled as a smooth function of ozone slant path rather than by integrating the two action spectra. The decay constant is fitted, against the published finding that the ratio of vitamin-D-weighted to erythemally weighted UV is near-constant above UV index 5.5 and unreliable below UV index 3. The fitted value holds that ratio to within 9.6% across the high-UV band, consistent with the ±10% accuracy of the UV formula itself.
A genuine spectral integration would be better, and it is the largest accuracy improvement still available. It needs the CIE 174:2006 action spectrum table together with ozone absorption cross-sections and an extraterrestrial solar spectrum — that is a data problem, not a modelling one.
Standard definitions are used throughout: 1 UV Index unit is 25 mW/m² erythemally weighted (WHO), and 1 Standard Erythemal Dose is 100 J/m² erythemally weighted (CIE).
The clear-sky UV Index itself comes from Madronich, S. (2007), Analytic formula for the clear-sky UV index, Photochemistry and Photobiology 83(6), 1537–1538:
UVI = 12.5 · μ₀2.42 · (Ω/300)−1.23
where μ₀ is the cosine of the solar zenith angle and Ω is total column ozone in Dobson Units. Its coefficients are tuned to a detailed radiative transfer model and are accurate to 10% or better under cloud-free, unpolluted, low-albedo conditions.
How the model compares to published values
Clear-sky UV index at solar noon, mid-month:
| City | Month | This model | Published |
|---|---|---|---|
| Phoenix | June | 11.3 | 11–12 |
| London | June | 6.8 | 7–8 |
| Oslo | June | 4.8 | 5–6 |
| Sydney | January | 11.6 | 12–14 |
| Singapore | June | 14.1 | 11–14 |
Agreement is within roughly 10% at mid and high latitudes, consistent with Madronich's stated accuracy. The tropics run high for the ozone reason given above. Correcting the tropical ozone baseline is the next improvement worth making.
The vitamin D winter
Below a threshold of vitamin-D-weighted irradiance, synthesis is treated as impossible rather than merely slow. This matters: without it the arithmetic happily reports that 1000 IU is reachable in Oslo in December given 93,000 minutes of continuous noon sun, which is not a useful answer.
That threshold is calibrated, not derived. It was fitted to reproduce the vitamin D winters published for three reference cities:
| City | Latitude | Published | This model |
|---|---|---|---|
| Boston | 42.4°N | November–February | November–February |
| London | 51.5°N | October–March | October–March |
| Oslo | 59.9°N | September–April | September–April |
| Singapore | 1.4°N | none | none |
Exposure and dose
Minimal erythemal doses are assigned per Fitzpatrick skin type, within commonly cited ranges. Published values vary by roughly ±30% between studies, and individual variation within a type is larger still.
The anchor relationship is that roughly 1 SED over about a quarter of the body surface yields on the order of 1000 IU of vitamin D3 in a lightly pigmented adult — the same relationship national health bodies use to frame sun exposure guidance.
Synthesis saturates. Previtamin D3 photoisomerises to inactive products as fast as it forms beyond a certain dose, which is why exposing more skin briefly beats exposing less skin for longer, and why face and hands alone never reach 1000 IU at any duration.
What this model does not do
- Clear sky only. Cloud can more than halve surface UVB and is not modelled. Every figure here is a physical upper bound.
- No aerosols or surface albedo. Urban pollution reduces UV; snow roughly doubles the effective dose through reflection. Neither is included.
- No horizon shading. Buildings, mountains and trees are ignored, which matters most at the low sun angles where the answers are most marginal.
- The vitamin D action spectrum is approximated as a fitted function of ozone slant path rather than integrated spectrally. Still the least rigorous part of the model, though it now matches the published high-UV constraint to within 10%.
- The UV formula is used outside its validated range whenever the sun is below 30° elevation — which is the entire winter at high latitude. See the caveat above.
- Tropical UV is overestimated by roughly 10% because the ozone climatology's equatorial baseline is low.
- People differ. Age, body composition, medication, and existing vitamin D status all change the real answer, and none of them are inputs here.
Solar panel angles
The solar section uses the same solar geometry, plus a clear-sky broadband irradiance model: direct beam after Hottel (1976), diffuse after Liu & Jordan (1960), and transposition onto a tilted surface with the isotropic sky model, as set out in Duffie & Beckman, Solar Engineering of Thermal Processes.
Optimal angles are found by search rather than formula, because the popular rule of thumb — tilt equals latitude — is wrong. The true optimum is consistently lower, and increasingly so toward the poles, for two geometric reasons: summer days are far longer than winter ones, so the year's energy is weighted toward a higher sun; and a low winter sun arrives through a long atmospheric slant carrying little energy.
Off-grid sizing
The off-grid section is the one place on this site that reports absolute energy, and it does so from measured data rather than a model: PVGIS 5.3, backed by SARAH3 satellite irradiance and ERA5 reanalysis over 2005–2023, including terrain horizon shading. Fetched once and cached, so nothing is queried at page-load time.
The clear-sky model used elsewhere would have been the wrong tool. It knows nothing about cloud, aerosol or soiling, so it is fine for optimal angles and useless for kilowatt-hours — and battery sizing is entirely a kilowatt-hour question.
Battery capacity allows for inverter losses, round-trip efficiency and a usable depth of discharge — 80% for lithium iron phosphate, 50% for lead-acid. Array sizing carries a 25% margin, because a system that exactly meets demand on an average day of the worst month never recovers from a run of cloudy ones.
A useful cross-check falls out of this: PVGIS reports its own optimal tilt per location, derived from measured data, and it agrees with the clear-sky optimiser used in the solar section to within a degree or two. Two independent methods converging is meaningful evidence that the geometry is right.
Data
City coordinates, elevations, populations and timezones come from
GeoNames
(cities1000), used under CC BY 4.0. Local times account for daylight saving
via the IANA timezone database.
This is not medical advice
These are physics calculations about sunlight, not clinical recommendations. Vitamin D status depends on far more than sun exposure, and both deficiency and excess carry real risks. Talk to a doctor before changing your sun exposure or starting supplementation, and follow local skin cancer guidance on safe exposure.