<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Area Solar Radiation from Python script - error in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/area-solar-radiation-from-python-script-error/m-p/696158#M53978</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I tried using TIF, TXT, and a FDGDB raster. None of these worked.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are there any other suggestions?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Jan 2014 20:42:34 GMT</pubDate>
    <dc:creator>toddsams</dc:creator>
    <dc:date>2014-01-29T20:42:34Z</dc:date>
    <item>
      <title>Area Solar Radiation from Python script - error</title>
      <link>https://community.esri.com/t5/python-questions/area-solar-radiation-from-python-script-error/m-p/696153#M53973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone have an idea on why this may be occurring?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;# Name: SolarRad_MayJuly.py # Description: Derives incoming solar radiation from a raster surface.&amp;nbsp; #&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Outputs a global radiation raster and optional direct, diffuse and direct duration rasters #&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for a specified time period. (May to July). #&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Requirements: Spatial Analyst Extension&amp;nbsp; # Import system modules import arcpy, time from arcpy import env from arcpy.sa import *&amp;nbsp; # Set environment settings env.workspace = "D:/Projects/Tasks/02_SpatialInputs/SolarRad/work/MayJulyOutput"&amp;nbsp; # Check out the ArcGIS Spatial Analyst extension license arcpy.CheckOutExtension("Spatial")&amp;nbsp; # 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 = ""&amp;nbsp; print time.asctime(time.localtime()) print "Running Area Solar Radiation..." try: &amp;nbsp;&amp;nbsp;&amp;nbsp; # Execute AreaSolarRadiation &amp;nbsp;&amp;nbsp;&amp;nbsp; outGlobalRad = AreaSolarRadiation(inRaster, latitude, skySize, timeConfig, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dayInterval, hourInterval, "NOINTERVAL", zFactor, "FROM_DEM", &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; calcDirections, zenithDivisions, azimuthDivisions, "UNIFORM_SKY", &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; diffuseProp, transmittivity, outDirectRad, outDiffuseRad, outDirectDur) except: &amp;nbsp;&amp;nbsp;&amp;nbsp; print "Error while processing solar radiation" &amp;nbsp;&amp;nbsp;&amp;nbsp; print (arcpy.GetMessages())&amp;nbsp; # Save the output&amp;nbsp; outGlobalRad.save("D:/Projects/Tasks/02_SpatialInputs/SolarRad/work/MayJulyOutput/globrad") print "Finished" print time.asctime(time.localtime())&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Tue Jan 28 09:52:16 2014&lt;BR /&gt;Running Area Solar Radiation...&lt;BR /&gt;Error while processing solar radiation&lt;BR /&gt;Executing: AreaSolarRadiation D:/Projects/Tasks/02_SpatialInputs/Geomorph/ElevationSlope/elev D:/Projects/Tasks/02_SpatialInputs/SolarRad/work/MayJulyOutput\AreaSol_elev1 37.1567 200 "MultiDays&amp;nbsp;&amp;nbsp; 2012&amp;nbsp; 121&amp;nbsp; 212" 14 1 NOINTERVAL 1 FROM_DEM 32 8 8 UNIFORM_SKY 0.3 0.5 # # #&lt;BR /&gt;Start Time: Tue Jan 28 09:52:16 2014&lt;BR /&gt;ERROR 999999: Error executing function.&lt;BR /&gt;Failed to open raster dataset&lt;BR /&gt;Failed to execute (AreaSolarRadiation).&lt;BR /&gt;Failed at Tue Jan 28 09:53:33 2014 (Elapsed Time: 1 minutes 17 seconds)&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2014 13:47:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/area-solar-radiation-from-python-script-error/m-p/696153#M53973</guid>
      <dc:creator>toddsams</dc:creator>
      <dc:date>2014-01-29T13:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: Area Solar Radiation from Python script - error</title>
      <link>https://community.esri.com/t5/python-questions/area-solar-radiation-from-python-script-error/m-p/696154#M53974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It seems like something is wrong with your source data. What format is it in? Have you run this from ArcGIS with the same data source without issues?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2014 17:01:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/area-solar-radiation-from-python-script-error/m-p/696154#M53974</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2014-01-29T17:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Area Solar Radiation from Python script - error</title>
      <link>https://community.esri.com/t5/python-questions/area-solar-radiation-from-python-script-error/m-p/696155#M53975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The source data are in GRID format. I have run Area Solar Radiation on GRID files successfully in ArcGIS in the past.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This particular data set does not successfully complete within ArcGIS. It just runs for about two days, then ArcCatalog quits with no error. I attributed this to the large size of the data set and the complexity of the Solar Radiation analysis. This is what led me to try in a standalone Python script, which aborts (with an error) much quicker than within ArcGIS.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2014 17:10:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/area-solar-radiation-from-python-script-error/m-p/696155#M53975</guid>
      <dc:creator>toddsams</dc:creator>
      <dc:date>2014-01-29T17:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: Area Solar Radiation from Python script - error</title>
      <link>https://community.esri.com/t5/python-questions/area-solar-radiation-from-python-script-error/m-p/696156#M53976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would first try moving it out of a GRID to a geodatabase raster or ascii. How big is your dataset? Have you tried breaking it up unto smaller sections? If performance is also something you want to gain you can look at multiprocessing. Esri has a blog entry on performing analysis on a large dataset using multithreading that you may find interesting. &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://blogs.esri.com/esri/arcgis/2011/08/29/multiprocessing/"&gt;http://blogs.esri.com/esri/arcgis/2011/08/29/multiprocessing/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2014 17:33:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/area-solar-radiation-from-python-script-error/m-p/696156#M53976</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2014-01-29T17:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: Area Solar Radiation from Python script - error</title>
      <link>https://community.esri.com/t5/python-questions/area-solar-radiation-from-python-script-error/m-p/696157#M53977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The data set is a 30m resolution with about 20,000 and 25,000 rows and columns (2GB integer GRID).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have considered breaking into smaller sections, but would get edge effects if the sections do not overlap. I was just trying to give the full dataset a whirl before having to break up.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I will try other raster formats and look into multithreading. Right now, the process gets allocated to only a single core.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your thoughts. Will check back if this does not work out.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2014 17:42:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/area-solar-radiation-from-python-script-error/m-p/696157#M53977</guid>
      <dc:creator>toddsams</dc:creator>
      <dc:date>2014-01-29T17:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: Area Solar Radiation from Python script - error</title>
      <link>https://community.esri.com/t5/python-questions/area-solar-radiation-from-python-script-error/m-p/696158#M53978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I tried using TIF, TXT, and a FDGDB raster. None of these worked.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are there any other suggestions?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2014 20:42:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/area-solar-radiation-from-python-script-error/m-p/696158#M53978</guid>
      <dc:creator>toddsams</dc:creator>
      <dc:date>2014-01-29T20:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Area Solar Radiation from Python script - error</title>
      <link>https://community.esri.com/t5/python-questions/area-solar-radiation-from-python-script-error/m-p/696159#M53979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I clipped the raster to a smaller area and it works ok. Looks like I will have to split the data up.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2014 21:03:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/area-solar-radiation-from-python-script-error/m-p/696159#M53979</guid>
      <dc:creator>toddsams</dc:creator>
      <dc:date>2014-01-29T21:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: Area Solar Radiation from Python script - error</title>
      <link>https://community.esri.com/t5/python-questions/area-solar-radiation-from-python-script-error/m-p/696160#M53980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What are the specs of the machine you are running this on? You may be running in to memory issues, do you have the 64-bit background geoprocessing module installed?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2014 21:27:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/area-solar-radiation-from-python-script-error/m-p/696160#M53980</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2014-01-29T21:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: Area Solar Radiation from Python script - error</title>
      <link>https://community.esri.com/t5/python-questions/area-solar-radiation-from-python-script-error/m-p/696161#M53981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have Windows 7 64-bit on a Core i7 with 12GB of RAM.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I had 64-bit geoprocessing installed with 10.0. I am not able to recall if I installed when I upgraded to 10.1. How would I check?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since the process fails after only a minute, it seems that it does not like the size of the raster as it reads it into memory.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2014 22:03:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/area-solar-radiation-from-python-script-error/m-p/696161#M53981</guid>
      <dc:creator>toddsams</dc:creator>
      <dc:date>2014-01-29T22:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: Area Solar Radiation from Python script - error</title>
      <link>https://community.esri.com/t5/python-questions/area-solar-radiation-from-python-script-error/m-p/696162#M53982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Easiest way is to open IDLE that installed with your version of ArcGIS. At the top it will say whether the default is 32 or 64 bit. As 10.0 and 10.1 use different versions of Python you almost definitely have the 32 bit version, so would have this tag.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;...[MSC v.1500 32 bit (Intel)]...&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;64 bit would have this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;...[MSC v.1500 64 bit (AMD64)]...&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using 64 bit geoprocessing should solve this issue for you so I would look into getting that.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2014 13:26:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/area-solar-radiation-from-python-script-error/m-p/696162#M53982</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2014-01-30T13:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: Area Solar Radiation from Python script - error</title>
      <link>https://community.esri.com/t5/python-questions/area-solar-radiation-from-python-script-error/m-p/696163#M53983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you tile the data you'll have edge effects from objects casting shadows across the tile boundary.&amp;nbsp; 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.&amp;nbsp; 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.&amp;nbsp; 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.&amp;nbsp; see &lt;/SPAN&gt;&lt;A _jive_internal="true" class="" href="https://community.esri.com/www.solarsimplified.org"&gt;www.solarsimplified.org&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;:cool:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2014 14:16:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/area-solar-radiation-from-python-script-error/m-p/696163#M53983</guid>
      <dc:creator>KevinBell</dc:creator>
      <dc:date>2014-01-30T14:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: Area Solar Radiation from Python script - error</title>
      <link>https://community.esri.com/t5/python-questions/area-solar-radiation-from-python-script-error/m-p/696164#M53984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I already have 64-bit processioning installed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems I will have to tile the data. I will have to experiment to determine a good tile size.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for all of your thoughts.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2014 15:13:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/area-solar-radiation-from-python-script-error/m-p/696164#M53984</guid>
      <dc:creator>toddsams</dc:creator>
      <dc:date>2014-01-30T15:13:00Z</dc:date>
    </item>
  </channel>
</rss>

