[GRASS-SVN] r42938 - grass/trunk/raster/r.sun

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jul 29 06:41:06 EDT 2010


Author: hamish
Date: 2010-07-29 10:41:06 +0000 (Thu, 29 Jul 2010)
New Revision: 42938

Modified:
   grass/trunk/raster/r.sun/rsunlib.c
Log:
merge minor whitespace and comment tweaks from devbr6

Modified: grass/trunk/raster/r.sun/rsunlib.c
===================================================================
--- grass/trunk/raster/r.sun/rsunlib.c	2010-07-29 10:38:39 UTC (rev 42937)
+++ grass/trunk/raster/r.sun/rsunlib.c	2010-07-29 10:41:06 UTC (rev 42938)
@@ -6,7 +6,7 @@
 See manual pages for details.
 (C) 2002 Copyright Jaro Hofierka, Gresaka 22, 085 01 Bardejov, Slovakia, 
               and GeoModel, s.r.o., Bratislava, Slovakia
-email: hofierka at geomodel.sk,marcel.suri at jrc.it,suri at geomodel.sk
+email: hofierka at geomodel.sk, marcel.suri at jrc.it, suri at geomodel.sk
 *******************************************************************************/
 /*
  * This program is free software; you can redistribute it and/or
@@ -102,7 +102,7 @@
 }
 
 
-/* com_sol_const(): compute the solar constant corrected for the day of the
+/* 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
@@ -163,12 +163,12 @@
 	}
 	else {
 	    if (pom < 0) {
-		/*        G_debug(3,"\n Sun is ABOVE the surface during the whole day"); */
+		/* G_debug(3,"\n Sun is ABOVE the surface during the whole day"); */
 		sungeom->sunrise_time = 0;
 		sungeom->sunset_time = 24;
 	    }
 	    else {
-		/*                G_debug(3,"\n The sun is BELOW the surface during the whole day"); */
+		/* G_debug(3,"\n The sun is BELOW the surface during the whole day"); */
 		if (fabs(pom) - 1 <= EPS) {
 		    sungeom->sunrise_time = 12;
 		    sungeom->sunset_time = 12;
@@ -210,7 +210,7 @@
     if (fabs(sungeom->lum_C31) < EPS) {
 	if (fabs(sunVarGeom->sinSolarAltitude) >= EPS) {
 	    if (sunVarGeom->sinSolarAltitude > 0) {
-		/*                        G_debug(3,"\tSun is ABOVE area during the whole day"); */
+		/* G_debug(3,"\tSun is ABOVE area during the whole day"); */
 		sungeom->sunrise_time = 0;
 		sungeom->sunset_time = 24;
 	    }
@@ -238,7 +238,7 @@
     if (fabs(pom) > EPS) {
 	sunVarGeom->solarAzimuth = lum_Ly / pom;
 	sunVarGeom->solarAzimuth = acos(sunVarGeom->solarAzimuth);	/* horiz. angle of the Sun */
-	/*                      solarAzimuth *= RAD; */
+	/* solarAzimuth *= RAD; */
 	if (lum_Lx < 0)
 	    sunVarGeom->solarAzimuth = pi2 - sunVarGeom->solarAzimuth;
     }
@@ -464,7 +464,7 @@
 
     locSolarAltitude = sunVarGeom->solarAltitude;
 
-
+/* FIXME: please document all coefficients */
     elevationCorr = exp(-sunVarGeom->z_orig / 8434.5);
     temp1 = 0.1594 + locSolarAltitude * (1.123 + 0.065656 * locSolarAltitude);
     temp2 = 1. + locSolarAltitude * (28.9344 + 277.3971 * locSolarAltitude);
@@ -510,7 +510,7 @@
 
     locSolarAltitude = sunVarGeom->solarAltitude;
 
-
+/* FIXME: please document all coefficients */
     p = exp(-sunVarGeom->z_orig / 8434.5);
     temp1 = 0.1594 + locSolarAltitude * (1.123 + 0.065656 * locSolarAltitude);
     temp2 = 1. + locSolarAltitude * (28.9344 + 277.3971 * locSolarAltitude);
@@ -563,6 +563,7 @@
     cosslope = cos(sunSlopeGeom->slope);
     sinslope = sin(sunSlopeGeom->slope);
 
+/* FIXME: please document all coefficients */
     tn = -0.015843 + locLinke * (0.030543 + 0.0003797 * locLinke);
     A1b = 0.26463 + locLinke * (-0.061581 + 0.0031408 * locLinke);
     if (A1b * tn < 0.0022)
@@ -635,7 +636,7 @@
     cosslope = cos(sunSlopeGeom->slope);
     sinslope = sin(sunSlopeGeom->slope);
 
-
+/* FIXME: please document all coefficients */
     tn = -0.015843 + locLinke * (0.030543 + 0.0003797 * locLinke);
     A1b = 0.26463 + locLinke * (-0.061581 + 0.0031408 * locLinke);
 
@@ -682,7 +683,7 @@
 	/* refl. rad */
 	*rr = sunRadVar->alb * gh * (1 - cosslope) / 2.;
     }
-    else {			/* plane */
+    else {	/* plane */
 	dr = dh;
 	*rr = 0.;
     }



More information about the grass-commit mailing list