# Radiance sun position formula, solar position algorithm

Hello,
I see that Radiance is using a short formula for solar position in sun.c.
I checked the results provided by gensky for various locations and times
to the solar calculator provided by NOAA at
I understand that most Radiance applications do not require an extremely
accurate position that more detailed formulas provide, but the difference I
find is many degrees (27 degrees for altitude at Cape Town) so I want to
confirm that this is working as expected.

******** Minneapolis
C:\Users\Jeff>gensky 01 29 15 +s -a 44.97 -o -93.25 -m -90
# gensky 01 29 15 +s -a 44.97 -o -93.25 -m -90
# Local solar time: 15.00
# Solar altitude and azimuth: 14.7 44.0
# Ground ambient level: 8.9

**NOAA altitude and aziumth: 18.29 28.58

******* Havana
C:\Users\Jeff>gensky 04 26 09 +s -a 23.133 -o -82.367 -m -75
# gensky 04 26 09 +s -a 23.133 -o -82.367 -m -75
# Local solar time: 9.53
# Solar altitude and azimuth: 53.5 -80.8
# Ground ambient level: 15.2

**NOAA altitude and aziumth: 40.22 -88.61

************ Cape Town
C:\Users\Jeff>gensky 08 14 13 +s -a -33.92 -o 18.37 -m 30
# gensky 08 14 13 +s -a -33.92 -o 18.37 -m 30
# Local solar time: 13.69
# Solar altitude and azimuth: 35.9 149.2
# Ground ambient level: 13.8

**NOAA altitude and aziumth: 41.882 177.13

************* Tokyo
C:\Users\Jeff>gensky 11 08 08 +s -a 35.7 -o 139.77 -m 135
# gensky 11 08 08 +s -a 35.7 -o 139.77 -m 135
# Local solar time: 7.95
# Solar altitude and azimuth: 12.2 -58.6
# Ground ambient level: 8.1

**NOAA altitude and aziumth: 18.84 -52.06

I also see that the Radiance code mentions Julian date but without a Julian
date formula - the input seems to be the Gregorian day and month. If I add
a Julian date conversion, the difference between the algorithms is even
greater.

Jeff Niemasz

Hi Jeff,

Part of the discrepancy you're seeing is from using negative values for the longitude and meridian settings in Gensky which wants positive values for western longitudes.
Repeating your gensky command using positive values:
gensky 01 29 15 +s -a 44.97 -o 93.25 -m 90

I get:
Solar altitude and azimuth: 17.8 38.4

Also I think you may have written down the NOAA azimuth result incorrectly for Minneapolis. Rather than 28.58 I think it should read 218.58 (which is around what I got at the same site). When you subtract 180 degrees from 218.58 you get 38.58.

Chris

Christian Humann ~ Associate
LOISOS + UBBELOHDE
- - - - - - - - - - - - - - - - - - - - - - - - - - -
1917 Clement Avenue Building 10A
Alameda, CA 94501 USA
- - - - - - - - - - - - - - - - - - - - - - - - - - -
510 521 3800 VOICE
510 521 3820 FAX
- - - - - - - - - - - - - - - - - - - - - - - - - - -

···

On Jan 30, 2013, at 2:08 PM, jeffn wrote:

Hello,
I see that Radiance is using a short formula for solar position in sun.c. I checked the results provided by gensky for various locations and times to the solar calculator provided by NOAA at http://www.esrl.noaa.gov/gmd/grad/solcalc/.
I understand that most Radiance applications do not require an extremely accurate position that more detailed formulas provide, but the difference I find is many degrees (27 degrees for altitude at Cape Town) so I want to confirm that this is working as expected.

******** Minneapolis
C:\Users\Jeff>gensky 01 29 15 +s -a 44.97 -o -93.25 -m -90
# gensky 01 29 15 +s -a 44.97 -o -93.25 -m -90
# Local solar time: 15.00
# Solar altitude and azimuth: 14.7 44.0
# Ground ambient level: 8.9

**NOAA altitude and aziumth: 18.29 28.58

******* Havana
C:\Users\Jeff>gensky 04 26 09 +s -a 23.133 -o -82.367 -m -75
# gensky 04 26 09 +s -a 23.133 -o -82.367 -m -75
# Local solar time: 9.53
# Solar altitude and azimuth: 53.5 -80.8
# Ground ambient level: 15.2

**NOAA altitude and aziumth: 40.22 -88.61

************ Cape Town
C:\Users\Jeff>gensky 08 14 13 +s -a -33.92 -o 18.37 -m 30
# gensky 08 14 13 +s -a -33.92 -o 18.37 -m 30
# Local solar time: 13.69
# Solar altitude and azimuth: 35.9 149.2
# Ground ambient level: 13.8

**NOAA altitude and aziumth: 41.882 177.13

************* Tokyo
C:\Users\Jeff>gensky 11 08 08 +s -a 35.7 -o 139.77 -m 135
# gensky 11 08 08 +s -a 35.7 -o 139.77 -m 135
# Local solar time: 7.95
# Solar altitude and azimuth: 12.2 -58.6
# Ground ambient level: 8.1

**NOAA altitude and aziumth: 18.84 -52.06

I also see that the Radiance code mentions Julian date but without a Julian date formula - the input seems to be the Gregorian day and month. If I add a Julian date conversion, the difference between the algorithms is even greater.

Jeff Niemasz _______________________________________________

Hi Jeff,

The NOAA calculator takes degrees east longitude, whereas gensky expects degrees WEST longitude. (Same for the standard meridian.)

Try it; you'll find much better agreement. (I get within half a degree for Cape Town using your parameters.)

It's confusing all the different standards, isn't it?

Cheers,
-Greg

···

From: jeffn <jeffn6782@gmail.com>
Date: January 30, 2013 2:08:53 PM PST

Hello,
I see that Radiance is using a short formula for solar position in sun.c. I checked the results provided by gensky for various locations and times to the solar calculator provided by NOAA at http://www.esrl.noaa.gov/gmd/grad/solcalc/.
I understand that most Radiance applications do not require an extremely accurate position that more detailed formulas provide, but the difference I find is many degrees (27 degrees for altitude at Cape Town) so I want to confirm that this is working as expected.

******** Minneapolis
C:\Users\Jeff>gensky 01 29 15 +s -a 44.97 -o -93.25 -m -90
# gensky 01 29 15 +s -a 44.97 -o -93.25 -m -90
# Local solar time: 15.00
# Solar altitude and azimuth: 14.7 44.0
# Ground ambient level: 8.9

**NOAA altitude and aziumth: 18.29 28.58

******* Havana
C:\Users\Jeff>gensky 04 26 09 +s -a 23.133 -o -82.367 -m -75
# gensky 04 26 09 +s -a 23.133 -o -82.367 -m -75
# Local solar time: 9.53
# Solar altitude and azimuth: 53.5 -80.8
# Ground ambient level: 15.2

**NOAA altitude and aziumth: 40.22 -88.61

************ Cape Town
C:\Users\Jeff>gensky 08 14 13 +s -a -33.92 -o 18.37 -m 30
# gensky 08 14 13 +s -a -33.92 -o 18.37 -m 30
# Local solar time: 13.69
# Solar altitude and azimuth: 35.9 149.2
# Ground ambient level: 13.8

**NOAA altitude and aziumth: 41.882 177.13

************* Tokyo
C:\Users\Jeff>gensky 11 08 08 +s -a 35.7 -o 139.77 -m 135
# gensky 11 08 08 +s -a 35.7 -o 139.77 -m 135
# Local solar time: 7.95
# Solar altitude and azimuth: 12.2 -58.6
# Ground ambient level: 8.1

**NOAA altitude and aziumth: 18.84 -52.06

I also see that the Radiance code mentions Julian date but without a Julian date formula - the input seems to be the Gregorian day and month. If I add a Julian date conversion, the difference between the algorithms is even greater.

Jeff Niemasz

Yes, everything is within 1 degree agreement with the corrected
longitude/meridian input.
Thanks,
Jeff