{"id":1729,"date":"2026-10-28T07:58:56","date_gmt":"2026-10-28T07:58:56","guid":{"rendered":"https:\/\/helpwithmygisassignment.com\/blog\/?p=1729"},"modified":"2026-10-31T14:56:38","modified_gmt":"2026-10-31T14:56:38","slug":"3d-solar-radiation-modeling","status":"publish","type":"post","link":"https:\/\/helpwithmygisassignment.com\/blog\/3d-solar-radiation-modeling\/","title":{"rendered":"3D Solar Radiation Modeling on Complex Terrain Using DEMs and GRASS GIS"},"content":{"rendered":"<div id=\"model-response-message-contentr_36193463d2b30423\" class=\"markdown markdown-main-panel md-content enable-luminous-fast-follows enable-updated-hr-color stronger tutor-markdown-rendering\" dir=\"ltr\" aria-busy=\"false\" aria-live=\"polite\">\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_89 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/helpwithmygisassignment.com\/blog\/3d-solar-radiation-modeling\/#3D_Solar_Radiation_Modeling_on_Complex_Terrain_Using_DEMs_and_GRASS_GIS\" >3D Solar Radiation Modeling on Complex Terrain Using DEMs and GRASS GIS<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/helpwithmygisassignment.com\/blog\/3d-solar-radiation-modeling\/#Technical_Foundations_Solar_Radiation_Mechanics_in_Complex_Topography\" >Technical Foundations: Solar Radiation Mechanics in Complex Topography<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/helpwithmygisassignment.com\/blog\/3d-solar-radiation-modeling\/#Workflow_Implementation_GRASS_GIS\" >Workflow Implementation (GRASS GIS)<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/helpwithmygisassignment.com\/blog\/3d-solar-radiation-modeling\/#Step_1_Preparing_High-Resolution_DEMs_Horizon_Obstacle_Inputs\" >Step 1: Preparing High-Resolution DEMs &amp; Horizon Obstacle Inputs<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/helpwithmygisassignment.com\/blog\/3d-solar-radiation-modeling\/#Computing_Horizon_Occlusion_Files_rhorizon\" >Computing Horizon Occlusion Files (r.horizon)<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/helpwithmygisassignment.com\/blog\/3d-solar-radiation-modeling\/#Step_2_Configuring_Atmospheric_Parameters_Surface_Attributes\" >Step 2: Configuring Atmospheric Parameters &amp; Surface Attributes<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/helpwithmygisassignment.com\/blog\/3d-solar-radiation-modeling\/#Step_3_Executing_rsun_for_Multi-Temporal_Irradiance_Grids\" >Step 3: Executing r.sun for Multi-Temporal Irradiance Grids<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/helpwithmygisassignment.com\/blog\/3d-solar-radiation-modeling\/#Executing_Mode_2_for_Solstice_Solar_Yields_Day_172_%E2%80%93_Summer_Solstice\" >Executing Mode 2 for Solstice Solar Yields (Day 172 &#8211; Summer Solstice)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/helpwithmygisassignment.com\/blog\/3d-solar-radiation-modeling\/#Automated_Scripting_for_Annual_Cumulative_Yields\" >Automated Scripting for Annual Cumulative Yields<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/helpwithmygisassignment.com\/blog\/3d-solar-radiation-modeling\/#Step_4_Extracting_Zonal_Statistics_for_Optimal_Site_Selection\" >Step 4: Extracting Zonal Statistics for Optimal Site Selection<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/helpwithmygisassignment.com\/blog\/3d-solar-radiation-modeling\/#Technical_Summary_Renewable_Energy_Takeaways\" >Technical Summary &amp; Renewable Energy Takeaways<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/helpwithmygisassignment.com\/blog\/3d-solar-radiation-modeling\/#Key_Modeling_Takeaways\" >Key Modeling Takeaways:<\/a><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h1 class=\"\" data-path-to-node=\"0\"><span class=\"ez-toc-section\" id=\"3D_Solar_Radiation_Modeling_on_Complex_Terrain_Using_DEMs_and_GRASS_GIS\"><\/span>3D Solar Radiation Modeling on Complex Terrain Using DEMs and GRASS GIS<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<div>Utility-scale solar photovoltaic (PV) deployment has expanded from flat, arid plains into complex, mountainous topographies. Estimating solar yield across rugged landscapes presents significant spatial modeling challenges: standard planar insolation models fail to account for microclimatic fluctuations, terrain-induced self-shadowing, elevated horizon obstructions, and anisotropic diffuse sky radiation. Evaluating renewable energy potential across alpine valleys or steep hillsides requires 3D solar radiation modeling grounded in high-resolution <a href=\"https:\/\/helpwithmygisassignment.com\/blog\/cloud-optimized-geotiff-web-map-architecture\/\">Digital Elevation Models<\/a> (DEMs).<\/div>\n<div>GRASS GIS remains an open-source standard for physical geographic processing. Its flagship solar modeling module, <code data-path-to-node=\"2\" data-index-in-node=\"114\">r.sun<\/code>, implements precise clear-sky and real-sky radiation algorithms based on the European Solar Radiation Atlas (ESRA) formulation. By parameterizing atmospheric attenuation, elevation gradients, ground albedo, and dynamic ray-traced shadow rasters, GIS analysts can simulate direct beam, diffuse, and ground-reflected radiation flux (<span class=\"math-inline\" data-math=\"W\/m^2\" data-index-in-node=\"451\">$W\/m^2$<\/span> or <span class=\"math-inline\" data-math=\"Wh\/m^2\" data-index-in-node=\"460\">$Wh\/m^2$<\/span>) across multi-temporal schedules.<\/div>\n<div>This technical guide provides a step-by-step workflow for configuring, executing, and analyzing 3D solar radiation models using DEMs within GRASS GIS.<\/div>\n<h2 data-path-to-node=\"5\"><span class=\"ez-toc-section\" id=\"Technical_Foundations_Solar_Radiation_Mechanics_in_Complex_Topography\"><\/span>Technical Foundations: Solar Radiation Mechanics in Complex Topography<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<div>Accurate solar site selection across non-planar landscapes depends on modeling three primary solar radiation components:<\/div>\n<ol start=\"1\" data-path-to-node=\"7\">\n<li>\n<div><b class=\"\" data-path-to-node=\"7,0,0\" data-index-in-node=\"0\">Direct Normal &amp; Beam Irradiance (<span class=\"math-inline\" data-math=\"I_{beam}\" data-index-in-node=\"33\">$I_{beam}$<\/span>):<\/b> Solar energy arriving in a straight vector from the solar disk. Topographic slope (<span class=\"math-inline\" data-math=\"\\gamma\" data-index-in-node=\"127\">$\\gamma$<\/span>) and aspect (<span class=\"math-inline\" data-math=\"\\alpha\" data-index-in-node=\"147\">$\\alpha$<\/span>) determine the local incidence angle (<span class=\"math-inline\" data-math=\"\\theta\" data-index-in-node=\"192\">$\\theta$<\/span>). Shadowing from adjacent ridge-lines cuts off direct beam transmission during low sun angles.<\/div>\n<\/li>\n<li>\n<div><b class=\"\" data-path-to-node=\"7,1,0\" data-index-in-node=\"0\">Diffuse Sky Irradiance (<span class=\"math-inline\" data-math=\"I_{diffuse}\" data-index-in-node=\"24\">$I_{diffuse}$<\/span>):<\/b> Scrambled photon flux scattered by atmospheric particles, aerosols, and cloud cover. In complex terrain, surrounding topography blocks portions of the sky dome, requiring calculation of the local Sky View Factor (SVF).<\/div>\n<\/li>\n<li>\n<div><b class=\"\" data-path-to-node=\"7,2,0\" data-index-in-node=\"0\">Ground-Reflected Radiation (<span class=\"math-inline\" data-math=\"I_{reflected}\" data-index-in-node=\"28\">$I_{reflected}$<\/span>):<\/b> Secondary flux bounced onto a surface from surrounding terrain, governed by ground surface albedo (<span class=\"math-inline\" data-math=\"\\rho\" data-index-in-node=\"143\">$\\rho$<\/span>). Highly reflective surfaces like snow-covered slopes significantly boost total incident radiation.<\/div>\n<\/li>\n<\/ol>\n<div>The total global solar radiation (<span class=\"math-inline\" data-math=\"I_{global}\" data-index-in-node=\"34\">$I_{global}$<\/span>) incident on a sloped surface is expressed as:<\/div>\n<div data-path-to-node=\"9\">\n<div class=\"math-block\" data-math=\"I_{global} = I_{beam} \\cdot \\cos(\\theta) + I_{diffuse} + I_{reflected}\">$$I_{global} = I_{beam} \\cdot \\cos(\\theta) + I_{diffuse} + I_{reflected}$$<\/div>\n<\/div>\n<div class=\"code-block ng-tns-c745154712-12 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation\" data-hveid=\"0\" data-ved=\"0CAAQhtANahgKEwjT35flgdyXAxUAAAAAHQAAAAAQhwE\">\n<div class=\"formatted-code-block-internal-container ng-tns-c745154712-12\">\n<div class=\"animated-opacity ng-tns-c745154712-12\">\n<pre class=\"ng-tns-c745154712-12\"><code class=\"code-container formatted ng-tns-c745154712-12 no-decoration-radius\" role=\"text\" data-test-id=\"code-content\">                Sun Vector\r\n                  \\\r\n                   \\\r\n    +---------------V---------------+\r\n    |       Direct Beam (I_beam)    |\r\n    +-------------------------------+\r\n                   |\r\n     +-------------+-------------+\r\n     |                           |\r\n     V                           V\r\n+-------------------+   +-------------------+\r\n| Shadow Ray-Tracing|   | Atmospheric Scattering|\r\n| (r.horizon maps)  |   | (Linke Turbidity) |\r\n+-------------------+   +-------------------+\r\n     |                           |\r\n     +-------------+-------------+\r\n                   |\r\n                   V\r\n     +---------------------------+\r\n     | Diffuse Irradiance (SVF)  |\r\n     +---------------------------+\r\n                   |\r\n                   V\r\n     +---------------------------+\r\n     | Ground-Reflected (Albedo) |\r\n     +---------------------------+\r\n                   |\r\n                   V\r\n     +---------------------------+\r\n     |   Total Global Solar yield|\r\n     |        (r.sun output)     |\r\n     +---------------------------+\r\n<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<div>Without accounting for terrain occlusions and surface orientation, static 2D planar models systematically overestimate annual energy yields in mountain valleys by up to 35%.<\/div>\n<h2 class=\"\" data-path-to-node=\"13\"><span class=\"ez-toc-section\" id=\"Workflow_Implementation_GRASS_GIS\"><\/span>Workflow Implementation (<code data-path-to-node=\"13\" data-index-in-node=\"25\">GRASS GIS<\/code>)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<div class=\"attachment-container search-images md-has-block-component\"><\/div>\n<h3 data-path-to-node=\"16\"><span class=\"ez-toc-section\" id=\"Step_1_Preparing_High-Resolution_DEMs_Horizon_Obstacle_Inputs\"><\/span>Step 1: Preparing High-Resolution DEMs &amp; Horizon Obstacle Inputs<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-1759\" src=\"https:\/\/helpwithmygisassignment.com\/blog\/wp-content\/uploads\/2026\/10\/Gemini_Generated_Image_9fgzmm9fgzmm9fgz-1024x572.jpg\" alt=\"3D solar radiation modeling DEM terrain preparation and horizon obstacle analysis\" width=\"1024\" height=\"572\" srcset=\"https:\/\/helpwithmygisassignment.com\/blog\/wp-content\/uploads\/2026\/10\/Gemini_Generated_Image_9fgzmm9fgzmm9fgz-1024x572.jpg 1024w, https:\/\/helpwithmygisassignment.com\/blog\/wp-content\/uploads\/2026\/10\/Gemini_Generated_Image_9fgzmm9fgzmm9fgz-300x167.jpg 300w, https:\/\/helpwithmygisassignment.com\/blog\/wp-content\/uploads\/2026\/10\/Gemini_Generated_Image_9fgzmm9fgzmm9fgz-768x429.jpg 768w, https:\/\/helpwithmygisassignment.com\/blog\/wp-content\/uploads\/2026\/10\/Gemini_Generated_Image_9fgzmm9fgzmm9fgz.jpg 1376w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<div>Precise solar flux modeling requires derived topographic layers: slope, aspect, and horizon elevation angles. High-density terrain datasets (such as USGS 3DEP or <a class=\"ng-star-inserted\" href=\"https:\/\/www.google.com\/search?q=https:\/\/example.com\/lidar-chm-extraction\" target=\"_blank\" rel=\"noopener\" data-hveid=\"0\" data-ved=\"0CAAQ_4QMahgKEwjT35flgdyXAxUAAAAAHQAAAAAQiQE\">LiDAR canopy height model extraction<\/a>) serve as foundational rasters.<\/div>\n<div>First, set the computational region matching your high-resolution DEM, and calculate slope and aspect layers:<\/div>\n<div class=\"code-block ng-tns-c745154712-13 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation\" data-hveid=\"0\" data-ved=\"0CAAQhtANahgKEwjT35flgdyXAxUAAAAAHQAAAAAQigE\">\n<div class=\"formatted-code-block-internal-container ng-tns-c745154712-13\">\n<div class=\"animated-opacity ng-tns-c745154712-13\">\n<div class=\"code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c745154712-13 ng-star-inserted\">\n<p><span class=\"ng-tns-c745154712-13\">Bash<\/span><\/p>\n<div class=\"buttons ng-tns-c745154712-13 ng-star-inserted\"><\/div>\n<\/div>\n<pre class=\"ng-tns-c745154712-13\"><code class=\"code-container formatted ng-tns-c745154712-13\" role=\"text\" data-test-id=\"code-content\"><span class=\"hljs-comment\"># Set computational region to match DEM resolution and extent<\/span>\r\ng.region raster=dem_1m -p\r\n\r\n<span class=\"hljs-comment\"># Generate Slope and Aspect rasters (r.slope.aspect expects degrees)<\/span>\r\nr.slope.aspect elevation=dem_1m \\\r\n    slope=slope_deg \\\r\n    aspect=aspect_deg \\\r\n    format=degrees \\\r\n    precision=FCELL\r\n<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<h4 class=\"\" data-path-to-node=\"20\"><span class=\"ez-toc-section\" id=\"Computing_Horizon_Occlusion_Files_rhorizon\"><\/span>Computing Horizon Occlusion Files (<code data-path-to-node=\"20\" data-index-in-node=\"35\">r.horizon<\/code>)<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<div>Terrain shadowing is calculated by determining the horizon height\u2014the maximum vertical elevation angle of blocking terrain\u2014along discrete azimuthal step angles around every cell.<\/div>\n<div class=\"code-block ng-tns-c745154712-14 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation\" data-hveid=\"0\" data-ved=\"0CAAQhtANahgKEwjT35flgdyXAxUAAAAAHQAAAAAQiwE\">\n<div class=\"formatted-code-block-internal-container ng-tns-c745154712-14\">\n<div class=\"animated-opacity ng-tns-c745154712-14\">\n<div class=\"code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c745154712-14 ng-star-inserted\">\n<p><span class=\"ng-tns-c745154712-14\">Bash<\/span><\/p>\n<div class=\"buttons ng-tns-c745154712-14 ng-star-inserted\"><\/div>\n<\/div>\n<pre class=\"ng-tns-c745154712-14\"><code class=\"code-container formatted ng-tns-c745154712-14\" role=\"text\" data-test-id=\"code-content\"><span class=\"hljs-comment\"># Compute horizon raster maps every 30 degrees (12 directional rasters)<\/span>\r\nr.horizon elevation=dem_1m \\\r\n    step=30 \\\r\n    bufferzone=5000 \\\r\n    output=horizon_angle \\\r\n    maxdistance=10000\r\n<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<blockquote class=\"\" data-path-to-node=\"23\">\n<div><b data-path-to-node=\"23,0\" data-index-in-node=\"0\">Performance Optimization Note:<\/b> Generating horizon maps across large spatial extents is computationally intensive. Pre-processing rasters using <a class=\"ng-star-inserted\" href=\"https:\/\/www.google.com\/search?q=https:\/\/example.com\/gdal-multithreading-raster-optimization\" target=\"_blank\" rel=\"noopener\" data-hveid=\"0\" data-ved=\"0CAAQ_4QMahgKEwjT35flgdyXAxUAAAAAHQAAAAAQogE\">GDAL multi-threading raster optimization<\/a> techniques before importing them into your GRASS database will speed up tile execution times.<\/div>\n<\/blockquote>\n<h3 data-path-to-node=\"25\"><span class=\"ez-toc-section\" id=\"Step_2_Configuring_Atmospheric_Parameters_Surface_Attributes\"><\/span>Step 2: Configuring Atmospheric Parameters &amp; Surface Attributes<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<div><code data-path-to-node=\"26\" data-index-in-node=\"0\">r.sun<\/code> requires atmospheric attenuation coefficients and surface reflectance indices:<\/div>\n<ol start=\"1\" data-path-to-node=\"27\">\n<li>\n<div><b class=\"\" data-path-to-node=\"27,0,0\" data-index-in-node=\"0\">Linke Turbidity Factor (<span class=\"math-inline\" data-math=\"T_L\" data-index-in-node=\"24\">$T_L$<\/span>):<\/b> Quantifies clear-sky atmospheric attenuation caused by water vapor and aerosols. Typical values range from <span class=\"math-inline\" data-math=\"T_L = 2.0\" data-index-in-node=\"137\">$T_L = 2.0$<\/span> (clean, high-altitude alpine air) to <span class=\"math-inline\" data-math=\"T_L = 5.0+\" data-index-in-node=\"184\">$T_L = 5.0+$<\/span> (polluted or humid lowlands).<\/div>\n<\/li>\n<li>\n<div><b class=\"\" data-path-to-node=\"27,1,0\" data-index-in-node=\"0\">Ground Albedo (<span class=\"math-inline\" data-math=\"\\rho\" data-index-in-node=\"15\">$\\rho$<\/span>):<\/b> Dimensionless reflection coefficient ranging from <span class=\"math-inline\" data-math=\"0.15\u20130.25\" data-index-in-node=\"72\">$0.15\u20130.25$<\/span> for typical vegetated terrain, up to <span class=\"math-inline\" data-math=\"0.80\u20130.90\" data-index-in-node=\"119\">$0.80\u20130.90$<\/span> for snow-covered peaks.<\/div>\n<\/li>\n<li>\n<div><b data-path-to-node=\"27,2,0\" data-index-in-node=\"0\">Elevation Map:<\/b> Accounts for atmospheric barometric pressure reductions over high-altitude terrain, decreasing Rayleigh scattering losses.<\/div>\n<\/li>\n<\/ol>\n<div>Create uniform or spatially explicit rasters for Linke turbidity and albedo:<\/div>\n<div class=\"code-block ng-tns-c745154712-15 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation\" data-hveid=\"0\" data-ved=\"0CAAQhtANahgKEwjT35flgdyXAxUAAAAAHQAAAAAQjwE\">\n<div class=\"formatted-code-block-internal-container ng-tns-c745154712-15\">\n<div class=\"animated-opacity ng-tns-c745154712-15\">\n<div class=\"code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c745154712-15 ng-star-inserted\">\n<p><span class=\"ng-tns-c745154712-15\">Bash<\/span><\/p>\n<div class=\"buttons ng-tns-c745154712-15 ng-star-inserted\"><\/div>\n<\/div>\n<pre class=\"ng-tns-c745154712-15\"><code class=\"code-container formatted ng-tns-c745154712-15\" role=\"text\" data-test-id=\"code-content\"><span class=\"hljs-comment\"># Create a spatial Linke Turbidity map (e.g., constant 2.5 for alpine region)<\/span>\r\nr.mapcalc expression=<span class=\"hljs-string\">\"linke_turb = 2.5\"<\/span>\r\n\r\n<span class=\"hljs-comment\"># Create Ground Albedo raster (e.g., 0.20 baseline, elevated for snow zones)<\/span>\r\nr.mapcalc expression=<span class=\"hljs-string\">\"albedo_grid = if(dem_1m &gt; 2500, 0.65, 0.20)\"<\/span>\r\n<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<h3 class=\"\" data-path-to-node=\"31\"><span class=\"ez-toc-section\" id=\"Step_3_Executing_rsun_for_Multi-Temporal_Irradiance_Grids\"><\/span>Step 3: Executing <code data-path-to-node=\"31\" data-index-in-node=\"18\">r.sun<\/code> for Multi-Temporal Irradiance Grids<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-1760\" src=\"https:\/\/helpwithmygisassignment.com\/blog\/wp-content\/uploads\/2026\/10\/Gemini_Generated_Image_2mosvl2mosvl2mos-1024x572.jpg\" alt=\"3D solar radiation modeling r.sun multi-temporal irradiance and global radiation grid\" width=\"1024\" height=\"572\" srcset=\"https:\/\/helpwithmygisassignment.com\/blog\/wp-content\/uploads\/2026\/10\/Gemini_Generated_Image_2mosvl2mosvl2mos-1024x572.jpg 1024w, https:\/\/helpwithmygisassignment.com\/blog\/wp-content\/uploads\/2026\/10\/Gemini_Generated_Image_2mosvl2mosvl2mos-300x167.jpg 300w, https:\/\/helpwithmygisassignment.com\/blog\/wp-content\/uploads\/2026\/10\/Gemini_Generated_Image_2mosvl2mosvl2mos-768x429.jpg 768w, https:\/\/helpwithmygisassignment.com\/blog\/wp-content\/uploads\/2026\/10\/Gemini_Generated_Image_2mosvl2mosvl2mos.jpg 1376w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<div><span class=\"\">The <\/span><code data-path-to-node=\"32\" data-index-in-node=\"4\">r.sun<\/code> module runs in two primary operational modes:<\/div>\n<ul data-path-to-node=\"33\">\n<li>\n<div><b data-path-to-node=\"33,0,0\" data-index-in-node=\"0\">Mode 1 (Instantaneous Mode):<\/b> Calculates solar irradiance (<span class=\"math-inline\" data-math=\"W\/m^2\" data-index-in-node=\"58\">$W\/m^2$<\/span>) at a specific minute\/hour.<\/div>\n<\/li>\n<li>\n<div><b data-path-to-node=\"33,1,0\" data-index-in-node=\"0\">Mode 2 (Integrated Mode):<\/b> Computes cumulative daily solar radiation (<span class=\"math-inline\" data-math=\"Wh\/m^2 \\cdot \\text{day}\" data-index-in-node=\"69\">$Wh\/m^2 \\cdot \\text{day}$<\/span>) for a specified day-of-year (<code data-path-to-node=\"33,1,0\" data-index-in-node=\"123\">day=1..365<\/code>).<\/div>\n<\/li>\n<\/ul>\n<h4 data-path-to-node=\"34\"><span class=\"ez-toc-section\" id=\"Executing_Mode_2_for_Solstice_Solar_Yields_Day_172_%E2%80%93_Summer_Solstice\"><\/span>Executing Mode 2 for Solstice Solar Yields (Day 172 &#8211; Summer Solstice)<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<div class=\"code-block ng-tns-c745154712-16 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation\" data-hveid=\"0\" data-ved=\"0CAAQhtANahgKEwjT35flgdyXAxUAAAAAHQAAAAAQkQE\">\n<div class=\"formatted-code-block-internal-container ng-tns-c745154712-16\">\n<div class=\"animated-opacity ng-tns-c745154712-16\">\n<div class=\"code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c745154712-16 ng-star-inserted\">\n<p><span class=\"ng-tns-c745154712-16\">Bash<\/span><\/p>\n<div class=\"buttons ng-tns-c745154712-16 ng-star-inserted\"><\/div>\n<\/div>\n<pre class=\"ng-tns-c745154712-16\"><code class=\"code-container formatted ng-tns-c745154712-16\" role=\"text\" data-test-id=\"code-content\"><span class=\"hljs-comment\"># Compute integrated daily irradiance for Day 172 (June 21) using pre-calculated horizon rasters<\/span>\r\nr.sun elevation=dem_1m \\\r\n    aspect=aspect_deg \\\r\n    slope=slope_deg \\\r\n    linke=linke_turb \\\r\n    albedo=albedo_grid \\\r\n    horizon_step=30 \\\r\n    horizon_basename=horizon_angle \\\r\n    day=172 \\\r\n    step=0.5 \\\r\n    beam_rad=beam_day172 \\\r\n    diff_rad=diff_day172 \\\r\n    refl_rad=refl_day172 \\\r\n    glob_rad=global_day172\r\n<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<h4 data-path-to-node=\"36\"><span class=\"ez-toc-section\" id=\"Automated_Scripting_for_Annual_Cumulative_Yields\"><\/span>Automated Scripting for Annual Cumulative Yields<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<div>To calculate total annual energy yield (<span class=\"math-inline\" data-math=\"kWh\/m^2 \\cdot \\text{year}\" data-index-in-node=\"40\">$kWh\/m^2 \\cdot \\text{year}$<\/span>), loop <code data-path-to-node=\"37\" data-index-in-node=\"73\">r.sun<\/code> across representative monthly sampling intervals or every day of the calendar year (365 iterations):<\/div>\n<div class=\"code-block ng-tns-c745154712-17 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation\" data-hveid=\"0\" data-ved=\"0CAAQhtANahgKEwjT35flgdyXAxUAAAAAHQAAAAAQkwE\">\n<div class=\"formatted-code-block-internal-container ng-tns-c745154712-17\">\n<div class=\"animated-opacity ng-tns-c745154712-17\">\n<div class=\"code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c745154712-17 ng-star-inserted\">\n<p><span class=\"ng-tns-c745154712-17\">Python<\/span><\/p>\n<div class=\"buttons ng-tns-c745154712-17 ng-star-inserted\"><\/div>\n<\/div>\n<pre class=\"ng-tns-c745154712-17\"><code class=\"code-container formatted ng-tns-c745154712-17\" role=\"text\" data-test-id=\"code-content\"><span class=\"hljs-comment\">#!\/usr\/bin\/env python3<\/span>\r\n<span class=\"hljs-keyword\">import<\/span> grass.script <span class=\"hljs-keyword\">as<\/span> gscript\r\n\r\n<span class=\"hljs-comment\"># Loop through representative days of each month<\/span>\r\nsample_days = [<span class=\"hljs-number\">17<\/span>, <span class=\"hljs-number\">47<\/span>, <span class=\"hljs-number\">75<\/span>, <span class=\"hljs-number\">105<\/span>, <span class=\"hljs-number\">135<\/span>, <span class=\"hljs-number\">162<\/span>, <span class=\"hljs-number\">198<\/span>, <span class=\"hljs-number\">228<\/span>, <span class=\"hljs-number\">258<\/span>, <span class=\"hljs-number\">288<\/span>, <span class=\"hljs-number\">318<\/span>, <span class=\"hljs-number\">344<\/span>]\r\ndays_in_month = [<span class=\"hljs-number\">31<\/span>, <span class=\"hljs-number\">28<\/span>, <span class=\"hljs-number\">31<\/span>, <span class=\"hljs-number\">30<\/span>, <span class=\"hljs-number\">31<\/span>, <span class=\"hljs-number\">30<\/span>, <span class=\"hljs-number\">31<\/span>, <span class=\"hljs-number\">31<\/span>, <span class=\"hljs-number\">30<\/span>, <span class=\"hljs-number\">31<\/span>, <span class=\"hljs-number\">30<\/span>, <span class=\"hljs-number\">31<\/span>]\r\n\r\nmonthly_rasters = []\r\n\r\n<span class=\"hljs-keyword\">for<\/span> day, weight <span class=\"hljs-keyword\">in<\/span> <span class=\"hljs-built_in\">zip<\/span>(sample_days, days_in_month):\r\n    beam_out = <span class=\"hljs-string\">f\"beam_day_<span class=\"hljs-subst\">{day}<\/span>\"<\/span>\r\n    diff_out = <span class=\"hljs-string\">f\"diff_day_<span class=\"hljs-subst\">{day}<\/span>\"<\/span>\r\n    glob_out = <span class=\"hljs-string\">f\"glob_day_<span class=\"hljs-subst\">{day}<\/span>\"<\/span>\r\n    \r\n    print(<span class=\"hljs-string\">f\"Executing r.sun for Day-of-Year: <span class=\"hljs-subst\">{day}<\/span>\"<\/span>)\r\n    gscript.run_command(\r\n        <span class=\"hljs-string\">'r.sun'<\/span>,\r\n        elevation=<span class=\"hljs-string\">'dem_1m'<\/span>,\r\n        aspect=<span class=\"hljs-string\">'aspect_deg'<\/span>,\r\n        slope=<span class=\"hljs-string\">'slope_deg'<\/span>,\r\n        linke=<span class=\"hljs-string\">'linke_turb'<\/span>,\r\n        albedo=<span class=\"hljs-string\">'albedo_grid'<\/span>,\r\n        horizon_step=<span class=\"hljs-number\">30<\/span>,\r\n        horizon_basename=<span class=\"hljs-string\">'horizon_angle'<\/span>,\r\n        day=day,\r\n        step=<span class=\"hljs-number\">1.0<\/span>,\r\n        beam_rad=beam_out,\r\n        diff_rad=diff_out,\r\n        glob_rad=glob_out,\r\n        overwrite=<span class=\"hljs-literal\">True<\/span>\r\n    )\r\n    \r\n    <span class=\"hljs-comment\"># Scale daily yield Wh\/m2 to monthly kWh\/m2<\/span>\r\n    month_calc = <span class=\"hljs-string\">f\"month_kWh_<span class=\"hljs-subst\">{day}<\/span> = (<span class=\"hljs-subst\">{glob_out}<\/span> * <span class=\"hljs-subst\">{weight}<\/span>) \/ 1000.0\"<\/span>\r\n    gscript.mapcalc(month_calc)\r\n    monthly_rasters.append(<span class=\"hljs-string\">f\"month_kWh_<span class=\"hljs-subst\">{day}<\/span>\"<\/span>)\r\n\r\n<span class=\"hljs-comment\"># Sum all monthly layers into annual total radiation map (kWh\/m2\/year)<\/span>\r\nannual_expression = <span class=\"hljs-string\">f\"annual_solar_yield_kWh = <span class=\"hljs-subst\">{' + '.join(monthly_rasters)}<\/span>\"<\/span>\r\ngscript.mapcalc(annual_expression)\r\nprint(<span class=\"hljs-string\">\"Annual Solar Radiation Yield Computed Successfully.\"<\/span>)\r\n<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<h3 data-path-to-node=\"40\"><span class=\"ez-toc-section\" id=\"Step_4_Extracting_Zonal_Statistics_for_Optimal_Site_Selection\"><\/span>Step 4: Extracting Zonal Statistics for Optimal Site Selection<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-1761\" src=\"https:\/\/helpwithmygisassignment.com\/blog\/wp-content\/uploads\/2026\/10\/Gemini_Generated_Image_ngkowpngkowpngko-1024x572.jpg\" alt=\"3D solar radiation modeling optimal utility-scale solar PV site selection zoning map\" width=\"1024\" height=\"572\" srcset=\"https:\/\/helpwithmygisassignment.com\/blog\/wp-content\/uploads\/2026\/10\/Gemini_Generated_Image_ngkowpngkowpngko-1024x572.jpg 1024w, https:\/\/helpwithmygisassignment.com\/blog\/wp-content\/uploads\/2026\/10\/Gemini_Generated_Image_ngkowpngkowpngko-300x167.jpg 300w, https:\/\/helpwithmygisassignment.com\/blog\/wp-content\/uploads\/2026\/10\/Gemini_Generated_Image_ngkowpngkowpngko-768x429.jpg 768w, https:\/\/helpwithmygisassignment.com\/blog\/wp-content\/uploads\/2026\/10\/Gemini_Generated_Image_ngkowpngkowpngko.jpg 1376w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<div>Raw annual irradiance grids must be filtered through spatial engineering constraints to pinpoint suitable utility-scale PV deployment zones. High potential sites typically require:<\/div>\n<ul data-path-to-node=\"42\">\n<li>\n<div><b data-path-to-node=\"42,0,0\" data-index-in-node=\"0\">Annual Insolation:<\/b> <span class=\"math-inline\" data-math=\"&gt; 1,650 \\text{ kWh\/m}^2\/\\text{year}\" data-index-in-node=\"19\">$&gt; 1,650 \\text{ kWh\/m}^2\/\\text{year}$<\/span><\/div>\n<\/li>\n<li>\n<div><b data-path-to-node=\"42,1,0\" data-index-in-node=\"0\">Terrain Slope:<\/b> <span class=\"math-inline\" data-math=\"&lt; 10^\\circ\" data-index-in-node=\"15\">$&lt; 10^\\circ$<\/span> (minimizes civil earthwork costs)<\/div>\n<\/li>\n<li>\n<div><b data-path-to-node=\"42,2,0\" data-index-in-node=\"0\">Aspect Orientation:<\/b> <span class=\"math-inline\" data-math=\"135^\\circ \\text{ to } 225^\\circ\" data-index-in-node=\"20\">$135^\\circ \\text{ to } 225^\\circ$<\/span> (South-facing in Northern Hemisphere)<\/div>\n<\/li>\n<li>\n<div><b data-path-to-node=\"42,3,0\" data-index-in-node=\"0\">Proximity to Infrastructure:<\/b> Avoiding severe valley shading zones while remaining near transmission corridors.<\/div>\n<\/li>\n<\/ul>\n<div class=\"code-block ng-tns-c745154712-18 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation\" data-hveid=\"0\" data-ved=\"0CAAQhtANahgKEwjT35flgdyXAxUAAAAAHQAAAAAQlgE\">\n<div class=\"formatted-code-block-internal-container ng-tns-c745154712-18\">\n<div class=\"animated-opacity ng-tns-c745154712-18\">\n<div class=\"code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c745154712-18 ng-star-inserted\">\n<p><span class=\"ng-tns-c745154712-18\">Bash<\/span><\/p>\n<div class=\"buttons ng-tns-c745154712-18 ng-star-inserted\"><\/div>\n<\/div>\n<pre class=\"ng-tns-c745154712-18\"><code class=\"code-container formatted ng-tns-c745154712-18\" role=\"text\" data-test-id=\"code-content\"><span class=\"hljs-comment\"># Filter prospective development zones meeting technical thresholds<\/span>\r\nr.mapcalc expression=<span class=\"hljs-string\">\"candidate_pv_sites = if(annual_solar_yield_kWh &gt;= 1650 &amp;&amp; slope_deg &lt;= 10.0 &amp;&amp; aspect_deg &gt;= 135 &amp;&amp; aspect_deg &lt;= 225, 1, null())\"<\/span>\r\n\r\n<span class=\"hljs-comment\"># Vectorize candidate patches into discrete polygonal zones<\/span>\r\nr.to.vect input=candidate_pv_sites output=pv_candidate_parcels <span class=\"hljs-built_in\">type<\/span>=area\r\n\r\n<span class=\"hljs-comment\"># Extract zonal radiation yield statistics per polygon parcel<\/span>\r\nv.rast.stats map=pv_candidate_parcels \\\r\n    raster=annual_solar_yield_kWh \\\r\n    column_prefix=sol \\\r\n    method=average,stddev,maximum\r\n<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<div>By querying the resultant attribute table (<code data-path-to-node=\"44\" data-index-in-node=\"43\">sol_average<\/code>), site selection teams can quantitatively rank candidate land parcels based on projected megawatt-hour (MWh) generation yields per unit area. Similar spatial modeling workflows can also be adapted to granular urban environments, such as <a class=\"ng-star-inserted\" href=\"https:\/\/www.google.com\/search?q=https:\/\/example.com\/urban-rooftop-solar-analysis\" target=\"_blank\" rel=\"noopener\" data-hveid=\"0\" data-ved=\"0CAAQ_4QMahgKEwjT35flgdyXAxUAAAAAHQAAAAAQnwE\">urban rooftop solar analysis<\/a>.<\/div>\n<h2 data-path-to-node=\"46\"><a href=\"https:\/\/helpwithmygisassignment.com\/\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.pngall.com\/wp-content\/uploads\/12\/Order-Now-Button-PNG-Photos.png\" alt=\"Order Now Button PNG Transparent Images\" width=\"480\" height=\"360\" \/><\/a><\/h2>\n<h2 data-path-to-node=\"46\"><span class=\"ez-toc-section\" id=\"Technical_Summary_Renewable_Energy_Takeaways\"><\/span>Technical Summary &amp; Renewable Energy Takeaways<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<div>3D solar radiation modeling with <code data-path-to-node=\"47\" data-index-in-node=\"33\">r.sun<\/code> in GRASS GIS allows developers to evaluate topography-driven solar potential with fine-grained accuracy.<\/div>\n<h3 data-path-to-node=\"48\"><span class=\"ez-toc-section\" id=\"Key_Modeling_Takeaways\"><\/span>Key Modeling Takeaways:<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol start=\"1\" data-path-to-node=\"49\">\n<li>\n<div><b data-path-to-node=\"49,0,0\" data-index-in-node=\"0\">Accounting for Horizon Occlusion:<\/b> Using <code data-path-to-node=\"49,0,0\" data-index-in-node=\"40\">r.horizon<\/code> to model self-shadowing terrain prevents overestimating energy yields in mountainous areas.<\/div>\n<\/li>\n<li>\n<div><b data-path-to-node=\"49,1,0\" data-index-in-node=\"0\">Spectral Sensitivity Matters:<\/b> Tuning atmospheric turbidity (<span class=\"math-inline\" data-math=\"T_L\" data-index-in-node=\"60\">$T_L$<\/span>) and albedo inputs allows models to account for high-altitude air clarity and ground reflections from snow cover.<\/div>\n<\/li>\n<li>\n<div><b data-path-to-node=\"49,2,0\" data-index-in-node=\"0\">Multi-Temporal Integration:<\/b> Combining daily irradiance runs into weighted annual layers provides reliable inputs for financial models, site selection, and utility capacity planning.<\/div>\n<\/li>\n<\/ol>\n<div>Deploying scriptable, open-source GIS pipelines ensures that solar capacity models remain transparent, reproducible, and scalable across complex terrain anywhere in the world.<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>3D Solar Radiation Modeling on Complex Terrain Using DEMs and GRASS GIS Utility-scale solar photovoltaic (PV) deployment has expanded from flat, arid plains into complex, mountainous topographies. Estimating solar yield across rugged landscapes presents significant spatial modeling challenges: standard planar insolation models fail to account for microclimatic fluctuations, terrain-induced self-shadowing, elevated horizon obstructions, and anisotropic &#8230; <a title=\"3D Solar Radiation Modeling on Complex Terrain Using DEMs and GRASS GIS\" class=\"read-more\" href=\"https:\/\/helpwithmygisassignment.com\/blog\/3d-solar-radiation-modeling\/\" aria-label=\"Read more about 3D Solar Radiation Modeling on Complex Terrain Using DEMs and GRASS GIS\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":1759,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,4],"tags":[],"class_list":["post-1729","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","category-gis-articles"],"_links":{"self":[{"href":"https:\/\/helpwithmygisassignment.com\/blog\/wp-json\/wp\/v2\/posts\/1729","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/helpwithmygisassignment.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/helpwithmygisassignment.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/helpwithmygisassignment.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/helpwithmygisassignment.com\/blog\/wp-json\/wp\/v2\/comments?post=1729"}],"version-history":[{"count":4,"href":"https:\/\/helpwithmygisassignment.com\/blog\/wp-json\/wp\/v2\/posts\/1729\/revisions"}],"predecessor-version":[{"id":1830,"href":"https:\/\/helpwithmygisassignment.com\/blog\/wp-json\/wp\/v2\/posts\/1729\/revisions\/1830"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/helpwithmygisassignment.com\/blog\/wp-json\/wp\/v2\/media\/1759"}],"wp:attachment":[{"href":"https:\/\/helpwithmygisassignment.com\/blog\/wp-json\/wp\/v2\/media?parent=1729"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/helpwithmygisassignment.com\/blog\/wp-json\/wp\/v2\/categories?post=1729"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/helpwithmygisassignment.com\/blog\/wp-json\/wp\/v2\/tags?post=1729"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}