Skip to content
Snippets Groups Projects
Commit 31accdff authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Utilize parallelization for the maskregion operation

parent f3c0a9f7
Branches
No related tags found
1 merge request!1Cdo 2.4 miniconda
......@@ -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")
#"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment