From 31accdff31de87517e3811364242e7a53e103b5e Mon Sep 17 00:00:00 2001
From: Tor-Einar Skog <tor-einar.skog@nibio.no>
Date: Fri, 26 Apr 2024 10:36:48 +0200
Subject: [PATCH] Utilize parallelization for the maskregion operation

---
 SEPTREFHUM.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/SEPTREFHUM.py b/SEPTREFHUM.py
index fb08d07..fbc778c 100755
--- a/SEPTREFHUM.py
+++ b/SEPTREFHUM.py
@@ -180,7 +180,7 @@ subprocess.run(f'cdo -s -aexpr,"WARNING_STATUS = WHS <= 0 ? 0 : -1; WARNING_STAT
 if os.getenv("MASK_FILE") is not None:
     mask_file = os.getenv("MASK_FILE")
     print(f"Applying mask file {mask_file} to result.nc")
-    subprocess.run(f'cdo -maskregion,{mask_file} {tmpfile_path}result_unmasked.nc {tmpfile_path}result.nc', shell=True)
+    subprocess.run(f'cdo -P 6 -maskregion,{mask_file} {tmpfile_path}result_unmasked.nc {tmpfile_path}result.nc', shell=True)
 else:
     os.rename(f"{tmpfile_path}result_unmasked.nc", f"{tmpfile_path}result.nc")
 #"""
-- 
GitLab