From 329ad762e9c66e5f00683d7c6c3d597324cb8d00 Mon Sep 17 00:00:00 2001
From: Tor-Einar Skog <tor-einar.skog@nibio.no>
Date: Mon, 18 Mar 2024 15:01:28 +0100
Subject: [PATCH] Remove debug output and obsolete code

---
 SEPTREFHUM.py | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/SEPTREFHUM.py b/SEPTREFHUM.py
index a1cb743..0e1bb80 100755
--- a/SEPTREFHUM.py
+++ b/SEPTREFHUM.py
@@ -69,14 +69,11 @@ if last_wh_date is not None:
     print(f"Last date of WH calculations is {last_wh_date}. Start date = {start_date}")
 
 
-
-# TODO: let filename/pattern be configurable <== DONE??
 weatherdata_files = glob.glob(f"{infile_path}{filename_pattern}")
 #print(f"{infile_path}{filename_pattern}")
 #print("What are the weatherdata files?")
 #print(weatherdata_files)
 for file_path in sorted(weatherdata_files):
-    print("Examining %s" % file_path)
     # TODO: When filename/pattern is configurable: make the string search adaptable
     file_name = os.path.basename(file_path)
     # Skip if we don't have a complete date, which could indicate that we are looking at a yearly file of daily data
@@ -85,12 +82,7 @@ for file_path in sorted(weatherdata_files):
     except ValueError as e:
         print(e)
         continue
-    #file_date = file_name[file_name.index("nordic")+7:file_name.index("nordic")+17]
-    # Skip if we don't have a complete date (10 characters), which could indicate that we are looking at a yearly file of daily data
-    #if len(file_date) != 10:
-    #    continue
-    
-    #wh_sum_date = local_timezone.localize(datetime.strptime(f"{file_date}", "%Y-%m-%d"))
+
     # Only process files from the three last days (if this is not a work from scratch)
     if start_date is not None and wh_sum_date < start_date:
          continue
-- 
GitLab