[GRASS-SVN] r42934 - grass/branches/develbranch_6/raster/r.sun2

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jul 29 04:02:11 EDT 2010


Author: hamish
Date: 2010-07-29 08:02:11 +0000 (Thu, 29 Jul 2010)
New Revision: 42934

Modified:
   grass/branches/develbranch_6/raster/r.sun2/rsunlib.c
Log:
document the coeffs in the Solar Constant correction function

Modified: grass/branches/develbranch_6/raster/r.sun2/rsunlib.c
===================================================================
--- grass/branches/develbranch_6/raster/r.sun2/rsunlib.c	2010-07-28 23:37:50 UTC (rev 42933)
+++ grass/branches/develbranch_6/raster/r.sun2/rsunlib.c	2010-07-29 08:02:11 UTC (rev 42934)
@@ -102,11 +102,30 @@
 }
 
 
-
+/* com_sol_const(): compute the solar constant corrected for the day of the
+   year. The Earth is closest to the Sun (Perigee) on about January 3rd,
+   it is furthest from the sun (Apogee) about July 6th. The 1367 W/m^2 solar
+   constant is at the average 1AU distance, but on Jan 3 it gets up to
+   around 1412.71 W/m^2 and on July 6 it gets down to around 1321 W/m^2.
+   This value is for what hits the top of the atmosphere before any energy
+   is attenuated. */
 double com_sol_const(int no_of_day)
 {
     double I0, d1;
 
+    /* Solar constant: 1367.0 W/m^2.
+
+       Perigee offset: here we call Jan 2 at 8:18pm the Perigee, so day
+	number 2.8408. In angular units that's (2*pi * 2.8408 / 365.25) = 0.048869.
+
+       Orbital eccentricity: For Earth this is currently about 0.01672,
+	and so the distance to the sun varies by +/- 0.01672 from the
+	mean distance (1AU), so over the year the amplitude of the
+	function is 2*ecc = 0.03344.
+
+       And 365.25 is of course the number of days in a year.
+    */
+
     /*  v W/(m*m) */
     d1 = pi2 * no_of_day / 365.25;
     I0 = 1367. * (1 + 0.03344 * cos(d1 - 0.048869));
@@ -115,8 +134,6 @@
 }
 
 
-
-
 void com_par_const(double longitTime, struct SunGeometryConstDay *sungeom,
 		   struct GridGeometry *gridGeom)
 {



More information about the grass-commit mailing list