From 4c746cdd3f6b817ec36f70620dd476d75f6fc462 Mon Sep 17 00:00:00 2001
From: pty <pierre.tysebaert@thalesgroup.com>
Date: Fri, 1 Jul 2022 18:05:45 +0200
Subject: [PATCH] Add DOI in snow products metadata

---
 python/s2snow/snow_detector.py  | 1 +
 python/s2snow/snow_synthesis.py | 1 +
 2 files changed, 2 insertions(+)

diff --git a/python/s2snow/snow_detector.py b/python/s2snow/snow_detector.py
index 64973ea4..b5b48a50 100755
--- a/python/s2snow/snow_detector.py
+++ b/python/s2snow/snow_detector.py
@@ -821,6 +821,7 @@ def create_metadata(final_mask_file, output_dir, product_id, zs):
 
     root = etree.Element("Source_Product")
     etree.SubElement(root, "PRODUCT_ID").text = product_id
+    etree.SubElement(root, "DOI").text = "https://doi.org/10.24400/329360/F7Q52MNK"
     egil = etree.SubElement(root, "Global_Index_List")
     etree.SubElement(egil, "QUALITY_INDEX", name='ZS').text = str(zs)
     etree.SubElement(
diff --git a/python/s2snow/snow_synthesis.py b/python/s2snow/snow_synthesis.py
index 4eb7fa91..6e4e89ac 100755
--- a/python/s2snow/snow_synthesis.py
+++ b/python/s2snow/snow_synthesis.py
@@ -200,6 +200,7 @@ def create_snow_annual_map_metadata(product_list, output_dir):
     metadata_path = op.join(output_dir, "LIS_METADATA.XML")
     logging.info("Metadata file: %s", metadata_path)
     root = etree.Element("INPUTS_LIST")
+    etree.SubElement(root, "DOI").text = "https://doi.org/10.24400/329360/F7Q52MNK"
     for product_path in product_list:
         logging.debug("Product path: {}".format(product_path))
         product_name = op.basename(str(product_path))
-- 
GitLab