From 8fda28676323fbfbcf75bde202e2be2b3d605739 Mon Sep 17 00:00:00 2001 From: Lene Wasskog <lene.wasskog@nibio.no> Date: Fri, 21 Feb 2025 15:58:05 +0100 Subject: [PATCH] feat: Remove tmp file after processing, fix path error --- ADASMELIAE.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ADASMELIAE.py b/ADASMELIAE.py index 351a181..ab414e1 100755 --- a/ADASMELIAE.py +++ b/ADASMELIAE.py @@ -172,8 +172,8 @@ if __name__ == "__main__": sys.exit() # Ensure that output year dirs exist - result_tif_year_dir = f"{result_tif_base_dir}{year}" - result_mapfile_year_dir = f"{result_mapfile_base_dir}{year}" + result_tif_year_dir = f"{result_tif_base_dir}{year}/" + result_mapfile_year_dir = f"{result_mapfile_base_dir}{year}/" os.makedirs(result_tif_year_dir, exist_ok=True) os.makedirs(result_mapfile_year_dir, exist_ok=True) @@ -287,6 +287,7 @@ if __name__ == "__main__": run_command( command=f'cdo -s -aexpr,"WARNING_STATUS = 0" {tmp_file} {file}', ) + os.remove(tmp_file) # For warning status: run_command( -- GitLab