[cig-commits] r4998 - in mc/3D/CitcomS/trunk: CitcomS/Solver doc/manual lib visual

tan2 at geodynamics.org tan2 at geodynamics.org
Fri Oct 13 17:27:11 PDT 2006


Author: tan2
Date: 2006-10-13 17:27:09 -0700 (Fri, 13 Oct 2006)
New Revision: 4998

Modified:
   mc/3D/CitcomS/trunk/CitcomS/Solver/Solver.py
   mc/3D/CitcomS/trunk/doc/manual/citcoms.lyx
   mc/3D/CitcomS/trunk/lib/Instructions.c
   mc/3D/CitcomS/trunk/lib/Output.c
   mc/3D/CitcomS/trunk/lib/Output_h5.c
   mc/3D/CitcomS/trunk/lib/global_defs.h
   mc/3D/CitcomS/trunk/visual/estimate.py
Log:
Renamed reference of "average" to "horiz_avg"


Modified: mc/3D/CitcomS/trunk/CitcomS/Solver/Solver.py
===================================================================
--- mc/3D/CitcomS/trunk/CitcomS/Solver/Solver.py	2006-10-14 00:06:56 UTC (rev 4997)
+++ mc/3D/CitcomS/trunk/CitcomS/Solver/Solver.py	2006-10-14 00:27:09 UTC (rev 4998)
@@ -66,7 +66,6 @@
 
 
     def initialize(self, application):
-
         from CitcomSLib import citcom_init, global_default_values, set_signal
 
         comm = application.solverCommunicator
@@ -206,6 +205,7 @@
     def save(self, monitoringFrequency):
         step = self.step
 
+        output_time(self.all_variables, step)
         # output spacing is 'monitoringFrequency'
         if not (step % monitoringFrequency):
             output(self.all_variables, step)

Modified: mc/3D/CitcomS/trunk/doc/manual/citcoms.lyx
===================================================================
--- mc/3D/CitcomS/trunk/doc/manual/citcoms.lyx	2006-10-14 00:06:56 UTC (rev 4997)
+++ mc/3D/CitcomS/trunk/doc/manual/citcoms.lyx	2006-10-14 00:27:09 UTC (rev 4998)
@@ -12827,7 +12827,7 @@
 \end_layout
 
 \begin_layout Subsection
-Horizontal Average Output (test-case.average.0.10)
+Horizontal Average Output (test-case.horiz_avg.0.10)
 \end_layout
 
 \begin_layout Standard

Modified: mc/3D/CitcomS/trunk/lib/Instructions.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Instructions.c	2006-10-14 00:06:56 UTC (rev 4997)
+++ mc/3D/CitcomS/trunk/lib/Instructions.c	2006-10-14 00:27:09 UTC (rev 4998)
@@ -981,7 +981,7 @@
     E->output.pressure = 0;
     E->output.surf = 0;
     E->output.botm = 0;
-    E->output.average = 0;
+    E->output.horiz_avg = 0;
 
     while(1) {
         /* get next field */
@@ -1007,8 +1007,8 @@
             E->output.surf = 1;
         else if(strcmp(prev, "botm")==0)
             E->output.botm = 1;
-        else if(strcmp(prev, "average")==0)
-            E->output.average = 1;
+        else if(strcmp(prev, "horiz_avg")==0)
+            E->output.horiz_avg = 1;
         else
             if(E->parallel.me == 0)
                 fprintf(stderr, "Warning: unknown field for output_optional: %s\n", prev);

Modified: mc/3D/CitcomS/trunk/lib/Output.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Output.c	2006-10-14 00:06:56 UTC (rev 4997)
+++ mc/3D/CitcomS/trunk/lib/Output.c	2006-10-14 00:27:09 UTC (rev 4998)
@@ -43,7 +43,7 @@
 void output_visc(struct All_variables *, int);
 void output_surf_botm(struct All_variables *, int);
 void output_stress(struct All_variables *, int);
-void output_average(struct All_variables *, int);
+void output_horiz_avg(struct All_variables *, int);
 void output_tracer(struct All_variables *, int);
 void output_pressure(struct All_variables *, int);
 
@@ -89,8 +89,8 @@
   if (E->output.pressure == 1)
     output_pressure(E, cycles);
 
-  if (E->output.average == 1)
-      output_average(E, cycles);
+  if (E->output.horiz_avg == 1)
+      output_horiz_avg(E, cycles);
 
   return;
 }
