Matthew Turk avatar Matthew Turk committed 1e041ae Merge

Merging back from tip

Comments (0)

Files changed (90)

src/enzo/AdiabaticExpansionInitialize.C

 
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
  
 int AdiabaticExpansionInitialize(FILE *fptr, FILE *Outfptr,
 			       HierarchyEntry &TopGrid)
   /* Get the units so we can convert temperature later. */
  
   float DensityUnits=1, LengthUnits=1, TemperatureUnits=1, TimeUnits=1,
-    VelocityUnits=1, MassUnits=1,PressureUnits=1.,MagneticUnits=1., a=1,dadt=0;
+    VelocityUnits=1, PressureUnits=1.,MagneticUnits=1., a=1,dadt=0;
+
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, InitialTimeInCodeUnits) == FAIL) {
+	       &TimeUnits, &VelocityUnits, InitialTimeInCodeUnits) == FAIL) {
         ENZO_FAIL("Error in GetUnits.");
   }
   PressureUnits = DensityUnits * (LengthUnits/TimeUnits)*(LengthUnits/TimeUnits);
  
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
  
 int CommunicationBroadcastValue(int *Value, int BroadcastProcessor);
 
     // Get the cosmology units so we can convert temperature later
  
       float DensityUnits=1, LengthUnits=1, TemperatureUnits=1, TimeUnits=1, 
-	VelocityUnits=1, MassUnits=1;
- 
+	VelocityUnits=1;
+
       if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-		   &TimeUnits, &VelocityUnits, &MassUnits, 
+		   &TimeUnits, &VelocityUnits, 
 		   InitialTimeInCodeUnits) == FAIL) {
         fprintf(stderr, "Error in GetUnits.\n");
         ENZO_FAIL("");

src/enzo/CallPython.C

 #else
     if(access("user_script.py", F_OK) == -1) return SUCCESS;
     if (LevelArray[level+1] != NULL) return SUCCESS;
+    NumberOfPythonCalls++;
+    if((NumberOfPythonCalls % PythonSubcycleSkip) != 0) return SUCCESS;
     FLOAT CurrentTime;
     int num_grids, start_index;
     num_grids = 0; start_index = 1;
   ExportParameterFile(MetaData, CurrentTime);
 
   CommunicationBarrier();
-  PyRun_SimpleString("import user_script\nuser_script.main()\n");
-
-  NumberOfPythonCalls++;
+  PyRun_SimpleString("user_script.main()\n");
 
   PyDict_Clear(grid_dictionary);
+  PyDict_Clear(old_grid_dictionary);
   PyDict_Clear(hierarchy_information);
   PyDict_Clear(yt_parameter_file);
   PyDict_Clear(conversion_factors);

src/enzo/CheckForOutput.C

 #include "CosmologyParameters.h"
  
 /* function prototypes */
-#ifdef USE_HDF5_GROUPS
+//#ifdef USE_HDF5_GROUPS
 int Group_WriteAllData(char *basename, int filenumber, HierarchyEntry *TopGrid,
 		 TopGridData &MetaData, ExternalBoundary *Exterior,
 		 FLOAT WriteTime = -1);
-#else
+//#else
+/* 
 int WriteAllData(char *basename, int filenumber, HierarchyEntry *TopGrid,
 		 TopGridData &MetaData, ExternalBoundary *Exterior,
 		 FLOAT WriteTime = -1);
-#endif
+*/
+//#endif
 
 double ReturnWallTime(void);
 
       && MetaData.dtDataDump > 0.0) {
     MetaData.TimeLastDataDump += MetaData.dtDataDump;
 
-#ifdef USE_HDF5_GROUPS
+    //#ifdef USE_HDF5_GROUPS
     if (Group_WriteAllData(MetaData.DataDumpName, MetaData.DataDumpNumber++,
 		     TopGrid, MetaData, Exterior) == FAIL) {
 	fprintf(stderr, "Error in Group_WriteAllData.\n");
 	ENZO_FAIL("");
     }
-#else
-    if (WriteAllData(MetaData.DataDumpName, MetaData.DataDumpNumber++,
-		     TopGrid, MetaData, Exterior) == FAIL) {
-	fprintf(stderr, "Error in WriteAllData.\n");
-	ENZO_FAIL("");
-    }
-#endif
+// #else
+//     if (WriteAllData(MetaData.DataDumpName, MetaData.DataDumpNumber++,
+// 		     TopGrid, MetaData, Exterior) == FAIL) {
+// 	fprintf(stderr, "Error in WriteAllData.\n");
+// 	ENZO_FAIL("");
+//     }
+// #endif
 
     WroteData = TRUE;
   }
       MetaData.CycleSkipDataDump > 0) {
     MetaData.CycleLastDataDump += MetaData.CycleSkipDataDump;
 
-#ifdef USE_HDF5_GROUPS
+    //#ifdef USE_HDF5_GROUPS
     if (Group_WriteAllData(MetaData.DataDumpName, MetaData.DataDumpNumber++,
 		     TopGrid, MetaData, Exterior) == FAIL) {
 	fprintf(stderr, "Error in Group_WriteAllData.\n");
 	ENZO_FAIL("");
     }
-#else
-    if (WriteAllData(MetaData.DataDumpName, MetaData.DataDumpNumber++,
-		     TopGrid, MetaData, Exterior) == FAIL) {
-	fprintf(stderr, "Error in WriteAllData.\n");
-	ENZO_FAIL("");
-    }
-#endif
+// #else
+//     if (WriteAllData(MetaData.DataDumpName, MetaData.DataDumpNumber++,
+// 		     TopGrid, MetaData, Exterior) == FAIL) {
+// 	fprintf(stderr, "Error in WriteAllData.\n");
+// 	ENZO_FAIL("");
+//     }
+// #endif
 
     WroteData = TRUE;
   }
       FractionalCPUTime*MetaData.StopCPUTime && MetaData.StartCPUTime > 0) {
     MetaData.CycleLastDataDump = MetaData.CycleNumber;
     if (debug) printf("CPUtime-based output!\n");
-#ifdef USE_HDF5_GROUPS
+//#ifdef USE_HDF5_GROUPS
     if (Group_WriteAllData(MetaData.DataDumpName, MetaData.DataDumpNumber++,
 		     TopGrid, MetaData, Exterior) == FAIL) {
 	fprintf(stderr, "Error in Group_WriteAllData.\n");
 	ENZO_FAIL("");
     }
-#else
-    if (WriteAllData(MetaData.DataDumpName, MetaData.DataDumpNumber++,
-		     TopGrid, MetaData, Exterior) == FAIL) {
-	fprintf(stderr, "Error in WriteAllData.\n");
-	ENZO_FAIL("");
-    }
-#endif
+// #else
+//     if (WriteAllData(MetaData.DataDumpName, MetaData.DataDumpNumber++,
+// 		     TopGrid, MetaData, Exterior) == FAIL) {
+// 	fprintf(stderr, "Error in WriteAllData.\n");
+// 	ENZO_FAIL("");
+//     }
+// #endif
     WroteData = TRUE;
   } // ENDIF
 
 	    Number = -1;  // Don't append number (####) to end of name
 	  }
 
-#ifdef USE_HDF5_GROUPS
+	  //#ifdef USE_HDF5_GROUPS
 	  if (Group_WriteAllData(Name, Number, TopGrid, MetaData, Exterior) == FAIL) {
 	    fprintf(stderr, "Error in Group_WriteAllData.\n");
 	    ENZO_FAIL("");
 	  }
-#else
-	  if (WriteAllData(Name, Number, TopGrid, MetaData, Exterior) == FAIL) {
-	    fprintf(stderr, "Error in WriteAllData.\n");
-	    ENZO_FAIL("");
-	  }
-#endif
+// #else
+// 	  if (WriteAllData(Name, Number, TopGrid, MetaData, Exterior) == FAIL) {
+// 	    fprintf(stderr, "Error in WriteAllData.\n");
+// 	    ENZO_FAIL("");
+// 	  }
+// #endif
 
 	  WroteData = TRUE;
 	}

