<?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: Points solar radiation in an hourly basis for a whole year. in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/points-solar-radiation-in-an-hourly-basis-for-a/m-p/512765#M7363</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Jimeno,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not sure of the specifics for the points solar radiation tool, but testing it locally, it looks to take about one second per site per day on my machine, which gives me a ballpark estimation of 41 hours for 400 sites, using the defaults for the tool, against a 1m LIDAR dataset, stored as a mosaic. You mentioned that you're using 8 cores, do you have custom code to distribute the workload across those cores? If not, check out multiprocessing along with background processing to take advantage of those additional cores.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;Use an &lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//002w0000005s000000"&gt;in-memory workspace&lt;/A&gt; to store the results. If memory is available, also try copying your input raster into the in-memory workspace.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Use a file geodatabase instead of plain old shapefiles for the outputs.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Try adjusting the resolution of the input DEM to see its effects on performance. Also, think about clipping down the DEM as much as possible to just include a buffered area around the points themselves.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;If the features don't fit into an in-memory workspace, serve them off of a fast disk -- SSD if at all possible.&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;BR /&gt;&lt;SPAN&gt;Those are a few things off the top of my head.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Dec 2013 23:33:55 GMT</pubDate>
    <dc:creator>ShaunWalbridge</dc:creator>
    <dc:date>2013-12-02T23:33:55Z</dc:date>
    <item>
      <title>Points solar radiation in an hourly basis for a whole year.</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/points-solar-radiation-in-an-hourly-basis-for-a/m-p/512761#M7359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi there,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have been working lately on setting the points solar radiation routine to calculate the 8760 values of solar radiation in the year for a set of points in a single run. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The routine in ArcGIS 10.1 does it already for as much as an hourly scale but on a daily basis and only delivering apparently those hours with solar irradiance (not exactly the 24 hours)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To solve this, it is necessary to run the algorithm for every day of the year + identifying the hours of daylight of the day and do the correction to obtain 8760. Is there a way to edit the source code or do it so in a simpler manner? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jimeno&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Nov 2013 15:12:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/points-solar-radiation-in-an-hourly-basis-for-a/m-p/512761#M7359</guid>
      <dc:creator>JimenoFonseca</dc:creator>
      <dc:date>2013-11-15T15:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Points solar radiation in an hourly basis for a whole year.</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/points-solar-radiation-in-an-hourly-basis-for-a/m-p/512762#M7360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello Jimeno,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not sure exactly what you're looking for, but you should be able to use the solar functions, perhaps in conjunction with other packages, to answer your question. I see that as you mention, when you run Points Solar Radiation on a single day, you get back the time steps but not the actual time that it corresponds to -- one way to get back the corresponding actual hours would be to use a script such as &lt;/SPAN&gt;&lt;A href="http://michelanders.blogspot.com/2010/12/calulating-sunrise-and-sunset-in-python.html" rel="nofollow noopener noreferrer" target="_blank"&gt;this one calculating sunrise and sunset&lt;/A&gt;&lt;SPAN&gt; or &lt;/SPAN&gt;&lt;A href="http://stackoverflow.com/questions/2637293/calculating-dawn-and-sunset-times-using-pyephem" rel="nofollow noopener noreferrer" target="_blank"&gt;use a package like PyEphem&lt;/A&gt;&lt;SPAN&gt; to get more precise calculations.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;From there, you should be able to combine the solar observations from ArcGIS with 'actual time', so you can correspond the output T0 with the sunrise time and the final T&lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;n&lt;/SPAN&gt;&lt;SPAN&gt; with the sunset time. So my psuedo-code for this on a single day would be something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; import arcpy
&amp;nbsp;&amp;nbsp;&amp;nbsp; import ephem

&amp;nbsp;&amp;nbsp;&amp;nbsp; julian_day = 165
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; # run solar calculation for all sites on this day; defaults used here
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.PointsSolarRadiation("elevation", "my_sites", 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "output_global_radiation", "", 35, 200, 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.sa.TimeWithinDay(julian_day, 0, 24))

&amp;nbsp;&amp;nbsp;&amp;nbsp; # figure out sunrise and sunset. if the points are close together, do this 
&amp;nbsp;&amp;nbsp;&amp;nbsp; # once for all sites, if they're geographically spread over a large area, you'll need
&amp;nbsp;&amp;nbsp;&amp;nbsp; # to make these calculations for each site.
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; obs = ephem.Observer()
&amp;nbsp;&amp;nbsp;&amp;nbsp; obs.lat = ' 34' # obtained from my_sites
&amp;nbsp;&amp;nbsp;&amp;nbsp; obs.long = '-120.0' # obtained from my_sites
&amp;nbsp;&amp;nbsp;&amp;nbsp; obs.elev = 15 # extract from elevation raster at site location