@@ -263,7 +263,7 @@
 }
 
 
-void output_average(struct All_variables *E, int cycles)
+void output_horiz_avg(struct All_variables *E, int cycles)
 {
   /* horizontal average output of temperature and rms velocity*/
   void compute_horiz_avg();
@@ -278,7 +278,7 @@
   /* only the first nprocz processors need to output */
 
   if (E->parallel.me<E->parallel.nprocz)  {
-    sprintf(output_file,"%s.average.%d.%d", E->control.data_file,
+    sprintf(output_file,"%s.horiz_avg.%d.%d", E->control.data_file,
 	    E->parallel.me, cycles);
     fp1=fopen(output_file,"w");
     for(j=1;j<=E->lmesh.noz;j++)  {

Modified: mc/3D/CitcomS/trunk/lib/Output_h5.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Output_h5.c	2006-10-14 00:06:56 UTC (rev 4997)
+++ mc/3D/CitcomS/trunk/lib/Output_h5.c	2006-10-14 00:27:09 UTC (rev 4998)
@@ -87,7 +87,7 @@
 void h5output_stress(struct All_variables *, int);
 void h5output_tracer(struct All_variables *, int);
 void h5output_surf_botm(struct All_variables *, int);
-void h5output_average(struct All_variables *, int);
+void h5output_horiz_avg(struct All_variables *, int);
 void h5output_time(struct All_variables *, int);
 
 #endif
@@ -137,8 +137,8 @@
     if(E->output.pressure == 1)
         h5output_pressure(E, cycles);
 
-    if (E->output.average == 1)
-        h5output_average(E, cycles);
+    if (E->output.horiz_avg == 1)
+        h5output_horiz_avg(E, cycles);
 
     /* Call this last (for timing information) */
     h5output_time(E, cycles);
@@ -190,7 +190,7 @@
     /*
      * Citcom variables
      */
-    
+
     int cap;
     int caps = E->sphere.caps;
     int nprocx = E->parallel.nprocx;
@@ -218,7 +218,7 @@
     /*
      * MPI variables
      */
-    
+
     MPI_Comm comm = E->parallel.world;
     MPI_Info info = MPI_INFO_NULL;
     int ierr;
@@ -411,7 +411,7 @@
     }
 
     /* Create /horiz_avg/ group */
-    if(E->output.average == 1)
+    if(E->output.horiz_avg == 1)
     {
         avg_group = h5create_group(file_id, "horiz_avg", (size_t)0);
         h5create_field(avg_group, const_scalar1d, "coord", "radial coordinates of horizontal planes");
@@ -748,7 +748,7 @@
             (*field)->maxdims[s] = E->sphere.caps;
             if (t >= 0)
                 (*field)->chunkdims[s] = E->sphere.caps;
-            
+
             /* hyperslab selection parameters */
             (*field)->offset[s] = E->parallel.me / (nprocx*nprocy*nprocz);
             (*field)->stride[s] = 1;
@@ -1516,7 +1516,7 @@
 
     mz = field->block[1];
 
-    if (E->output.average == 1)
+    if (E->output.horiz_avg == 1)
     {
         for(k = 0; k < mz; k++)
             field->data[k] = E->sx[1][3][k+1];
@@ -1527,7 +1527,7 @@
 
 }
 
-void h5output_average(struct All_variables *E, int cycles)
+void h5output_horiz_avg(struct All_variables *E, int cycles)
 {
     /* horizontal average output of temperature and rms velocity */
     void compute_horiz_avg();

Modified: mc/3D/CitcomS/trunk/lib/global_defs.h
===================================================================
--- mc/3D/CitcomS/trunk/lib/global_defs.h	2006-10-14 00:06:56 UTC (rev 4997)
+++ mc/3D/CitcomS/trunk/lib/global_defs.h	2006-10-14 00:27:09 UTC (rev 4998)
@@ -814,7 +814,7 @@
     int pressure;     /* whether to output pressure */
     int surf;         /* whether to output surface data */
     int botm;         /* whether to output bottom data */
-    int average;      /* whether to output horizontal averaged profile */
+    int horiz_avg;    /* whether to output horizontal averaged profile */
 };
 
 

Modified: mc/3D/CitcomS/trunk/visual/estimate.py
===================================================================
--- mc/3D/CitcomS/trunk/visual/estimate.py	2006-10-14 00:06:56 UTC (rev 4997)
+++ mc/3D/CitcomS/trunk/visual/estimate.py	2006-10-14 00:27:09 UTC (rev 4998)
@@ -18,7 +18,7 @@
                 [ --pressure ]
                 [ --surf ]
                 [ --botm ]
-                [ --average ]
+                [ --horiz_avg ]
 
 Examples:
 
@@ -76,7 +76,7 @@
         'pressure': False,
         'surf': False,
         'botm': False,
-        'average': False,
+        'horiz_avg': False,
     }
     caps = None
     steps = None
@@ -86,7 +86,7 @@
 
     opts, args = getopt.getopt(sys.argv[1:], "hac:t:x:y:z:",
         ['help','full','regional','caps=','steps=','nodex=','nodey=','nodez=',
-         'all','connectivity','stress','pressure','surf','botm','average'])
+         'all','connectivity','stress','pressure','surf','botm','horiz_avg'])
 
     for opt,arg in opts:
 
@@ -123,8 +123,8 @@
             out['surf'] = True
         if opt == '--botm':
             out['botm'] = True
-        if opt == '--average':
-            out['average'] = True
+        if opt == '--horiz_avg':
+            out['horiz_avg'] = True
 
     if not caps or not steps or not nodex or not nodey or not nodez:
         print "Enter the following quantities:\n"
@@ -202,7 +202,7 @@
         total += surf_total
     if out['botm']:
         total += surf_total
-    if out['average']:
+    if out['horiz_avg']:
         total += have_total
 
     hr = 33
@@ -243,11 +243,11 @@
         print "botm/velocity        %s" % ps(surf_velocity)
         print "botm/heatflux        %s" % ps(surf_heatflux)
         print "botm/topography      %s" % ps(surf_topography)
-    if out['average']:
-        print "average/coord        %s" % ps(have_coord)
-        print "average/temperature  %s" % ps(have_temp)
-        print "average/horiz_velo   %s" % ps(have_vxy)
-        print "average/vert_velo    %s" % ps(have_vz)
+    if out['horiz_avg']:
+        print "horiz_avg/coord        %s" % ps(have_coord)
+        print "horiz_avg/temperature  %s" % ps(have_temp)
+        print "horiz_avg/horiz_velo   %s" % ps(have_vxy)
+        print "horiz_avg/vert_velo    %s" % ps(have_vz)
     if True:
         print "-" * hr
         print "total                %s" % ps(total)
@@ -270,8 +270,8 @@
         print "surf          %s" % pc(surf_total,total)
     if out['botm']:
         print "botm          %s" % pc(surf_total,total)
-    if out['average']:
-        print "average       %s" % pc(have_total,total)
+    if out['horiz_avg']:
+        print "horiz_avg       %s" % pc(have_total,total)
 
 
 if __name__ == '__main__':



More information about the cig-commits mailing list