src/enzo/CoolingTestInitialize.C

 
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
  
 int CoolingTestInitialize(FILE *fptr, FILE *Outfptr, HierarchyEntry &TopGrid,
 			  TopGridData &MetaData)
   TestProblemData.UseMetallicityField = 1;
 
   float DensityUnits=1, LengthUnits=1, TemperatureUnits=1, TimeUnits=1,
-    VelocityUnits=1, MassUnits=1;
+    VelocityUnits=1;
 
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, 0.0) == FAIL) {
+	       &TimeUnits, &VelocityUnits, 0.0) == FAIL) {
     fprintf(stderr, "Error in GetUnits.\n");
     return FAIL;
   }

src/enzo/EvolveHierarchy.C

  
   if ((MetaData.dtDataDump != 0.0 || MetaData.CycleSkipDataDump != 0) &&
       !WroteData)
-#ifdef USE_HDF5_GROUPS
+    //#ifdef USE_HDF5_GROUPS
     if (Group_WriteAllData(MetaData.DataDumpName, MetaData.DataDumpNumber,
 		     &TopGrid, MetaData, Exterior, -666) == FAIL) {
       fprintf(stderr, "Error in Group_WriteAllData.\n");
       ENZO_FAIL("");
     }
-#else
-    if (WriteAllData(MetaData.DataDumpName, MetaData.DataDumpNumber,
-		     &TopGrid, MetaData, Exterior, -666) == FAIL) {
-      fprintf(stderr, "Error in WriteAllData.\n");
-      ENZO_FAIL("");
-    }
-#endif
+// #else
+//     if (WriteAllData(MetaData.DataDumpName, MetaData.DataDumpNumber,
+// 		     &TopGrid, MetaData, Exterior, -666) == FAIL) {
+//       fprintf(stderr, "Error in WriteAllData.\n");
+//       ENZO_FAIL("");
+//     }
+// #endif
  
   if (NumberOfProcessors > 1)
     printf("Communication: processor %"ISYM" CommunicationTime = %"FSYM"\n",

src/enzo/ExternalBoundary_ReadExternalBoundary.C

 	    if (io_log) fprintf(log_fptr, "H5Dread boundary type: %"ISYM"\n", h5_status);
 
 	    if( h5_status == h5_error ){	      
-	      for (int k=0;k<size;k++) buffer[size] = 0;
+	      for (int k=0;k<size;k++) buffer[size] = BoundaryType[0][dim][i][j];
 	      fprintf(stderr,"ExternaBoundary::ReadExternalBoundary Had trouble reading ExternalBoudnary values: field: %i\n", field);
-	      fprintf(stderr,"Continue and hope for th best.\n");
+	      fprintf(stderr,"Continue and hope for the best.\n");
 	    }
 
 #ifdef OOC_BOUNDARY

src/enzo/ExternalBoundary_SetExternalBoundaryIO.C

 int READ_BT(boundary_type *bt_buffer, int field, int dim, int face, int slabsize, int BoundaryDimension[], int BoundaryRank, int Nfields);
 int READ_BV(float         *bv_buffer, int field, int dim, int face, int slabsize, int BoundaryDimension[], int BoundaryRank, int Nfields);
 
-
-
  
 // This is used to set the corners (which are not really used) of the
 //   grid to something reasonable in the case of periodic B.C.'s
   for (dim = 0; dim < BoundaryRank; dim++)
     if (BoundaryDimension[dim] != 1) {
       if (BoundaryType[field][dim][0] == NULL) {
-	fprintf(stderr, "BoundaryType not yet declared.\n");
+	fprintf(stderr, "BoundaryType not yet declared for field: %i.\n", field);
 	ENZO_FAIL("");
       }
     }
 	  default:
 	    fprintf(stderr, "BoundaryType %"ISYM" not recognized (z-right).\n",
 		    BoundaryType[field][2][1][bindex]);
+            fprintf(stderr, "field %"ISYM" dim %"ISYM"\n",field, dim);
+
 	    ENZO_FAIL("");
 	  }
 

src/enzo/FOF_Initialize.C

 
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, double *MassUnits, FLOAT Time);
 int CosmologyComputeExpansionFactor(FLOAT time, FLOAT *a, FLOAT *dadt);
 int SysMkdir (char *startDir, char *directory);
 
   /* Get enzo units */
 
   float TemperatureUnits, DensityUnits, LengthUnits, 
-    VelocityUnits, TimeUnits, MassUnits;
+    VelocityUnits, TimeUnits;
+  double MassUnits=1;
 
   GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
 	   &TimeUnits, &VelocityUnits, &MassUnits, MetaData->Time);
   int TopGridDims3 = MetaData->TopGridDims[0] * MetaData->TopGridDims[1] * 
     MetaData->TopGridDims[2];
 
-  double EnzoMassUnits = (double) DensityUnits * pow(LengthUnits, 3.0) /
-    TopGridDims3;
+  //  double EnzoMassUnits = (double) DensityUnits * pow(LengthUnits, 3.0) /
+  //  TopGridDims3;
 
   // Copy other cosmology parameters
   D.Omega = OmegaMatterNow;
     for (Temp = LevelArray[level], GridNum = 0; Temp; 
 	 Temp = Temp->NextGridThisLevel, GridNum++) {
       Temp->GridData->MoveParticlesFOF(level, GridNum, Plocal, Index, D,
-				       VelocityUnits, EnzoMassUnits, COPY_OUT);
+				       VelocityUnits, MassUnits, COPY_OUT);
       //Temp->GridData->SetNumberOfParticles(0);
     }
 

src/enzo/GetUnits.C

 
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time)
+	     float *VelocityUnits, double *MassUnits, FLOAT Time)
 
 {
   /* If using cosmology, get cosmology units */

src/enzo/Grid_AddH2Dissociation.C

 
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 
 int grid::AddH2Dissociation(Star *AllStars)
 {
   /* If using cosmology, get units. */
 
   float TemperatureUnits, DensityUnits, LengthUnits, VelocityUnits, 
-    TimeUnits, MassUnits, aUnits = 1;
+    TimeUnits, aUnits = 1;
 
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, PhotonTime) == FAIL) {
+	       &TimeUnits, &VelocityUnits, PhotonTime) == FAIL) {
     fprintf(stderr, "Error in GetUnits.\n");
     ENZO_FAIL("");
   }

src/enzo/Grid_ApplyTimeAction.C

  
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
  
  
  
   /* Get the cosmology units so we can convert temperature later. */
  
   float DensityUnits=1, LengthUnits=1, TemperatureUnits=1, TimeUnits=1,
-    VelocityUnits=1, MassUnits=1;
+    VelocityUnits=1;
+
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, 
+	       &TimeUnits, &VelocityUnits,
 	       InitialTimeInCodeUnits) == FAIL) {
     fprintf(stderr, "Error in GetUnits.\n");
     ENZO_FAIL("");

src/enzo/Grid_CollapseTestInitializeGrid.C

 
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 int CosmologyComputeExpansionFactor(FLOAT time, FLOAT *a, FLOAT *dadt);
 float gasdev();
 
   const double Mpc = 3.0856e24, SolarMass = 1.989e33, GravConst = 6.67e-8,
     pi = 3.14159, mh = 1.67e-24, kboltz = 1.381e-16, LightSpeed = 2.9979e10;
   float DensityUnits, LengthUnits, TemperatureUnits, TimeUnits, 
-    VelocityUnits, MassUnits, CriticalDensity = 1, BoxLength = 1, mu = 0.6;
+    VelocityUnits, CriticalDensity = 1, BoxLength = 1, mu = 0.6;
+
   FLOAT a, dadt, ExpansionFactor = 1;
   GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits, &TimeUnits, 
-	   &VelocityUnits, &MassUnits, Time);
+	   &VelocityUnits, Time);
   if (ComovingCoordinates) {
     CosmologyComputeExpansionFactor(Time, &a, &dadt);
     ExpansionFactor = a/(1.0+InitialRedshift);

src/enzo/Grid_ComputeCoolingTime.C

 int CosmologyComputeExpansionFactor(FLOAT time, FLOAT *a, FLOAT *dadt);
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 int RadiationFieldCalculateRates(FLOAT Time);
 int FindField(int field, int farray[], int numfields);
 
  
   FLOAT a = 1.0, dadt;
   float TemperatureUnits = 1, DensityUnits = 1, LengthUnits = 1,
-    VelocityUnits = 1, TimeUnits = 1, MassUnits = 1, aUnits = 1;
+    VelocityUnits = 1, TimeUnits = 1, aUnits = 1;
+
   GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	   &TimeUnits, &VelocityUnits, &MassUnits, Time);
+	   &TimeUnits, &VelocityUnits, Time);
   if (ComovingCoordinates) {
     CosmologyComputeExpansionFactor(Time+0.5*dtFixed, &a, &dadt);
  

src/enzo/Grid_ComputeElementalDensity.C

 int FindField(int f, int farray[], int n);
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
  
 static int TableRead = FALSE;
 static float *LookupTable, *TableDensity, *TableTemperature;
   /* Find the temperature units if we are using comoving coordinates. */
  
   float DensityUnits=1, LengthUnits=1, VelocityUnits=1, TimeUnits=1,
-    TemperatureUnits=1, MassUnits=1;
+    TemperatureUnits=1;
+
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, Time) == FAIL) {
+	       &TimeUnits, &VelocityUnits, Time) == FAIL) {
     fprintf(stderr, "Error in GetUnits.\n");
     ENZO_FAIL("");
   }

src/enzo/Grid_ComputeLuminosity.C

 int CosmologyComputeExpansionFactor(FLOAT time, FLOAT *a, FLOAT *dadt);
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 int RadiationFieldCalculateRates(FLOAT Time);
 int FindField(int field, int farray[], int numfields);
 extern "C" void FORTRAN_NAME(cool_multi_lum)(
 
   FLOAT a = 1.0, dadt;
   float TemperatureUnits, DensityUnits, LengthUnits, VelocityUnits, 
-    TimeUnits, MassUnits, aUnits = 1;    
+    TimeUnits, aUnits = 1;
   GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	   &TimeUnits, &VelocityUnits, &MassUnits, Time);
+	   &TimeUnits, &VelocityUnits, Time);
   if (ComovingCoordinates) {
     CosmologyComputeExpansionFactor(Time+0.5*dtFixed, &a, &dadt);
     aUnits = 1.0/(1.0 + InitialRedshift);

src/enzo/Grid_ComputePressure.C

  
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
  
 int grid::ComputePressure(FLOAT time, float *pressure)
 {
  
     float TemperatureUnits=1, number_density, nH2, GammaH2Inverse,
       GammaInverse = 1.0/(Gamma-1.0), x, Gamma1, temp;
-    float DensityUnits=1, LengthUnits=1, VelocityUnits=1, TimeUnits=1, 
-      MassUnits=1;
+    float DensityUnits=1, LengthUnits=1, VelocityUnits=1, TimeUnits=1; 
  
     /* Find Multi-species fields. */
  
     /* Find the temperature units. */
  
     if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-		 &TimeUnits, &VelocityUnits, &MassUnits, Time) == FAIL) {
+		 &TimeUnits, &VelocityUnits, Time) == FAIL) {
       fprintf(stderr, "Error in GetUnits.\n");
       ENZO_FAIL("");
     }

src/enzo/Grid_ComputePressureDualEnergyFormalism.C

  
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
  
 int grid::ComputePressureDualEnergyFormalism(FLOAT time, float *pressure)
 {
  
     float TemperatureUnits = 1, number_density, nH2, GammaH2Inverse,
       GammaInverse = 1.0/(Gamma-1.0), x, Gamma1, temp;
-    float DensityUnits=1, LengthUnits=1, VelocityUnits=1, TimeUnits=1, 
-      MassUnits=1;
+    float DensityUnits=1, LengthUnits=1, VelocityUnits=1, TimeUnits=1; 
  
     /* Find Multi-species fields. */
  
     /* Find the temperature units. */
  
     if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-		 &TimeUnits, &VelocityUnits, &MassUnits, Time) == FAIL) {
+		 &TimeUnits, &VelocityUnits, Time) == FAIL) {
       fprintf(stderr, "Error in GetUnits.\n");
       ENZO_FAIL("");
     }

src/enzo/Grid_ComputeRT_TimeStep.C

 int CosmologyComputeExpansionFactor(FLOAT time, FLOAT *a, FLOAT *dadt);
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 extern "C" void FORTRAN_NAME(calc_dt)(
                   int *rank, int *idim, int *jdim, int *kdim,
                   int *i1, int *i2, int *j1, int *j2, int *k1, int *k2,
 
   /* If using cosmology, get units. */
 
-  float TemperatureUnits, DensityUnits, LengthUnits, 
-    MassUnits, VelocityUnits, TimeUnits, aUnits = 1;
+  float TemperatureUnits, DensityUnits, LengthUnits, VelocityUnits, TimeUnits, aUnits = 1;
 
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, Time) == FAIL) {
+	       &TimeUnits, &VelocityUnits, Time) == FAIL) {
     fprintf(stderr, "Error in GetUnits.\n");
     ENZO_FAIL("");
   }

src/enzo/Grid_ComputeTemperatureField.C

 int FindField(int f, int farray[], int n);
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
  
  
 int grid::ComputeTemperatureField(float *temperature)
   }
  
   float TemperatureUnits = 1, number_density;
-  float DensityUnits=1, LengthUnits=1, VelocityUnits=1, TimeUnits=1, 
-    MassUnits=1;
+  float DensityUnits=1, LengthUnits=1, VelocityUnits=1, TimeUnits=1;
  
   /* Find the temperature units. */
  
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, Time) == FAIL) {
+	       &TimeUnits, &VelocityUnits, Time) == FAIL) {
     fprintf(stderr, "Error in GetUnits.\n");
     ENZO_FAIL("");
   }

src/enzo/Grid_ComputeTimeStep.C

 int CosmologyComputeExpansionFactor(FLOAT time, FLOAT *a, FLOAT *dadt);
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 extern "C" void FORTRAN_NAME(calc_dt)(
                   int *rank, int *idim, int *jdim, int *kdim,
                   int *i1, int *i2, int *j1, int *j2, int *k1, int *k2,
   /* 6) If star formation, set a minimum timestep */
 
   float TemperatureUnits, DensityUnits, LengthUnits, 
-    VelocityUnits, TimeUnits, MassUnits, aUnits = 1;
+    VelocityUnits, TimeUnits, aUnits = 1;
 
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, Time) == FAIL) {
+	       &TimeUnits, &VelocityUnits, Time) == FAIL) {
     fprintf(stderr, "Error in GetUnits.\n");
     ENZO_FAIL("");
   }

src/enzo/Grid_ComputeXrayEmissivity.C

 int CosmologyComputeExpansionFactor(FLOAT time, FLOAT *a, FLOAT *dadt);
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
  
 /* The following variables are used only in computing the emissivity,
    and are read in from the specified file which is created with a
   }
  
   float DensityUnits=1, LengthUnits=1, VelocityUnits=1, TimeUnits=1,
-    TemperatureUnits=1, MassUnits=1, CurrentRedshift = 1.0;
+    TemperatureUnits=1, CurrentRedshift = 1.0;
   FLOAT a, dadt;
  
   /* Find the temperature units. */
   
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, Time) == FAIL) {
+	       &TimeUnits, &VelocityUnits, Time) == FAIL) {
     fprintf(stderr, "Error in GetUnits.\n");
     ENZO_FAIL("");
   }

src/enzo/Grid_ConvertToNumpy.C

             dataset = (PyArrayObject *) PyArray_SimpleNewFromData(
                     3, dims, ENPY_FLOAT, BaryonField[field]);
             dataset->flags &= ~NPY_OWNDATA;
