Commits

Anonymous committed ef616cd

Added flag to replace content in secondary continuum observation file if it is first observation.

Comments (0)

Files changed (1)

src/pflotran/output_observation.F90

   ! flags signifying the first time a routine is called during a given
   ! simulation
   PetscBool :: observation_first
+  PetscBool :: secondary_observation_first
   PetscBool :: mass_balance_first
 
   public :: OutputObservation, &
   
   if (num_steps == 0) then
     observation_first = PETSC_TRUE
+    secondary_observation_first = PETSC_TRUE
     mass_balance_first = PETSC_TRUE
   else
     observation_first = PETSC_FALSE
+    secondary_observation_first = PETSC_TRUE
     mass_balance_first = PETSC_FALSE
   endif
 
   
     ! open file
     fid = 86
-    if (observation_first .or. .not.FileExists(filename)) then
+    if (secondary_observation_first .or. .not.FileExists(filename)) then
       open(unit=fid,file=filename,action="write",status="replace")
       ! write header
       ! write title
 
   endif
 
-  observation_first = PETSC_FALSE
+  secondary_observation_first = PETSC_FALSE
   
   call PetscLogEventEnd(logging%event_output_observation,ierr)