From 8c1d1757c670781238d3cc6829dd992d7848863e Mon Sep 17 00:00:00 2001
From: Anne Philipp <anne.philipp@univie.ac.at>
Date: Wed, 31 Jul 2019 15:05:12 +0200
Subject: [PATCH] sorted filelist for doubling ens files

---
 Source/Python/Classes/EcFlexpart.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Source/Python/Classes/EcFlexpart.py b/Source/Python/Classes/EcFlexpart.py
index 67b0c90..a41442a 100644
--- a/Source/Python/Classes/EcFlexpart.py
+++ b/Source/Python/Classes/EcFlexpart.py
@@ -1790,6 +1790,7 @@ class EcFlexpart(object):
 
         # get a list of all prepared output files with control forecast (CF)
         CF_filelist = UioFiles(path, prefix + '*.N000')
+        CF_filelist.files = sorted(CF_filelist.files)
 
         for cffile in CF_filelist.files:
             with open(cffile, 'rb') as f:
@@ -1803,7 +1804,6 @@ class EcFlexpart(object):
 
             filename = cffile.split('N000')[0]
             for i in range(1, maxnum + 1):
-
                 # read an ensemble member
                 g = open(filename + 'N{:0>3}'.format(i), 'rb')
                 # create file for newly calculated ensemble member
-- 
GitLab