-            field_name = PyString_FromString(DataLabel[field]);
-            PyDict_SetItem(grid_data, field_name, (PyObject*) dataset);
+            PyDict_SetItemString(grid_data, DataLabel[field], (PyObject*) dataset);
             Py_DECREF(dataset);
 
+			/* Now the old grid data */
             dataset = (PyArrayObject *) PyArray_SimpleNewFromData(
                     3, dims, ENPY_FLOAT, OldBaryonField[field]);
-            field_name = PyString_FromString(DataLabel[field]);
-            PyDict_SetItem(grid_data, field_name, (PyObject*) dataset);
+            dataset->flags &= ~NPY_OWNDATA;
+            PyDict_SetItemString(old_grid_data, DataLabel[field], (PyObject*) dataset);
             Py_DECREF(dataset);
-            PyDict_SetItem(old_grid_data, field_name, (PyObject*) dataset);
         }
 
         grid_id = PyLong_FromLong((long) GridID);
         PyDict_SetItem(grid_dictionary, grid_id, grid_data);
-        PyDict_SetItem(old_grid_dictionary, grid_id, grid_data);
+        PyDict_SetItem(old_grid_dictionary, grid_id, old_grid_data);
         /* New reference from setting, so we decref */
         Py_DECREF(grid_data);
         Py_DECREF(old_grid_data);
+        Py_DECREF(grid_id); /* Decref our grid_id */
 
     }
     int j = 0;

src/enzo/Grid_CoolingTestInitializeGrid.C

 
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 
 int grid::CoolingTestInitializeGrid()
 {
   // Get the units so we can convert temperature later
  
   float DensityUnits=1, LengthUnits=1, TemperatureUnits=1, TimeUnits=1,
-    VelocityUnits=1, MassUnits=1;
+    VelocityUnits=1;
  
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, 
+	       &TimeUnits, &VelocityUnits,
 	       Time) == FAIL) {
     fprintf(stderr, "Error in GetUnits.\n");
     return FAIL;

src/enzo/Grid_CoolingTestResetEnergies.C

 
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 
 int grid::CoolingTestResetEnergies()
 {
   float mu;
 
   float TemperatureUnits = 1, DensityUnits = 1, LengthUnits = 1,
-    VelocityUnits = 1, TimeUnits = 1, MassUnits = 1, aUnits = 1;
- 
+    VelocityUnits = 1, TimeUnits = 1, aUnits = 1;
+
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, Time) == FAIL) {
+	       &TimeUnits, &VelocityUnits, Time) == FAIL) {
     fprintf(stderr, "Error in GetUnits.\n");
     return FAIL;
   }

src/enzo/Grid_CosmologyInitializeParticles.C

 
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 
 int ReadFile(char *name, int Rank, int Dim[], int StartIndex[],
 	     int EndIndex[], int BufferOffset[], float *buffer,
   bool OneComponentPerFile;
 
   float DensityUnits=1, LengthUnits=1, TemperatureUnits=1, TimeUnits=1,
-    VelocityUnits=1, MassUnits=1;
+    VelocityUnits=1;
+
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits,
+	       &TimeUnits, &VelocityUnits,
 	       InitialTimeInCodeUnits) == FAIL) {
     fprintf(stderr, "Error in GetUnits.\n");
     ENZO_FAIL("");

src/enzo/Grid_CosmologySimulationInitializeGrid.C

  
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
  
 int CommunicationBroadcastValue(int *Value, int BroadcastProcessor);
 
   // Get the cosmology units so we can convert temperature later
  
   float DensityUnits=1, LengthUnits=1, TemperatureUnits=1, TimeUnits=1,
-    VelocityUnits=1, MassUnits=1;
+    VelocityUnits=1;
  
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, 
+	       &TimeUnits, &VelocityUnits,
 	       InitialTimeInCodeUnits) == FAIL) {
     fprintf(stderr, "Error in GetUnits.\n");
     ENZO_FAIL("");

src/enzo/Grid_ElectronFractionEstimate.C

 int CosmologyComputeExpansionFactor(FLOAT time, FLOAT *a, FLOAT *dadt);
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 
 int grid::ElectronFractionEstimate(float dt)
 {
   /* If using cosmology, get units. */
 
   float TemperatureUnits, DensityUnits, LengthUnits, 
-        MassUnits, VelocityUnits, TimeUnits, aUnits = 1;
+        VelocityUnits, TimeUnits, aUnits = 1;
   FLOAT a = 1.0, dadt;
 
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, Time) == FAIL) {
+	       &TimeUnits, &VelocityUnits, Time) == FAIL) {
     fprintf(stderr, "Error in GetUnits.\n");
     ENZO_FAIL("");
   }

src/enzo/Grid_FinalizeRadiationFields.C

 
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 
 int grid::FinalizeRadiationFields(void)
 {
   /* Get units. */
 
   float LengthUnits, TimeUnits, TemperatureUnits, VelocityUnits, 
-    MassUnits, DensityUnits; 
+    DensityUnits; 
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, PhotonTime) == FAIL) {
+	       &TimeUnits, &VelocityUnits, PhotonTime) == FAIL) {
     fprintf(stdout, "Error in GetUnits.\n");
     ENZO_FAIL("");
   }

src/enzo/Grid_FlagCellsToBeRefinedByJeansLength.C

  
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
  
  
 int grid::FlagCellsToBeRefinedByJeansLength()
   /* Get density units. */
  
   float DensityUnits=1, LengthUnits=1, VelocityUnits=1, TimeUnits=1,
-    TemperatureUnits=1, MassUnits=1;
+    TemperatureUnits=1;
+
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, Time) == FAIL) {
+	       &TimeUnits, &VelocityUnits, Time) == FAIL) {
     fprintf(stderr, "Error in GetUnits.\n");
     ENZO_FAIL("");
   }

src/enzo/Grid_FlagCellsToBeRefinedByOpticalDepth.C

 
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 
 #define MAX_TAU 1
 
   /* Get density units. */
 
   float DensityUnits, LengthUnits, VelocityUnits, TimeUnits,
-        MassUnits, TemperatureUnits;
+        TemperatureUnits;
+
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, Time) == FAIL) {
+	       &TimeUnits, &VelocityUnits, Time) == FAIL) {
     fprintf(stderr, "Error in GetUnits.\n");
     ENZO_FAIL("");
   }

src/enzo/Grid_GetEnclosedMass.C

 
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 
 int grid::GetEnclosedMass(Star *star, float radius, float &mass,
 			  float &metallicity, float &coldgas_mass, 
 
   const double Msun = 1.989e33;
   float DensityUnits, LengthUnits, TemperatureUnits, 
-    TimeUnits, MassUnits, VelocityUnits;
+    TimeUnits, VelocityUnits;
+
   GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits, &TimeUnits, 
-	   &VelocityUnits, &MassUnits, Time);
+	   &VelocityUnits, Time);
 
   float CellWidthTemp = float(CellWidth[0][0]);
 

src/enzo/Grid_Group_ReadGrid.C

 	divB = new float[activesize];
       
       /* if we restart from a different solvers output without a Phi Field create here and set to zero */
-      int PhiNum; 
-      if ((PhiNum = FindField(PhiField, FieldType, NumberOfBaryonFields)) < 0) {
-	char *PhiName = "Phi";
-	PhiNum=NumberOfBaryonFields++;
-	FieldType[PhiNum] = PhiField;
-	DataLabel[PhiNum] = PhiName;
-	BaryonField[PhiNum] = new float[size];
-      for (int n = 0; n < size; n++) BaryonField[PhiNum][n] = 0.0;
-      }
+    int PhiNum; 
+    if ((PhiNum = FindField(PhiField, FieldType, NumberOfBaryonFields)) < 0) {
+      fprintf(stderr, "Starting with Dedner MHD method with no Phi field. \n");
+      fprintf(stderr, "Adding it in Grid_ReadGrid.C \n");
+      char *PhiName = "Phi";
+      PhiNum = NumberOfBaryonFields;
+      int PhiToAdd = PhiField;
+      this->AddFields(&PhiToAdd, 1);
+      DataLabel[PhiNum] = PhiName;
+    }
       
       for (int dim = 0; dim < 3; dim++)
 	if (gradPhi[dim] == NULL)

