Debian Codegraph @

raster/r.sun/r.sun.html

raw
1 <h2>DESCRIPTION</h2>
2
3 <b>r.sun</b> computes beam (direct), diffuse and ground reflected solar
4 irradiation raster maps for given day, latitude, surface and atmospheric
5 conditions. Solar parameters (e.g. time of sunrise and sunset, declination,
6 extraterrestrial irradiance, daylight length) are stored in the resultant maps'
7 history files. Alternatively, the local time can be specified to compute solar
8 incidence angle and/or irradiance raster maps. The shadowing effect of the
9 topography is incorporated by default. This can be done either internally by
10 calculation of the shadowing effect directly from the digital elevation model
11 or by specifying raster maps of the horizon height which is much faster. These
12 horizon raster maps can be calculated using <a href="r.horizon.html">r.horizon</a>.
13 <p>For latitude-longitude coordinates it requires that the elevation map is in meters.
14 The rules are:
15 <ul>
16 <li> lat/lon coordinates: elevation in meters;</li>
17 <li> Other coordinates: elevation in the same unit as the easting-northing coordinates.</li>
18 </ul>
19
20 The solar geometry of the model is based on the works of Krcho (1990), later
21 improved by Jenco (1992). The equations describing Sun -- Earth position as
22 well as an interaction of the solar radiation with atmosphere were originally
23 based on the formulas suggested by Kitler and Mikler (1986). This component
24 was considerably updated by the results and suggestions of the working group
25 co-ordinated by Scharmer and Greif (2000) (this algorithm might be replaced
26 by SOLPOS algorithm-library included in GRASS within <a href="r.sunmask.html">
27 r.sunmask</a>
28 command). The model computes all three components of global radiation (beam,
29 diffuse and reflected) for the clear sky conditions, i.e. not taking into
30 consideration the spatial and temporal variation of clouds. The extent and
31 spatial resolution of the modelled area, as well as integration over time,
32 are limited only by the memory and data storage resources. The model is built
33 to fulfil user needs in various fields of science (hydrology, climatology,
34 ecology and environmental sciences, photovoltaics, engineering, etc.) for
35 continental, regional up to the landscape scales.
36 <p>The model considers a shadowing effect of the local topography unless switched
37 off with the <em>-p</em> flag.
38 <b>r.sun</b> works in two modes: In the first mode it calculates for the set
39 local time a solar incidence angle [degrees] and solar irradiance values [W.m-2].
40 In the second mode daily sums of solar radiation [Wh.m-2.day-1] are computed
41 within a set day. By a scripting the two modes can be used separately or
42 in a combination to provide estimates for any desired time interval. The
43 model accounts for sky obstruction by local relief features. Several solar
44 parameters are saved in the resultant maps' history files, which may be viewed
45 with the <a href="r.info.html">r.info</a> command.
46
47 <p>
48 The solar incidence angle raster map <i>incidout</i> is computed specifying
49 elevation raster map <i>elevation</i>, aspect raster map <i>aspect</i>, slope
50 steepness raster map <i>slope,</i> given the day <i>day</i> and local time
51 <i>time</i>. There is no need to define latitude for projects with known
52 and defined coordinate system (check it with the <a href="g.proj.html">
53 g.proj</a>
54 command). If you have undefined projection, (x,y) system, etc. then the latitude
55 can be defined explicitly for large areas by input raster map <i>lat_in</i>
56 with interpolated latitude values. All input raster maps must
57 be floating point (FCELL) raster maps. Null data in maps are excluded from
58 the computation (and also speeding-up the computation), so each output raster
59 map will contain null data in cells according to all input raster maps. The
60 user can use <a href="r.null.html">r.null</a>
61 command to create/reset null file for your input raster maps. <br>
62 The specified day <i>day</i> is the number of the day of the general year
63 where January 1 is day no.1 and December 31 is 365. Time <i>time</i> must
64 be a local (solar) time (i.e. NOT a zone time, e.g. GMT, CET) in decimal system,
65 e.g. 7.5 (= 7h 30m A.M.), 16.1 = 4h 6m P.M..
66
67 <p>
68 The solar <i>declination</i> parameter is an option to override
69 the value computed by the internal routine for the day of the year. The value
70 of geographical latitude can be set as a constant for the whole computed
71 region or, as an option, a grid representing spatially distributed values
72 over a large region. The geographical latitude must be also in decimal system
73 with positive values for northern hemisphere and negative for southern one.
74 In similar principle the Linke turbidity factor (<i>linke</i>, <i>lin</i>
75 ) and ground albedo (<i>albedo</i>, <i>alb</i>) can be set.
76 <p>Besides clear-sky radiations, the user can compute a real-sky radiation (beam,
77 diffuse) using <i>coeff_bh</i> and <i>coeff_dh</i> input raster maps defining
78 the fraction of the respective clear-sky radiations reduced by atmospheric
79 factors (e.g. cloudiness). The value is between 0-1. Usually these
80 coefficients can be obtained from a long-terms meteorological measurements
81 provided as raster maps with spatial distribution of these coefficients separately
82 for beam and diffuse radiation (see Suri and Hofierka, 2004, section 3.2).
83
84 <p>
85 The solar irradiation or irradiance raster maps <i>beam_rad</i>, <i>diff_rad</i>,
86 <i>refl_rad</i> are computed for a given day <i>day,</i> latitude <i>lat_in</i>,
87 elevation <i>elevation</i>, slope <i>slope</i> and aspect <i>aspect</i> raster maps.
88 For convenience, the output raster given as <i>glob_rad</i>
89 will output the sum of the three radiation components. The program uses
90 the Linke atmosphere turbidity factor and ground albedo coefficient.
91 A default, single value of Linke factor is <i>lin</i>=3.0 and
92 is near the annual average for rural-city areas. The Linke
93 factor for an absolutely clear atmosphere is <i>lin</i>=1.0. See notes below
94 to learn more about this factor. The incidence solar angle is the angle between
95 horizon and solar beam vector.
96
97 <p>
98 The solar radiation maps for a given day are computed by integrating the
99 relevant irradiance between sunrise and sunset times for that day. The
100 user can set a finer or coarser time step used for all-day radiation
101 calculations with the <i>step</i> option. The default value of <i>step</i> is
102 0.5 hour. Larger steps (e.g. 1.0-2.0) can speed-up calculations but produce
103 less reliable (and more jagged) results. As the sun moves through approx.
104 15&deg; of the sky in an hour, the default <i>step</i> of half an hour will
105 produce 7.5&deg; steps in the data. For relatively smooth output with the
106 sun placed for every degree of movement in the sky you should set the
107 <i>step</i> to 4 minutes or less. <i>step</i><code>=0.05</code> is equivalent
108 to every 3 minutes. Of course setting the time step to be very fine
109 proportionally increases the module's running time.
110 <p>The output units are in Wh per squared meter per given
111 day [Wh/(m*m)/day]. The incidence angle and irradiance/irradiation maps are
112 computed with the shadowing influence of relief by default. It is also possible
113 for them to be computed without this influence using the planar flag (<i>-p</i>).
114 In mountainous areas this can lead to very different results! The user should be
115 aware that taking into account the shadowing effect of relief can slow
116 down the speed of computation, especially when the sun altitude is low.
117
118 <p>
119 When considering the shadowing effect, speed and precision of computation
120 can be controlled by the <i>distance_step</i> parameter, which defines the sampling density
121 at which the visibility of a grid cell is computed in the direction of a
122 path of the solar flow. It also defines the method by which the obstacle's
123 altitude is computed. When choosing a <i>distance_step</i> less than 1.0 (i.e. sampling
124 points will be computed at <i>distance_step</i> * cellsize distance), <em>r.sun</em> takes
125 the altitude from the nearest grid point. Values above 1.0 will use the maximum
126 altitude value found in the nearest 4 surrounding grid points. The default
127 value <i>distance_step</i>=1.0 should give reasonable results for most cases (e.g.
128 on DEM). The <i>distance_step</i> value defines a multiplying coefficient for sampling
129 distance. This basic sampling distance equals to the arithmetic average of
130 both cell sizes. The reasonable values are in the range 0.5-1.5. The values
131 below 0.5 will decrease and values above 1.0 will increase the computing
132 speed. Values greater than 2.0 may produce estimates with lower accuracy
133 in highly dissected relief. The fully shadowed areas are written to the output
134 maps as zero values. Areas with NULL data are considered as no barrier with
135 shadowing effect.
136
137 <p>
138 The maps' history files are generated containing the following listed
139 parameters used in the computation: <br>
140 - Solar constant used W.m-2 <br>
141 - Extraterrestrial irradiance on a plane perpendicular to the solar beam [W.m-2] <br>
142 - Day of the year <br>
143 - Declination [radians] <br>
144 - Decimal hour (Alternative 1 only) <br>
145 - Sunrise and sunset (min-max) over a horizontal plane <br>
146 - Daylight lengths <br>
147 - Geographical latitude (min-max) <br>
148 - Linke turbidity factor (min-max) <br>
149 - Ground albedo (min-max)
150 <p>The user can use a nice shellcript with variable
151 day to compute radiation for some time interval within the year (e.g. vegetation
152 or winter period). Elevation, aspect and slope input values should not be
153 reclassified into coarser categories. This could lead to incorrect results.
154
155 <h2> OPTIONS</h2>
156
157 <p>Currently, there are two modes of r.sun.
158 In the first mode it calculates solar incidence angle and solar irradiance
159 raster maps using the set local time. In the second mode daily sums of solar
160 irradiation [Wh.m-2.day-1] are computed for a specified day.
161
162 <h2>NOTES</h2>
163
164 Solar energy is an important input parameter in different models concerning
165 energy industry, landscape, vegetation, evapotranspiration, snowmelt or remote
166 sensing. Solar rays incidence angle maps can be effectively used in radiometric
167 and topographic corrections in mountainous and hilly terrain where very accurate
168 investigations should be performed.
169 <p>
170 The clear-sky solar radiation model applied in the r.sun is based on the
171 work undertaken for development of European Solar Radiation Atlas (Scharmer
172 and Greif 2000, Page et al. 2001, Rigollier 2001). The clear sky model estimates
173 the global radiation from the sum of its beam, diffuse and reflected components.
174 The main difference between solar radiation models for inclined surfaces
175 in Europe is the treatment of the diffuse component. In the European climate
176 this component is often the largest source of estimation error. Taking into
177 consideration the existing models and their limitation the European Solar
178 Radiation Atlas team selected the Muneer (1990) model as it has a sound theoretical
179 basis and thus more potential for later improvement.
180 <p>
181 Details of underlying equations used in this program can be found in the
182 reference literature cited below or book published by Neteler and Mitasova:
183 Open Source GIS: A GRASS GIS Approach (published in Kluwer Academic Publishers
184 in 2002).
185 <p>
186 Average monthly values of the Linke turbidity coefficient for a mild climate
187 in the northern hemisphere (see reference literature for your study area):
188
189 <table border="1">
190 <tr><th>Month</th><th>Jan</th><th>Feb</th><th>Mar</th><th>Apr</th><th>May</th><th>Jun</th><th>Jul</th><th>Aug</th><th>Sep</th><th>Oct</th><th>Nov</th><th>Dec</th><th>annual</th></tr>
191 <tr><td>mountains</td><td>1.5</td><td>1.6</td><td>1.8</td><td>1.9</td><td>2.0</td><td>2.3</td><td>2.3</td><td>2.3</td><td>2.1</td><td>1.8</td><td>1.6</td><td>1.5</td><td>1.90</td></tr>
192 <tr><td>rural</td><td>2.1</td><td>2.2</td><td>2.5</td><td>2.9</td><td>3.2</td><td>3.4</td><td>3.5</td><td>3.3</td><td>2.9</td><td>2.6</td><td>2.3</td><td>2.2</td><td>2.75</td></tr>
193 <tr><td>city</td><td>3.1</td><td>3.2</td><td>3.5</td><td>4.0</td><td>4.2</td><td>4.3</td><td>4.4</td><td>4.3</td><td>4.0</td><td>3.6</td><td>3.3</td><td>3.1</td><td>3.75</td></tr>
194 <tr><td>industrial</td><td>4.1</td><td>4.3</td><td>4.7</td><td>5.3</td><td>5.5</td><td>5.7</td><td>5.8</td><td>5.7</td><td>5.3</td><td>4.9</td><td>4.5</td><td>4.2</td><td>5.00</td></tr>
195 </table>
196
197 <p>Planned improvements include the use of the SOLPOS algorithm for solar
198 geometry calculations and internal computation of aspect and slope.
199
200 <h3>Solar time</h3>
201
202 By default r.sun calculates times as true solar time, whereby solar noon is
203 always exactly 12 o'clock everywhere in the current region. Depending on where
204 the zone of interest is located in the related time zone, this may cause
205 differences of up to an hour, in some cases (like Western Spain) even more.
206 On top of this, the offset varies during the year according to the Equation
207 of Time.
208 <p>
209 To overcome this problem, the user can use the option <em>civil_time=&lt;timezone_offset&gt;</em>
210 in r.sun to make it use real-world (wall clock) time. For example, for Central
211 Europe the timezone offset is +1, +2 when daylight saving time is in effect.
212 <p>
213 <!-- WE DON'T KNOW, check source code:
214 If the user use the <em>civil_time</em> parameter, also the longitude needs to
215 be supplied as a raster map with the <em>long_in</em> parameter. Within a
216 latlon location, such a map can be easily made with:
217
218 <div class="code"><pre>
219 r.mapcalc "lon_raster = x()"
220 </pre></div>
221
222 END OF WE DON'T KNOW
223 -->
224
225 <h3>Extraction of shadow maps</h3>
226 A map of shadows can be extracted from the solar incidence angle map
227 (incidout). Areas with NULL values are shadowed. This will not work
228 if the <em>-p</em> flag has been used.
229
230 <h3>Large maps and out of memory problems</h3>
231
232 With a large number or columns and rows, <b>r.sun</b> can consume
233 significant amount of memory. While output raster maps are not
234 partitionable, the input raster maps are using the <em>npartitions</em>
235 parameter.
236
237 In case of out of memory error (<code>ERROR: G_malloc: out of memory</code>), the
238 <em>npartitions</em> parameter can be used to run a segmented calculation
239 which consumes less memory during the computations.
240
241 The amount of memory by <b>r.sun</b> is estimated as follows:
242
243 <div class="code"><pre>
244 # without input raster map partitioning:
245 # memory requirements: 4 bytes per raster cell
246 # rows,cols: rows and columns of current region (find out with g.region)
247 # IR: number of input raster maps without horizon maps
248 # OR: number of output raster maps
249 memory_bytes = rows*cols*(IR*4 + horizon_steps + OR*4)
250
251 # with input raster map partitioning:
252 memory_bytes = rows*cols*((IR*4+horizon_steps)/npartitions + OR*4)
253 </pre></div>
254
255 <h2>EXAMPLES</h2>
256
257 North Carolina example (considering also cast shadows):
258 <div class="code"><pre>
259 g.region raster=elevation -p
260
261 # calculate horizon angles (to speed up the subsequent r.sun calculation)
262 r.horizon elevation=elevation step=30 bufferzone=200 output=horangle \
263 maxdistance=5000
264
265 # slope + aspect
266 r.slope.aspect elevation=elevation aspect=aspect.dem slope=slope.dem
267
268 # calculate global radiation for day 180 at 2p.m., using r.horizon output
269 r.sun elevation=elevation horizon_basename=horangle horizon_step=30 \
270 aspect=aspect.dem slope=slope.dem glob_rad=global_rad day=180 time=14
271 # result: output global (total) irradiance/irradiation [W.m-2] for given day/time
272 r.univar global_rad
273 </pre></div>
274
275 <p>
276 Calculation of the integrated daily irradiation for a region in North-Carolina
277 for a given day of the year at 30m resolution. Here day 172 (i.e., 21 June
278 in non-leap years):
279
280 <div class="code"><pre>
281 g.region raster=elev_ned_30m -p
282
283 # considering cast shadows
284 r.sun elevation=elev_ned_30m linke_value=2.5 albedo_value=0.2 day=172 \
285 beam_rad=b172 diff_rad=d172 \
286 refl_rad=r172 insol_time=it172
287
288 d.mon wx0
289 # show irradiation raster map [Wh.m-2.day-1]
290 d.rast.leg b172
291 # show insolation time raster map [h]
292 d.rast.leg it172
293 </pre></div>
294
295 We can compute the day of year from a specific date in Python:
296 <div class="code"><pre>
297 &gt;&gt;&gt; import datetime
298 &gt;&gt;&gt; datetime.datetime(2014, 6, 21).timetuple().tm_yday
299 172
300 </pre></div>
301
302 <h2>SEE ALSO</h2>
303
304 <em>
305 <a href="r.horizon.html">r.horizon</a>,
306 <a href="r.slope.aspect.html">r.slope.aspect</a>,
307 <a href="r.sunhours.html">r.sunhours</a>,
308 <a href="r.sunmask.html">r.sunmask</a>,
309 <a href="g.proj.html">g.proj</a>,
310 <a href="r.null.html">r.null</a>,
311 <a href="v.surf.rst.html">v.surf.rst</a>
312 </em>
313
314 <h2>REFERENCES</h2>
315
316 <ul>
317 <li> Hofierka, J., Suri, M. (2002): The solar radiation model for Open source
318 GIS: implementation and applications. International
319 GRASS users conference in Trento, Italy, September 2002.
320 (<a href="http://skagit.meas.ncsu.edu/~jaroslav/trento/Hofierka_Jaroslav.pdf">PDF</a>)</li>
321 <li>
322 Hofierka, J. (1997). Direct solar radiation modelling within an open GIS
323 environment. Proceedings of JEC-GI'97 conference in Vienna, Austria, IOS
324 Press Amsterdam, 575-584.</li>
325 <li>
326 Jenco, M. (1992). Distribution of direct solar radiation on georelief and
327 its modelling by means of complex digital model of terrain (in Slovak). Geograficky
328 casopis, 44, 342-355.</li>
329 <li>
330 Kasten, F. (1996). The Linke turbidity factor based on improved values of
331 the integral Rayleigh optical thickness. Solar Energy, 56 (3), 239-244.</li>
332 <li>
333 Kasten, F., Young, A. T. (1989). Revised optical air mass tables and approximation
334 formula. Applied Optics, 28, 4735-4738.</li>
335 <li>
336 Kittler, R., Mikler, J. (1986): Basis of the utilization of solar radiation
337 (in Slovak). VEDA, Bratislava, p. 150.</li>
338 <li>
339 Krcho, J. (1990). Morfometrick&aacute; analza a digit&aacute;lne modely georeli&eacute;fu
340 (Morphometric analysis and digital models of georelief, in Slovak).
341 VEDA, Bratislava.</li>
342 <li>
343 Muneer, T. (1990). Solar radiation model for Europe. Building services engineering
344 research and technology, 11, 4, 153-163.</li>
345 <li>
346 Neteler, M., Mitasova, H. (2002): Open Source GIS: A GRASS GIS Approach, Kluwer
347 Academic Publishers. (Appendix explains formula;
348 <a href="https://grassbook.org/">r.sun script download</a>)</li>
349 <li>
350 Page, J. ed. (1986). Prediction of solar radiation on inclined surfaces. Solar
351 energy R&amp;D in the European Community, series F - Solar radiation data,
352 Dordrecht (D. Reidel), 3, 71, 81-83.</li>
353 <li>
354 Page, J., Albuisson, M., Wald, L. (2001). The European solar radiation atlas:
355 a valuable digital tool. Solar Energy, 71, 81-83.</li>
356 <li>
357 Rigollier, Ch., Bauer, O., Wald, L. (2000). On the clear sky model of the
358 ESRA - European Solar radiation Atlas - with respect to the Heliosat method.
359 Solar energy, 68, 33-48.</li>
360 <li>
361 Scharmer, K., Greif, J., eds., (2000). The European solar radiation atlas,
362 Vol. 2: Database and exploitation software. Paris (Les Presses de l'&Eacute;cole
363 des Mines).</li>
364 <li>
365 Joint Research Centre: <a href="http://re.jrc.ec.europa.eu/pvgis/">GIS solar radiation database for Europe</a> and
366 <a href="http://re.jrc.ec.europa.eu/pvgis/solres/solmod3.htm">Solar radiation and GIS</a></li>
367 </ul>
368
369 <h2>AUTHORS</h2>
370
371 Jaroslav Hofierka, GeoModel, s.r.o. Bratislava, Slovakia <br>
372
373 Marcel Suri, GeoModel, s.r.o. Bratislava, Slovakia <br>
374
375 Thomas Huld, JRC, Italy <br>
376
377 &copy; 2007, Jaroslav Hofierka, Marcel Suri. This program is free software under the GNU General Public License (&gt;=v2)
378 <address>
379 <a href="MAILTO:[email protected]">[email protected]</a>
380 <a href="MAILTO:[email protected]">[email protected]</a>
381 </address>