README 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. From Thomas.Huld jrc.it Thu Jul 26 11:01:44 2007
  2. To: Markus Neteler <neteler itc.it>
  3. CC: Jaro Hofierka <hofierka geomodel.sk>, "marcel.suri jrc.it"
  4. <marcel.suri jrc.it>, Tomas Cebecauer <tomas.cebecauer jrc.it>
  5. Date: Thu, 26 Jul 2007 11:01:44 +0200
  6. Subject: Re: r.horizon source code
  7. Lines: 1533
  8. I'm sending the r.sun sources to you here, even though the description is not
  9. yet up to date. I think it works OK now, though I haven't tried all possible
  10. combinations of options. For instance, I haven't ever used the incidence
  11. angle or insolation time outputs. There's no reason why they should have
  12. stopped working but there are always changes that break something unexpected.
  13. The main changes are:
  14. - possibility to read in horizon rasters to use with the shadow calculation.
  15. - Calculation of the shadowing effect should now also work in lat/lon
  16. projection.
  17. - There was a bug in r.sun whereby the shadowing effect was calculated wrong
  18. when the left-right and up-down directions in the projection are different
  19. from east-west and north-south, as is the case in the projection we use
  20. (Lambert Azimuthal) when moving away from the point of origin. This has been
  21. fixed now though only checked with Lambert Azimuthal.
  22. - I'm not sure if this went in already in a previous version, but the
  23. algorithm now also takes into account the curvature of the earth when
  24. calculating shadows.
  25. - new output possibility: glob_rad, which is the sum of the three radiation
  26. components
  27. - new input parameter: <i>civiltime</i>. When this parameter is given, the
  28. single time calculation will calculate the irradiance at the *same* time for
  29. the entire raster instead of using the local solar time. The value of
  30. <i>civiltime</i> is the timezone, relative to GMT. (+1 for central Europe)
  31. - new input parameter <i>numpartitions</i> No change in the calculation
  32. methods, but the program will read the input rasters and do the calculations
  33. in a number of chunks, instead of reading in everything at the start. Output
  34. is still only at the very end. This is only to save memory. It will not work
  35. if you try to calculate shadows without the horizon information, and the
  36. program will tell you so.
  37. - I reorganized the source code quite a lot. In particular, I spun off several
  38. functions into a separate source file called rsunlib.c. I also organized many
  39. of the global variables into <i>struct</i>'s for an easier overview. I did
  40. this because we work here with several derivatives of r.sun:
  41. * r.sunyear which calculates the optimum inclination angle for maximum
  42. insolation
  43. * r.pv which calculates the PV output taking into account also temperature
  44. effects
  45. * r.sun.2axis which is r.sun for a moving plane, whose normal always points
  46. to the sun (two-axis tracking solar energy systems).
  47. Splitting the source code made it easier to reuse bits for these r.sun
  48. derivatives. I haven't updated the Makefile to account for these changes yet.
  49. Look at the little script "compdebug" in the source directory.
  50. There may be other changes that I've forgotten about but nothing dramatic.
  51. Have fun!
  52. Thomas
  53. --
  54. --------------------------------------------------
  55. Thomas Huld
  56. Joint Research Centre of the European Commission
  57. T.P. 450
  58. I-21020 Ispra, Italy
  59. phone: +39 0332785273
  60. e-mail: Thomas.Huld@jrc.it
  61. --------------------------------------------------