Select to view content in your preferred language

# Error Running "Create Sun Positions" task in "Development Impact Analysis" Solution

547
4
07-20-2023 02:37 PM
Occasional Contributor II

Hello. I am trying to work through the Development Impact Analysis solution, specifically the shadow impact analysis tools. I have been following the helpful video "Shadow Impact Analysis Tutorial for ArcGIS Pro" on ESRI's website. However, I am stuck at step one - Create Sun Positions task. I have tried with my own data as well as using the exact data and parameters used in the video. No matter what I do or what data I try, I receive the same error below. There seems to be a problem with the underlying python script, receiving a "math domain" error. I have included an example output from the tool below and have only removed my username from file paths for security purposes. Help please.

``````Create Sun Positions
=====================
Parameters

Input Observer     aoi_proposed_development
Observer Elevation     298.3 Feet
Observer Horizon Distance     4809273.7 Feet
Time Zone     (UTC-08:00) Pacific Time (US & Canada)
Start Date     7/20/2023
Time Interval {hh:mm}     00:30
End Date
Day Interval
Temperature Unit     Celsius
Temperature in Degrees     10
Atmospheric Pressure in Millibars     1010
Minimum Sun Angle     5
Use apparent position     true
layer1
=====================
Messages

Start Time: Thursday, July 20, 2023 2:03:00 PM
Grid convergence angle is 12.18.
Calculating sun observations from -105.581°, 44.03°...
Traceback (most recent call last):
sun = SunEphemeris(obs, calc, None, apparent, atmRefraction, timeAdjustment=timeZone)
azimuth = (540 - degrees(acos(((sin(latitude_radians) * cos(zenith)) - sin(sun_declination))
ValueError: math domain error

Failed script Create Sun Positions...
Failed to execute (CreateSunSkymap).
Failed at Thursday, July 20, 2023 2:03:01 PM (Elapsed Time: 0.69 seconds)``````

Tags (3)
4 Replies
New Contributor III

Did you manage to get past this error? I'm facing the same issue.

New Contributor

Hello! I in the same situation. Have you been able to figure out a solution? I'm located in Toronto and wish to perform a Development Impact Solution there. I continue to receive the "math domain error". Thanks.

New Contributor

Hello! I'm wondering of you have found a solution to this. I am experiencing the exact same issue and error message.

New Contributor III

Hello Andrew,

I managed to get past this issue by disabling the "use apparent position"option. It turns out that there was an invalid value in the complex trigonometry formula used to calculate the solar angle, but I never managed to figure out exactly which part of it is wrong.