Select to view content in your preferred language

Area Solar Radiation from Python script - error

2280
11
Jump to solution
01-29-2014 05:47 AM
toddsams
Deactivated User
Hello,

I am attempting to execute Area Solar Radiation in a stand-alone python script (shown below). The basis for the script was provided in the ESRI tool help. I made a few adjustments to this template by adjusting a few of the local variables and adding try/except etc.

The problem is that when I execute the script, it runs for about a minute then fails with an ERROR 999999 (also shown below in quoted script output).

Does anyone have an idea on why this may be occurring?


# Name: SolarRad_MayJuly.py # Description: Derives incoming solar radiation from a raster surface.  #              Outputs a global radiation raster and optional direct, diffuse and direct duration rasters #              for a specified time period. (May to July). #               # Requirements: Spatial Analyst Extension  # Import system modules import arcpy, time from arcpy import env from arcpy.sa import *  # Set environment settings env.workspace = "D:/Projects/Tasks/02_SpatialInputs/SolarRad/work/MayJulyOutput"  # Check out the ArcGIS Spatial Analyst extension license arcpy.CheckOutExtension("Spatial")  # Set local variables inRaster = "D:/Projects/Tasks/02_SpatialInputs/Geomorph/ElevationSlope/elev" latitude = 37.1567 skySize = 200 timeConfig = TimeMultipleDays(2012, 121, 212) dayInterval = 14 hourInterval = 1 zFactor = 1 calcDirections = 32 zenithDivisions = 8 azimuthDivisions = 8 diffuseProp = 0.3 transmittivity = 0.5 outDirectRad = "" outDiffuseRad = "" outDirectDur = ""  print time.asctime(time.localtime()) print "Running Area Solar Radiation..." try:     # Execute AreaSolarRadiation     outGlobalRad = AreaSolarRadiation(inRaster, latitude, skySize, timeConfig,        dayInterval, hourInterval, "NOINTERVAL", zFactor, "FROM_DEM",        calcDirections, zenithDivisions, azimuthDivisions, "UNIFORM_SKY",        diffuseProp, transmittivity, outDirectRad, outDiffuseRad, outDirectDur) except:     print "Error while processing solar radiation"     print (arcpy.GetMessages())  # Save the output  outGlobalRad.save("D:/Projects/Tasks/02_SpatialInputs/SolarRad/work/MayJulyOutput/globrad") print "Finished" print time.asctime(time.localtime())


Tue Jan 28 09:52:16 2014
Running Area Solar Radiation...
Error while processing solar radiation
Executing: AreaSolarRadiation D:/Projects/Tasks/02_SpatialInputs/Geomorph/ElevationSlope/elev D:/Projects/Tasks/02_SpatialInputs/SolarRad/work/MayJulyOutput\AreaSol_elev1 37.1567 200 "MultiDays   2012  121  212" 14 1 NOINTERVAL 1 FROM_DEM 32 8 8 UNIFORM_SKY 0.3 0.5 # # #
Start Time: Tue Jan 28 09:52:16 2014
ERROR 999999: Error executing function.
Failed to open raster dataset
Failed to execute (AreaSolarRadiation).
Failed at Tue Jan 28 09:53:33 2014 (Elapsed Time: 1 minutes 17 seconds)
Tags (2)
0 Kudos
11 Replies
KevinBell
Deactivated User
If you tile the data you'll have edge effects from objects casting shadows across the tile boundary.  To prevent that, figure out the height of features that are near your solve tile, buffer the solve tile as a function of the sun angle.  Solve the whole buffer, then clip out the original tile, delete the data in the buffer (that now has edge errors) and mosaic the tiles back together.  I ran all of Salt Lake County (800 sq miles) on a 32 core server w/ 100 GB Ram and it took a month at 80% capacity.  see www.solarsimplified.org

:cool:
0 Kudos
toddsams
Deactivated User
I already have 64-bit processioning installed.

It seems I will have to tile the data. I will have to experiment to determine a good tile size.

Thanks for all of your thoughts.
0 Kudos