From 32b33bc4b9c0fd10e579103b48351b8db11298a8 Mon Sep 17 00:00:00 2001
From: Wouter Peters <wouter.peters@wur.nl>
Date: Thu, 24 Nov 2011 11:11:06 +0000
Subject: [PATCH] changed OutputFilelist into a list object instead of tuple

---
 da/tm5/observationoperator.py | 4 ++--
 da/tools/initexit.py          | 2 +-
 da/tools/pipeline.py          | 3 ++-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/da/tm5/observationoperator.py b/da/tm5/observationoperator.py
index 37fcc7a0..732f5f11 100755
--- a/da/tm5/observationoperator.py
+++ b/da/tm5/observationoperator.py
@@ -584,7 +584,7 @@ class TM5ObservationOperator(ObservationOperator):
         # Start from empty lists for each TM5 run. Note that these "private" lists from the obs operator are later on appended to the system
         # lists
 
-        self.OutputFileList  = ()
+        self.OutputFileList  = []
 
         for file in os.listdir(sourcedir):
 
@@ -605,7 +605,7 @@ class TM5ObservationOperator(ObservationOperator):
                 msg         = "           [skip] .... %s " % file                                     ; logging.debug(msg)
                 continue    
 
-            dummy       = self.OutputFileList + ( file ,  )
+            dummy       = self.OutputFileList.append( file  )
             msg         = "           [added to output list] .... %s " % file                               ; logging.debug(msg)
 
 
diff --git a/da/tools/initexit.py b/da/tools/initexit.py
index a4bdea6e..6bb883ef 100755
--- a/da/tools/initexit.py
+++ b/da/tools/initexit.py
@@ -104,7 +104,7 @@ class CycleControl(dict):
         self['verbose']          = '-v' in opts
         self.DaSystem            = None # to be filled later
         self.RestartFileList     = [] # List of files needed for restart, to be extended later
-        self.OutputFileList      = () # List of files needed for output, to be extended later
+        self.OutputFileList      = [] # List of files needed for output, to be extended later
 
     def __str__(self):
         """
diff --git a/da/tools/pipeline.py b/da/tools/pipeline.py
index f7167313..5e8e82ea 100755
--- a/da/tools/pipeline.py
+++ b/da/tools/pipeline.py
@@ -201,7 +201,8 @@ def SampleOneCycle(DaCycle,Samples,StateVector, ObservationOperator,lag):
 
     if lag == 0:
         DaCycle.RestartFileList.extend( ObservationOperator.RestartFileList )
-        DaCycle.OutputFileList += ObservationOperator.OutputFileList 
+        DaCycle.OutputFileList.extend(ObservationOperator.OutputFileList )
+    	msg = "Extended DaCycle restart and output file lists " ; logging.debug(msg)
 
     # Add model-data mismatch to all samples, this *might* use output from the ensemble in the future??
 
-- 
GitLab