src/enzo/Grid_Group_WriteGrid.C

 
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 
 int grid::Group_WriteGrid(FILE *fptr, char *base_name, int grid_id, HDF5_hid_t file_id)
 {
       float *cooling_time = new float[size];
  
       float TemperatureUnits = 1, DensityUnits = 1, LengthUnits = 1,
-	VelocityUnits = 1, TimeUnits = 1, MassUnits = 1, aUnits = 1;
+	VelocityUnits = 1, TimeUnits = 1, aUnits = 1;
+
       GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, Time);
+	       &TimeUnits, &VelocityUnits, Time);
 
       if (this->ComputeCoolingTime(cooling_time) == FAIL) {
 	fprintf(stderr, "Error in grid->ComputeCoolingTime.\n");

src/enzo/Grid_InitializeSource.C

 
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 
 #define MAX_RADIUS 5
 
   /* Get units. */
 
   float LengthUnits, TimeUnits, TemperatureUnits, VelocityUnits, 
-    MassUnits, DensityUnits; 
+    DensityUnits; 
 
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, Time) == FAIL) {
+	       &TimeUnits, &VelocityUnits, Time) == FAIL) {
     fprintf(stdout, "Error in GetUnits.\n");
     ENZO_FAIL("");
   }

src/enzo/Grid_InterpolateParticlesToGrid.C

 int FindField(int field, int farray[], int numfields);
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 int CosmologyComputeExpansionFactor(FLOAT time, FLOAT *a, FLOAT *dadt);
 
 #ifdef USE_MPI
     float *r2list = NULL;
     int *ngblist = NULL;
 
+
     int slab, ind, ik, SlabStartIndex, SlabEndIndex, index;
     FLOAT SlabLeftEdge, SlabRightEdge;
     double CellPos[MAX_DIMENSION];
 
     FLOAT a, dadt, CurrentRedshift = 0.0;
     float LengthUnits, TimeUnits, TemperatureUnits, VelocityUnits, 
-      MassUnits, DensityUnits, LengthConversion;
+      DensityUnits, LengthConversion;
     float UnitConversion[MAX_NUMBER_OF_BARYON_FIELDS];
 
 
 
     // Get units
     GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	     &TimeUnits, &VelocityUnits, &MassUnits, Time);
+	     &TimeUnits, &VelocityUnits, Time);
     if (ComovingCoordinates) {
       CosmologyComputeExpansionFactor(Time, &a, &dadt);
       CurrentRedshift = (1 + InitialRedshift)/a - 1;

src/enzo/Grid_MirrorStarParticles.C

 
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 
 int grid::MirrorStarParticles(void)
 {
   Star *cstar;
 
   float DensityUnits, LengthUnits, TemperatureUnits, TimeUnits,
-    VelocityUnits, MassUnits;
+    VelocityUnits;
   GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	   &TimeUnits, &VelocityUnits, &MassUnits, Time);
+	   &TimeUnits, &VelocityUnits, Time);
 
   MassConversion = (float) (double(LengthUnits*CellWidth[0][0]) *
 			    double(LengthUnits*CellWidth[0][0]) *

src/enzo/Grid_NestedCosmologySimulationInitializeGrid.C

  
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, double *MassUnits, FLOAT Time);
  
 int CommunicationBroadcastValue(int *Value, int BroadcastProcessor);
  
   // Get the units so we can convert temperature later
  
   float DensityUnits=1, LengthUnits=1, TemperatureUnits=1, TimeUnits=1,
-    VelocityUnits=1, MassUnits=1;
+    VelocityUnits=1;
+  double MassUnits=1;
  
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
 	       &TimeUnits, &VelocityUnits, &MassUnits, 

src/enzo/Grid_OutputAsParticleData.C

  
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 int CosmologyComputeExpansionFactor(FLOAT time, FLOAT *a, FLOAT *dadt);
  
  
   float DensityConversion = 1, VelocityConversion = 1;
   FLOAT a = 1, dadt;
   float TemperatureUnits=1, DensityUnits=1, LengthUnits=1, VelocityUnits=1, 
-    TimeUnits=1, MassUnits=1;
+    TimeUnits=1;
+
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, Time) == FAIL) {
+	       &TimeUnits, &VelocityUnits, Time) == FAIL) {
     fprintf(stderr, "Error in GetUnits.\n");
     ENZO_FAIL("");
   }

src/enzo/Grid_OutputStarParticleInformation.C

  
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
  
 int grid::OutputStarParticleInformation(FILE *StarFile)
 {
  
   float MassConversion = CellVolume;
   float TemperatureUnits=1, DensityUnits=1, LengthUnits=1, VelocityUnits=1, 
-    TimeUnits=1, MassUnits=1;
+    TimeUnits=1;
+
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, Time) == FAIL) {
+	       &TimeUnits, &VelocityUnits, Time) == FAIL) {
     fprintf(stderr, "Error in GetUnits.\n");
     ENZO_FAIL("");
   }

src/enzo/Grid_PhotonTestInitializeGrid.C

 
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 int CosmologyComputeExpansionFactor(FLOAT time, FLOAT *a, FLOAT *dadt);
 float ph_gasdev();
 
   const double Mpc = 3.0856e24, SolarMass = 1.989e33, GravConst = 6.67e-8,
                pi = 3.14159, mh = 1.67e-24, kboltz = 1.381e-16;
   float DensityUnits, LengthUnits, TemperatureUnits, TimeUnits, 
-    MassUnits, VelocityUnits, CriticalDensity = 1, BoxLength = 1, mu = 0.6;
+    VelocityUnits, CriticalDensity = 1, BoxLength = 1, mu = 0.6;
+
   FLOAT a, dadt, ExpansionFactor = 1;
   GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	   &TimeUnits, &VelocityUnits, &MassUnits, Time);
+	   &TimeUnits, &VelocityUnits, Time);
   if (ComovingCoordinates) {
     CosmologyComputeExpansionFactor(Time, &a, &dadt);
     ExpansionFactor = a/(1.0+InitialRedshift);

src/enzo/Grid_ProjectToPlane.C

           int *npstart, int *npend, float *fracleft, float *fracright);
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 int FindField(int field, int farray[], int numfields);
  
  
   float DensityConversion, XrayConversion, TempXrayConversion;
   DensityConversion = XrayConversion = TempXrayConversion = CellLength;
   float TemperatureUnits = 1, DensityUnits = 1, LengthUnits = 1,
-    VelocityUnits = 1, TimeUnits = 1, MassUnits = 1;
+    VelocityUnits = 1, TimeUnits = 1;
+
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, Time) == FAIL) {
+	       &TimeUnits, &VelocityUnits, Time) == FAIL) {
     fprintf(stderr, "Error in GetUnits.\n");
     ENZO_FAIL("");
   }

src/enzo/Grid_RadiationComputeDensities.C

 int CosmologyComputeExpansionFactor(FLOAT time, FLOAT *a, FLOAT *dadt);
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
  
 int grid::RadiationComputeDensities(int level)
 {
   /* Get units. */
  
   float DensityUnits = 1, LengthUnits = 1,
-    TemperatureUnits = 1, TimeUnits = 1, VelocityUnits = 1, MassUnits = 1;
+    TemperatureUnits = 1, TimeUnits = 1, VelocityUnits = 1;
+
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, Time) == FAIL) {
+	       &TimeUnits, &VelocityUnits, Time) == FAIL) {
     fprintf(stderr, "Error in GetUnits.\n");
     ENZO_FAIL("");
   }

