r.sunmask.html 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <h2>DESCRIPTION</h2>
  2. <em>r.sunmask</em> creates an output map layer based on an input elevation
  3. raster map layer and the sun position. The output map layer contains the
  4. cast shadow areas arising from sun shine and elevations. The user can define
  5. the sun position either directly or the module calculates it from given
  6. location and date/time parameters using the
  7. <a href="http://rredc.nrel.gov/">NREL</a> sun position algorithm. So either
  8. "A:"-parameters to specify the exact known sun position or "B:-parameters"
  9. to specify date/time for sun position calculation by <em>r.sunmask</em> itself
  10. have to be used.
  11. <p>The module performs sunset/sunrise checks and refraction correction for sun
  12. position calculation. Local coordinate systems are internally transformed to
  13. latitude/longitude for the SOLPOS algorithm. The elevation is not considered
  14. in the sunset/sunrise calculations.
  15. <h2>NOTES</h2>
  16. <em>r.sunmask</em> and daylight savings: Rather than converting the
  17. local time to GMT, the SOLPOS algorithm uses what is called Local
  18. Standard Time, which is generally politically defined as an offset
  19. from GMT. So the key is the offset from GMT, which the solpos Time
  20. Zone parameter. If the user specifies clock time (different for
  21. winter and summer), s/he would have to change the Time Zone
  22. parameter seasonally in <em>r.sunmask</em> (timezone parameter). See also
  23. <a href="http://en.wikipedia.org/wiki/Daylight_saving_time_by_country">Daylight saving time by region and country</a>.
  24. <p>
  25. Note: In latitude/longitude locations the position coordinates pair
  26. (east/west) has to be specified in decimal degree (not D:M:S). If
  27. not specified, the map center's coordinates will be used.
  28. Also <em>g.region -l</em> displays the map center's coordinates in
  29. latitude/longitude (or <em>g.region -c</em> in the actual coordinate
  30. system).
  31. <p>
  32. Note for module usage with the <em>-g</em> flag, when performing calculations
  33. close to sunset/sunrise:
  34. <div class="code"><pre>
  35. [...]
  36. sunangleabovehorizont=0.434240
  37. sunrise=07:59:19
  38. sunset=16:25:17
  39. Time (07:59:02) is before sunrise (07:59:19)!
  40. WARNING: Nothing to calculate. Please verify settings.
  41. No map calculation requested. Finished.
  42. </pre></div>
  43. In above calculation it appears to be a mistake as
  44. the program indicates that we are before sunrise while
  45. the <i>sun angle above horizon</i> is already positive.
  46. The reason is that <i>sun angle above horizon</i> is
  47. calculated with correction for atmosphere refraction while
  48. <i>sunrise</i> and <i>sunset</i> are calculated <b>without</b>
  49. correction for atmosphere refraction. The output without
  50. <em>-g</em> flag contains related indications.
  51. <h2>EXAMPLE</H2>
  52. Example for North Carolina sample data set for the calculation
  53. of sun position angles and more:
  54. <div class="code"><pre>
  55. # set the region to a place near Raleigh (NC)
  56. g.region raster=elev_lid792_1m -p
  57. # compute only sun position and no output map
  58. r.sunmask -s elev_lid792_1m year=2012 month=2 \
  59. day=22 hour=10 minute=30 timezone=-5
  60. Using map center coordinates: 638650.000000 220375.000000
  61. Calculating sun position... (using solpos (V. 11 April 2001) from NREL)
  62. 2012/02/22, daynum: 53, time: 10:30:00 (decimal time: 10.500000)
  63. long: -78.678856, lat: 35.736160, timezone: -5.000000
  64. Solar position: sun azimuth: 143.006409, sun angle above horz. (refraction corrected): 36.233879
  65. Sunrise time (without refraction): 06:58:11
  66. Sunset time (without refraction): 17:58:47
  67. # with -g flag, useful for eval() shell function
  68. r.sunmask -s -g elev_lid792_1m year=2012 month=2 \
  69. day=22 hour=10 minute=30 timezone=-5
  70. Using map center coordinates: 638650.000000 220375.000000
  71. Calculating sun position... (using solpos (V. 11 April 2001) from NREL)
  72. date=2012/02/22
  73. daynum=53
  74. time=10:30:00
  75. decimaltime=10.500000
  76. longitudine=-78.678856
  77. latitude=35.736160
  78. timezone=-5.000000
  79. sunazimuth=143.006409
  80. sunangleabovehorizon=36.233879
  81. sunrise=06:58:11
  82. sunset=17:58:47
  83. </pre></div>
  84. <h2>Acknowledgements</h2>
  85. Acknowledgements: National Renewable Energy Laboratory for their
  86. <a href="http://rredc.nrel.gov/solar/codesandalgorithms/solpos/">SOLPOS 2.0</a> sun position
  87. algorithm.
  88. <h2>SEE ALSO</h2>
  89. <em>
  90. <a href="g.region.html">g.region</a>,
  91. <a href="r.sun.html">r.sun</a>,
  92. <a href="r.sunhours.html">r.sunhours</a>,
  93. <a href="r.slope.aspect.html">r.slope.aspect</a>
  94. </em>
  95. <h2>AUTHOR</h2>
  96. Janne Soimasuo, Finland 1994<br>
  97. update to FP by Huidae Cho 2001<br>
  98. added solpos algorithm feature by Markus Neteler 2001
  99. <p><i>Last changed: $Date$</i>