[cig-commits] r7247 - mc/3D/CitcomS/branches/compressible/lib

tan2 at geodynamics.org tan2 at geodynamics.org
Thu Jun 14 14:40:29 PDT 2007


Author: tan2
Date: 2007-06-14 14:40:29 -0700 (Thu, 14 Jun 2007)
New Revision: 7247

Modified:
   mc/3D/CitcomS/branches/compressible/lib/Topo_gravity.c
Log:
Porting r7245 from trunk -- Zeroing geoid arrays before every geoid calculation. This fixes issue114

Modified: mc/3D/CitcomS/branches/compressible/lib/Topo_gravity.c
===================================================================
--- mc/3D/CitcomS/branches/compressible/lib/Topo_gravity.c	2007-06-14 21:39:17 UTC (rev 7246)
+++ mc/3D/CitcomS/branches/compressible/lib/Topo_gravity.c	2007-06-14 21:40:29 UTC (rev 7247)
@@ -466,6 +466,12 @@
     /* cos coeff */
     geoid[1] = (float*)malloc((E->sphere.hindice+1)*sizeof(float));
 
+    /* reset arrays */
+    for (p = 0; p <= E->sphere.hindice; p++) {
+        harm_geoid[0][p] = 0;
+        harm_geoid[1][p] = 0;
+    }
+
     /* loop over each layer */
     for(k=1;k<E->lmesh.noz;k++)  {
         buoy2rho = scaling2 * E->refstate.rho[k]



More information about the cig-commits mailing list