src/enzo/Grid_ReadGrid.C

       if (fscanf(fptr, "GravityBoundaryType = %"ISYM"\n",&GravityBoundaryType) != 1) {
 		ENZO_FAIL("Error reading GravityBoundaryType.");
       }
+
     // If HierarchyFile has different Ghostzones 
     // (useful in a restart with different hydro/mhd solvers) 
     int ghosts =DEFAULT_GHOST_ZONES;
     if (GridStartIndex[0] != ghosts)  {
-	if (GridID < 2)      fprintf(stderr,"Grid_ReadGrid: Adjusting Ghostzones which in the hierarchy file did not match the selected HydroMethod.\n");
+      if (GridID < 2) fprintf(stderr,"Grid_ReadGrid: Adjusting Ghostzones which in the hierarchy file did not match the selected HydroMethod.\n");
       
       for (dim=0; dim < GridRank; dim++) {
 	GridDimension[dim]  = GridEndIndex[dim]-GridStartIndex[dim]+1+2*ghosts;
 	GridStartIndex[dim] = ghosts;
 	GridEndIndex[dim]   = GridStartIndex[dim]+GridDimension[dim]-1-2*ghosts;
 	if (GridID < 2) fprintf(stderr, "dim: GridStart,GridEnd,GridDim:  %i: %i %i %i\n",
-				 dim, GridStartIndex[dim], GridEndIndex[dim], GridDimension[dim]);
+				dim, GridStartIndex[dim], GridEndIndex[dim], GridDimension[dim]);
       }
     } // end Adjusting Grid Size with different Ghostzones
-  }
+  } /* end if (ReadText) */
 
 
-  if (HydroMethod == MHD_RK) {
-
-    int activesize = 1;
-    for (int dim = 0; dim < GridRank; dim++)
-      activesize *= (GridDimension[dim]-2*DEFAULT_GHOST_ZONES);
-    
-    if (divB == NULL) 
-      divB = new float[activesize];
-
-    /* if we restart from a a different solvers output without a Phi Field create here and set to zero */
-    int PhiNum; 
-    if ((PhiNum = FindField(PhiField, FieldType, NumberOfBaryonFields)) < 0) {
-      char *PhiName = "Phi";
-      PhiNum=NumberOfBaryonFields++;
-      FieldType[PhiNum] = PhiField;
-      DataLabel[PhiNum] = PhiName;
-      BaryonField[PhiNum] = new float[size];
-      for (int n = 0; n < size; n++) BaryonField[PhiNum][n] = 0.0;
-    }
-
-    for (int dim = 0; dim < 3; dim++)
-      if (gradPhi[dim] == NULL)
-	gradPhi[dim] = new float[activesize];
-
-    for (int dim = GridRank; dim < 3; dim++)
-      for (int n = 0; n < activesize; n++)
-	gradPhi[dim][n] = 0.0;
-
-  } /* if HydroMethod == MHD */
 
   this->PrepareGridDerivedQuantities();
  
       delete [] temp;
  
     }  // end: if (MyProcessorNumber == ProcessorNumber)
+
+  if (HydroMethod == MHD_RK) {
+
+    int activesize = 1;
+    for (int dim = 0; dim < GridRank; dim++)
+      activesize *= (GridDimension[dim]-2*DEFAULT_GHOST_ZONES);
+    
+    if (divB == NULL) 
+      divB = new float[activesize];
+
+    /* if we restart from a a different solvers output without a Phi Field create here and set to zero */
+    int PhiNum; 
+    if ((PhiNum = FindField(PhiField, FieldType, NumberOfBaryonFields)) < 0) {
+      fprintf(stderr, "Starting with Dedner MHD method with no Phi field. \n");
+      fprintf(stderr, "Adding it in Grid_ReadGrid.C \n");
+      char *PhiName = "Phi";
+      PhiNum = NumberOfBaryonFields;
+      int PhiToAdd = PhiField;
+      this->AddFields(&PhiToAdd, 1);
+      DataLabel[PhiNum] = PhiName;
+    }
+
+    for (int dim = 0; dim < 3; dim++)
+      if (gradPhi[dim] == NULL)
+	gradPhi[dim] = new float[activesize];
+
+    for (int dim = GridRank; dim < 3; dim++)
+      for (int n = 0; n < activesize; n++)
+	gradPhi[dim][n] = 0.0;
+
+  } /* if HydroMethod == MHD */
+
   }  // end read baryon fields
  
   /* 3) Read particle info */

src/enzo/Grid_SolveCoupledRateEquations.C

 int CosmologyComputeExpansionFactor(FLOAT time, FLOAT *a, FLOAT *dadt);
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 int RadiationFieldCalculateRates(FLOAT Time);
 int FindField(int field, int farray[], int numfields);
 double ReturnWallTime();
   /* If using cosmology, compute the expansion factor and get units. */
 
   float TemperatureUnits = 1, DensityUnits = 1, LengthUnits = 1, 
-    VelocityUnits = 1, TimeUnits = 1, MassUnits = 1, aUnits = 1;
+    VelocityUnits = 1, TimeUnits = 1, aUnits = 1;
 
   if (ComovingCoordinates) {
 
   }
 
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, PhotonTime) == FAIL) {
+	       &TimeUnits, &VelocityUnits, PhotonTime) == FAIL) {
     fprintf(stderr, "Error in GetUnits.\n");
     ENZO_FAIL("");
   }

src/enzo/Grid_SolveRadiativeCooling.C

 int CosmologyComputeExpansionFactor(FLOAT time, FLOAT *a, FLOAT *dadt);
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 int RadiationFieldCalculateRates(FLOAT Time);
 int FindField(int field, int farray[], int numfields);
 
   /* If using cosmology, compute the expansion factor and get units. */
  
   float TemperatureUnits = 1, DensityUnits = 1, LengthUnits = 1,
-    VelocityUnits = 1, TimeUnits = 1, MassUnits = 1, aUnits = 1;
- 
+    VelocityUnits = 1, TimeUnits = 1, aUnits = 1;
+
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, Time) == FAIL) {
+	       &TimeUnits, &VelocityUnits, Time) == FAIL) {
     fprintf(stderr, "Error in GetUnits.\n");
     ENZO_FAIL("");
   }

src/enzo/Grid_SolveRateAndCoolEquations.C

 int CosmologyComputeExpansionFactor(FLOAT time, FLOAT *a, FLOAT *dadt);
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 int RadiationFieldCalculateRates(FLOAT Time);
 int FindField(int field, int farray[], int numfields);
 double ReturnWallTime();
   /* If using cosmology, compute the expansion factor and get units. */
 
   float TemperatureUnits = 1, DensityUnits = 1, LengthUnits = 1, 
-    VelocityUnits = 1, TimeUnits = 1, MassUnits = 1, aUnits = 1;
+    VelocityUnits = 1, TimeUnits = 1, aUnits = 1;
 
   if (ComovingCoordinates) {
 
   }
 
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, Time) == FAIL) {
+	       &TimeUnits, &VelocityUnits, Time) == FAIL) {
     fprintf(stderr, "Error in GetUnits.\n");
     ENZO_FAIL("");
   }

src/enzo/Grid_SolveRateEquations.C

 int FindField(int f, int farray[], int n);
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 int RadiationFieldCalculateRates(FLOAT Time);
 extern "C" void FORTRAN_NAME(solve_rate)(
 	float *de, float *HI, float *HII, float *HeI, float *HeII,
   /* If using cosmology, compute the expansion factor and get units. */
  
   float TemperatureUnits = 1, DensityUnits = 1, LengthUnits = 1,
-    VelocityUnits = 1, TimeUnits = 1, MassUnits = 1, aUnits = 1;
- 
+    VelocityUnits = 1, TimeUnits = 1, aUnits = 1;
+
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, Time) == FAIL) {
+	       &TimeUnits, &VelocityUnits, Time) == FAIL) {
     fprintf(stderr, "Error in GetUnits.\n");
     ENZO_FAIL("");
   }