&amp;nbsp;&amp;nbsp;&amp;nbsp; sunrise = obs.previous_rising(ephem.Sun()) # sunrise
&amp;nbsp;&amp;nbsp;&amp;nbsp; noon = obs.next_transit(ephem.Sun(), start=sunrise) # solar noon
&amp;nbsp;&amp;nbsp;&amp;nbsp; sunset = obs.next_setting(ephem.Sun()) # sunset
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; # then, map those times to the T0...Tn time steps, which are by default in half-hour intervals.
&amp;nbsp;&amp;nbsp;&amp;nbsp; # output this result to a CSV or the like.
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does that help get you started? I think something like this is easier than trying to dig up the internals to figure out the corresponding times.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Shaun&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:26:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/points-solar-radiation-in-an-hourly-basis-for-a/m-p/512762#M7360</guid>
      <dc:creator>ShaunWalbridge</dc:creator>
      <dc:date>2021-12-11T22:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: Points solar radiation in an hourly basis for a whole year.</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/points-solar-radiation-in-an-hourly-basis-for-a/m-p/512763#M7361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Shaun,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanx for this great post (+1 for that). A small correction; the 'PointsSolarRadiation' is part of the sa module. So in the code change the line:&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;arcpy.PointsSolarRadiation("elevation", "my_sites",&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for this:&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;arcpy.&lt;STRONG&gt;sa.&lt;/STRONG&gt;PointsSolarRadiation("elevation", "my_sites",&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Xander&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2013 11:23:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/points-solar-radiation-in-an-hourly-basis-for-a/m-p/512763#M7361</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2013-11-21T11:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: Points solar radiation in an hourly basis for a whole year.</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/points-solar-radiation-in-an-hourly-basis-for-a/m-p/512764#M7362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi Shaun,&lt;BR /&gt;&lt;BR /&gt;Thanx for this great post (+1 for that). A small correction; the 'PointsSolarRadiation' is part of the sa module. So in the code change the line:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;arcpy.PointsSolarRadiation("elevation", "my_sites",&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;for this:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;arcpy.&lt;STRONG&gt;sa.&lt;/STRONG&gt;PointsSolarRadiation("elevation", "my_sites",&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;&lt;BR /&gt;Xander&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dear Shaun and Xander,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your answers. It is a great starting. I am still struggling with computing every single day and then joining them. It requires a lot of time even while using parallel computing. For 300-400 points, with 8 cores the time is around 1.5 hours.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I use a similar algorithm as Shaun suggested, but still printing a single shape file for each day (result of the points solar radiation). Then reading it, and joining it to the others to have the 8760 values for each point takes a lot of computational time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Would you guys have any idea of how improving this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you, Jimeno&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Nov 2013 06:31:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/points-solar-radiation-in-an-hourly-basis-for-a/m-p/512764#M7362</guid>
      <dc:creator>JimenoFonseca</dc:creator>
      <dc:date>2013-11-28T06:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: Points solar radiation in an hourly basis for a whole year.</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/points-solar-radiation-in-an-hourly-basis-for-a/m-p/512765#M7363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Jimeno,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not sure of the specifics for the points solar radiation tool, but testing it locally, it looks to take about one second per site per day on my machine, which gives me a ballpark estimation of 41 hours for 400 sites, using the defaults for the tool, against a 1m LIDAR dataset, stored as a mosaic. You mentioned that you're using 8 cores, do you have custom code to distribute the workload across those cores? If not, check out multiprocessing along with background processing to take advantage of those additional cores.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;Use an &lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//002w0000005s000000"&gt;in-memory workspace&lt;/A&gt; to store the results. If memory is available, also try copying your input raster into the in-memory workspace.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Use a file geodatabase instead of plain old shapefiles for the outputs.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Try adjusting the resolution of the input DEM to see its effects on performance. Also, think about clipping down the DEM as much as possible to just include a buffered area around the points themselves.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;If the features don't fit into an in-memory workspace, serve them off of a fast disk -- SSD if at all possible.&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;BR /&gt;&lt;SPAN&gt;Those are a few things off the top of my head.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Dec 2013 23:33:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/points-solar-radiation-in-an-hourly-basis-for-a/m-p/512765#M7363</guid>
      <dc:creator>ShaunWalbridge</dc:creator>
      <dc:date>2013-12-02T23:33:55Z</dc:date>
    </item>
  </channel>
</rss>

