Skip to content
Snippets Groups Projects
Commit 5b1049d6 authored by pascal.mouquet_ird.fr's avatar pascal.mouquet_ird.fr
Browse files

sen2cor 2.9 compatibility

parent 72c42ef1
No related branches found
No related tags found
No related merge requests found
Pipeline #51 failed
......@@ -83,6 +83,18 @@ def process_sen2cor(
sorted(l2a_product_path_tmp.glob("*.SAFE"))[0].rename(l2a_product_path.parent / (l2a_product_path.stem + '.SAFE'))
l2a_product_path_tmp.rmdir()
elif s2c_v == '02.09.00':
logger.info("sen2cor {} processing: {}".format(s2c_v, l1c_product_path))
command = "/bin/bash, -c, source {sen2cor_bashrc} && L2A_Process --processing_baseline {processing_baseline} --output_dir {out_dir} {l1c_folder}".format(
sen2cor_bashrc = str(sen2cor_bashrc_path),
processing_baseline = pb,
out_dir = l2a_product_path_tmp,
l1c_folder = str(l1c_product_path)
)
process = subprocess.run(command.split(", "))
sorted(l2a_product_path_tmp.glob("*.SAFE"))[0].rename(l2a_product_path.parent / (l2a_product_path.stem + '.SAFE'))
l2a_product_path_tmp.rmdir()
elif s2c_v is not None:
logger.info('Sen2Cor version {} is not compatible with Sen2Chain'.format(s2c_v))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment