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
Output Sun Skymap C:\Users\Downloads\ShadowImpactAnalysis\ShadowImpactAnalysis\ShadowImpactAnalysis.gdb\aoi_proposed_development_CreateSunSkymap
Time Zone (UTC-08:00) Pacific Time (US & Canada)
Start Date 7/20/2023
Time Interval {hh:mm} 00:30
End Date
Day Interval
Apply daylight savings time adjustment
Temperature Unit Celsius
Temperature in Degrees 10
Atmospheric Pressure in Millibars 1010
Minimum Sun Angle 5
Use apparent position true
Add extended sun calculation attributes
layer1
=====================
Messages
Start Time: Thursday, July 20, 2023 2:03:00 PM
Project Home Directory is: C:\Users\Downloads\ShadowImpactAnalysis\ShadowImpactAnalysis
Grid convergence angle is 12.18.
Calculating sun observations from -105.581°, 44.03°...
Traceback (most recent call last):
File "C:\Users\Downloads\ShadowImpactAnalysis\ShadowImpactAnalysis\Scripts\CreateSunSkyMap_new.py", line 424, in <module>
sun = SunEphemeris(obs, calc, None, apparent, atmRefraction, timeAdjustment=timeZone)
File "C:\Users\Downloads\ShadowImpactAnalysis\ShadowImpactAnalysis\Scripts\CreateSunSkyMap_new.py", line 287, in __init__
self.azimuth = getAzimuthAngle(self.declination, radians(self.elevationAngle), radians(observer.lat),
File "C:\Users\Downloads\ShadowImpactAnalysis\ShadowImpactAnalysis\Scripts\CreateSunSkyMap_new.py", line 262, in getAzimuthAngle
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)
Did you manage to get past this error? I'm facing the same issue.
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.
Hello! I'm wondering of you have found a solution to this. I am experiencing the exact same issue and error message.
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.