src/enzo/Grid_StarParticleHandler.C

 int CosmologyComputeExpansionFactor(FLOAT time, FLOAT *a, FLOAT *dadt);
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 int FindField(int field, int farray[], int numfields);
  
 #define NO_STAR1
   /* Set the units. */
  
   float DensityUnits = 1, LengthUnits = 1, TemperatureUnits = 1,
-    TimeUnits = 1, VelocityUnits = 1, MassUnits = 1;
+    TimeUnits = 1, VelocityUnits = 1;
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, Time) == FAIL) {
+	       &TimeUnits, &VelocityUnits, Time) == FAIL) {
         ENZO_FAIL("Error in GetUnits.");
   }
  

src/enzo/Grid_TestOrbitInitializeGrid.C

 
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, double *MassUnits, FLOAT Time);
 
 int grid::TestOrbitInitializeGrid(int NumberOfTestParticles,
 				  FLOAT TestRadius,
   /* Get Units. */
 
   float TemperatureUnits = 1, DensityUnits = 1, LengthUnits = 1, 
-        VelocityUnits = 1, TimeUnits = 1, MassUnits = 1, pi = 3.1415926;
+    VelocityUnits = 1, TimeUnits = 1;
+  double MassUnits = 1;
   
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
 	       &TimeUnits, &VelocityUnits, &MassUnits, Time) == FAIL) {
   /* Compute the circular velocity, first in cgs units, and then divide
      by code units to get the correct velocity. */
 
-  double BigGee = GravitationalConstant/(4.0*pi);  // big G is the constant/4pi
+  double BigGee = GravitationalConstant/(4.0*M_PI);  // big G is the constant/4pi
   double MassCGS = CentralMass*MassUnits;
 
 /* JRT 09/13/06  replace following line by */

src/enzo/Grid_TransportPhotonPackages.C

 PhotonPackageEntry *DeletePhotonPackage(PhotonPackageEntry *PP);
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 
 int grid::TransportPhotonPackages(int level, ListOfPhotonsToMove **PhotonsToMove, 
 				  int GridNum, grid **Grids0, int nGrids0, 
   /* Get units. */
 
   float LengthUnits, TimeUnits, TemperatureUnits, VelocityUnits, 
-    MassUnits, DensityUnits; 
+    DensityUnits;
+
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, PhotonTime) == FAIL) {
+	       &TimeUnits, &VelocityUnits, PhotonTime) == FAIL) {
     fprintf(stdout, "Error in GetUnits.\n");
     ENZO_FAIL("");
   }

src/enzo/Grid_WriteGrid.C

 
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
  
 int grid::WriteGrid(FILE *fptr, char *base_name, int grid_id)
 {
       float *cooling_time = new float[size];
  
       float TemperatureUnits = 1, DensityUnits = 1, LengthUnits = 1,
-	VelocityUnits = 1, TimeUnits = 1, MassUnits = 1, aUnits = 1;
+	VelocityUnits = 1, TimeUnits = 1, aUnits = 1;
+
       GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, Time);
+	       &TimeUnits, &VelocityUnits, Time);
 
       if (this->ComputeCoolingTime(cooling_time) == FAIL) {
 	fprintf(stderr, "Error in grid->ComputeCoolingTime.\n");

src/enzo/Grid_ZeldovichPancakeInitializeGrid.C

  
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
  
  
 int grid::ZeldovichPancakeInitializeGrid(int  ZeldovichPancakeDirection,
   /* Get the cosmology units so we can convert temperature later. */
  
   float DensityUnits=1, LengthUnits=1, TemperatureUnits=1, TimeUnits=1,
-    VelocityUnits=1, MassUnits=1;
+    VelocityUnits=1;
+
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, 
+	       &TimeUnits, &VelocityUnits,
 	       InitialTimeInCodeUnits) == FAIL) {
     fprintf(stderr, "Error in GetUnits.\n");
     ENZO_FAIL("");

src/enzo/InitializeCloudyCooling.C

 
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 int CosmologyComputeExpansionFactor(FLOAT time, FLOAT *a, FLOAT *dadt);
 
 // Initialize Cloudy Cooling
   /* If using cosmology, compute the expansion factor and get units. */
 
   float TemperatureUnits = 1, DensityUnits = 1, LengthUnits = 1, 
-    VelocityUnits = 1, TimeUnits = 1, MassUnits = 1, aUnits = 1;
-
+    VelocityUnits = 1, TimeUnits = 1, aUnits = 1;
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, Time) == FAIL) {
+	       &TimeUnits, &VelocityUnits, Time) == FAIL) {
     fprintf(stderr, "Error in GetUnits.\n");
     return FAIL;
   }

src/enzo/InitializeEquilibriumCoolData.C

 /* function prototypes */
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 int CosmologyComputeExpansionFactor(FLOAT time, FLOAT *a, FLOAT *dadt);
  
 int InitializeEquilibriumCoolData(FLOAT Time)
   /* If using cosmology, compute the expansion factor and get units. */
  
   float TemperatureUnits = 1, DensityUnits = 1, LengthUnits = 1,
-    VelocityUnits = 1, TimeUnits = 1, MassUnits = 1, aUnits = 1;
- 
+    VelocityUnits = 1, TimeUnits = 1, aUnits = 1;
+
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, Time) == FAIL) {
+	       &TimeUnits, &VelocityUnits, Time) == FAIL) {
     fprintf(stderr, "Error in GetUnits.\n");
     ENZO_FAIL("");
   }

src/enzo/InitializePythonInterface.C

 
 #include <stdlib.h>
 #include <stdio.h>
+#include "ErrorExceptions.h"
 #include "macros_and_parameters.h"
 #include "typedefs.h"
 #include "global_data.h"
 
 int  GetUnits(float *DensityUnits, float *LengthUnits,
 		       float *TemperatureUnits, float *TimeUnits,
-		       float *VelocityUnits, float *MassUnits, FLOAT Time);
+		       float *VelocityUnits, FLOAT Time);
 int CosmologyComputeExpansionFactor(FLOAT time, FLOAT *a, FLOAT *dadt);
 
 int ExposeDataHierarchy(TopGridData *MetaData, HierarchyEntry *Grid, 
 {
 #undef int
 
-  //Py_SetProgramName(argv[0]);
   Py_SetProgramName("embed_enzo");
 
   Py_Initialize();
   PyObject *enzo_module, *enzo_module_dict; 
   enzo_module = Py_InitModule("enzo", _EnzoModuleMethods);
   enzo_module_dict = PyModule_GetDict(enzo_module);
-  if(enzo_module == NULL){fprintf(stderr, "Failed on Enzo Module!\n");return FAIL;}
-  if(enzo_module_dict == NULL){fprintf(stderr, "Failed on Dict!\n");return FAIL;}
+  if(enzo_module == NULL) ENZO_FAIL("Failed on Enzo Module!");
+  if(enzo_module_dict == NULL) ENZO_FAIL("Failed on Dict!");
   PyDict_SetItemString(enzo_module_dict, "grid_data", grid_dictionary);
   PyDict_SetItemString(enzo_module_dict, "old_grid_data", old_grid_dictionary);
   PyDict_SetItemString(enzo_module_dict, "hierarchy_information", hierarchy_information);
   PyDict_SetItemString(enzo_module_dict, "yt_parameter_file", yt_parameter_file);
   PyDict_SetItemString(enzo_module_dict, "conversion_factors", conversion_factors);
+  PyDict_SetItemString(enzo_module_dict, "my_processor", my_processor);
   import_array1(FAIL);
-  npy_intp flat_dimensions[1];
-  flat_dimensions[0] = (npy_intp) 5;
-  PyObject *temp = PyArray_ZEROS(1, flat_dimensions, NPY_INT, 0);
-  fprintf(stderr, "Completed initialization\n");
+  if (PyRun_SimpleString("import user_script\n")) ENZO_FAIL("Importing user_script failed!");
+  if(debug)fprintf(stdout, "Completed Python interpreter initialization\n");
   return SUCCESS;
 }
 
   /* We need: */
 
   float DensityUnits = 1, LengthUnits = 1, TemperatureUnits = 1, TimeUnits = 1,
-        VelocityUnits = 1, MassUnits;
+    VelocityUnits = 1;
 
   GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, CurrentTime);
+	       &TimeUnits, &VelocityUnits, CurrentTime);
 
   PyObject *temp_int = NULL;
   PyObject *temp_float = NULL;

src/enzo/InitializeRateData.C

 /* function prototypes */
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 int CosmologyComputeExpansionFactor(FLOAT time, FLOAT *a, FLOAT *dadt);
 int ReadMetalCoolingRates(float TemperatureUnits, float LengthUnits, 
 			  float aUnits, float DensityUnits, float TimeUnits, 
   /* If using cosmology, compute the expansion factor and get units. */
  
   float TemperatureUnits = 1, DensityUnits = 1, LengthUnits = 1,
-    VelocityUnits = 1, TimeUnits = 1, MassUnits = 1, aUnits = 1;
+    VelocityUnits = 1, TimeUnits = 1, aUnits = 1;
  
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, Time) == FAIL) {
+	       &TimeUnits, &VelocityUnits, Time) == FAIL) {
     fprintf(stderr, "Error in GetUnits.\n");
     ENZO_FAIL("");
   }

src/enzo/NCSIG7.C

  
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
  
 int CommunicationBroadcastValue(int *Value, int BroadcastProcessor);
 
     // Get the units so we can convert temperature later
  
       float DensityUnits=1, LengthUnits=1, TemperatureUnits=1, TimeUnits=1, 
-	VelocityUnits=1, MassUnits=1;
+	VelocityUnits=1;
  
       if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-		   &TimeUnits, &VelocityUnits, &MassUnits, 
+		   &TimeUnits, &VelocityUnits,  
 		   InitialTimeInCodeUnits) == FAIL) {
         fprintf(stderr, "Error in GetUnits.\n");
         ENZO_FAIL("");

src/enzo/OutputFromEvolveLevel.C

 int WriteTracerParticleData(char *basename, int filenumber,
 		   LevelHierarchyEntry *LevelArray[], TopGridData *MetaData,
 		   FLOAT WriteTime);
-#ifdef USE_HDF5_GROUPS
+//#ifdef USE_HDF5_GROUPS
 int Group_WriteAllData(char *basename, int filenumber, HierarchyEntry *TopGrid,
 		       TopGridData &MetaData, ExternalBoundary *Exterior,
 		       FLOAT WriteTime = -1);
-#else
-int WriteAllData(char *basename, int filenumber, HierarchyEntry *TopGrid,
-                 TopGridData &MetaData, ExternalBoundary *Exterior,
-                 FLOAT WriteTime = -1);
-#endif
+// #else
+// int WriteAllData(char *basename, int filenumber, HierarchyEntry *TopGrid,
+//                  TopGridData &MetaData, ExternalBoundary *Exterior,
+//                  FLOAT WriteTime = -1);
+// #endif
 void my_exit(int status);
 int GenerateGridArray(LevelHierarchyEntry *LevelArray[], int level,
 		      HierarchyEntry **Grids[]);
     LevelHierarchyEntry *Temp2 = LevelArray[0];
     while (Temp2->NextGridThisLevel != NULL)
       Temp2 = Temp2->NextGridThisLevel; /* ugh: find last in linked list */
-#ifdef USE_HDF5_GROUPS
+    //#ifdef USE_HDF5_GROUPS
     if (Group_WriteAllData(MetaData->DataDumpName, MetaData->DataDumpNumber++,
 			   Temp2->GridHierarchyEntry, *MetaData, Exterior,
 			   LevelArray[level]->GridData->ReturnTime()) == FAIL) {
       fprintf(stderr, "Error in Group_WriteAllData.\n");
       return FAIL;
     }
-#else
-    if (WriteAllData(MetaData->DataDumpName, MetaData->DataDumpNumber++,
-		     Temp2->GridHierarchyEntry, *MetaData, Exterior, 
-		     LevelArray[level]->GridData->ReturnTime()) == FAIL) {
-      fprintf(stderr, "Error in WriteAllData.\n");
-      return FAIL;
-    }
-#endif
+// #else
+//     if (WriteAllData(MetaData->DataDumpName, MetaData->DataDumpNumber++,
+// 		     Temp2->GridHierarchyEntry, *MetaData, Exterior, 
+// 		     LevelArray[level]->GridData->ReturnTime()) == FAIL) {
+//       fprintf(stderr, "Error in WriteAllData.\n");
+//       return FAIL;
+//     }
+// #endif
   }//Write == TRUE
 
   

src/enzo/RH_AdiabaticExpansionInitialize.C

  
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
  
 int AdiabaticExpansionInitialize(FILE *fptr, FILE *Outfptr,
 			       HierarchyEntry &TopGrid)
   /* Get the units so we can convert temperature later. */
  
   float DensityUnits=1, LengthUnits=1, TemperatureUnits=1, TimeUnits=1,
-    VelocityUnits=1, MassUnits=1;
+    VelocityUnits=1;
+
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits,
+	       &TimeUnits, &VelocityUnits,
 	       InitialTimeInCodeUnits) == FAIL) {
         ENZO_FAIL("Error in GetUnits.");
   }

src/enzo/RH_Grid_ComputeTemperatureField.C

 int FindField(int f, int farray[], int n);
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
  
  
 int grid::ComputeTemperatureField(float *temperature)
   }
  
   float TemperatureUnits = 1, number_density;
-  float DensityUnits=1, LengthUnits=1, VelocityUnits=1, TimeUnits=1, MassUnits=1;
+  float DensityUnits=1, LengthUnits=1, VelocityUnits=1, TimeUnits=1;
  
   /* Find the temperature units. */
  
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, Time) == FAIL) {
+	       &TimeUnits, &VelocityUnits, Time) == FAIL) {
     fprintf(stderr, "Error in GetUnits.\n");
     ENZO_FAIL("");
   }

src/enzo/RH_InitializeRateData.C

 /* function prototypes */
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 int CosmologyComputeExpansionFactor(FLOAT time, FLOAT *a, FLOAT *dadt);
 extern "C" void FORTRAN_NAME(calc_rates)(
      int *nratec, float *aye, float *temstart, float *temend, float *alpha0,
   /* If using cosmology, compute the expansion factor and get units. */
  
   float TemperatureUnits = 1, DensityUnits = 1, LengthUnits = 1,
-    VelocityUnits = 1, TimeUnits = 1, MassUnits = 1, aUnits = 1;
+    VelocityUnits = 1, TimeUnits = 1, aUnits = 1;
 
   if (GetUnits(&DensityUnits, &LengthUnits, &TemperatureUnits,
-	       &TimeUnits, &VelocityUnits, &MassUnits, Time) == FAIL) {
+	       &TimeUnits, &VelocityUnits, Time) == FAIL) {
     fprintf(stderr, "Error in GetUnits.\n");
     ENZO_FAIL("");
   }

src/enzo/RadiationFieldCalculateRates.C

 int CosmologyComputeExpansionFactor(FLOAT time, FLOAT *a, FLOAT *dadt);
 int GetUnits(float *DensityUnits, float *LengthUnits,
 	     float *TemperatureUnits, float *TimeUnits,
-	     float *VelocityUnits, float *MassUnits, FLOAT Time);
+	     float *VelocityUnits, FLOAT Time);
 
 int RadiationFieldCalculateRates(FLOAT Time)
 {
 
   FLOAT a = 1.0, dadt;
   float TemperatureUnits = 1, DensityUnits = 1, LengthUnits = 1, 
-    VelocityUnits = 1, TimeUnits = 1, MassUnits = 1, aUnits = 1;    
+    VelocityUnits = 1, TimeUnits = 1, aUnits = 1;
 
   if (!ComovingCoordinates) {
     fprintf(stderr, "RadiationField only defined for cosmology.\n");