diff --git a/sen2chain/download_eodag.py b/sen2chain/download_eodag.py index 3283dffa2b5b974cbef9cf3e75a6bd91a2a5a442..11d474a1cf199454caf7ce0ea62a6198b60eb748 100644 --- a/sen2chain/download_eodag.py +++ b/sen2chain/download_eodag.py @@ -143,7 +143,14 @@ class S2cEodag: else: logger.info("{} - local l1c {} - local l2a {} - remote {}".format(p.properties["title"], l1c_presence, l2a_presence, p.properties["storageStatus"])) - # elif ref == "ndvi" or indice: + elif ref == "indice": + toto = 12 + l2a_identifier = p.properties["title"].replace("L1C_", "L2A_").replace("__OPER__", "_USER_") + l2aProduct(l2a_identifier) + + + elif isinstance(ref, list): + toto = 24 # toto = 13 diff --git a/sen2chain/jobs.py b/sen2chain/jobs.py index 28dbfafd79e1c60561f636f445c5cea6d1d19fb0..1ea82f9a287d31e67e8a21d5449506fa069df542 100644 --- a/sen2chain/jobs.py +++ b/sen2chain/jobs.py @@ -950,9 +950,9 @@ class Job: t = Tile(row.tile) prodlist = [p for p in l2a_remove_list if row.tile in p] t.remove_l2a(prodlist) - logger.info("Removing {} produced l2a product(s): {}".format(len(prodlist), prodlist)) + logger.info("Removed {} produced l2a product(s): {}".format(len(prodlist), prodlist)) if self.logs: - f.write("Removing {} produced l2a products: {}\n".format(len(prodlist))) + f.write("Removed {} produced l2a products:\n".format(len(prodlist))) for l2a in prodlist: f.write("{}\n\n".format(l2a)) f.flush() diff --git a/sen2chain/tiles.py b/sen2chain/tiles.py index f0666229affeba9e388186c5c1828a3b1dbbc5d5..37889193b9da11decf9dd430cad11d4ece7fac6c 100644 --- a/sen2chain/tiles.py +++ b/sen2chain/tiles.py @@ -781,7 +781,6 @@ class Tile: Returns tile's L2A products that don't have indices as a ProductsList. """ prodlist = ProductsList() - try: if not nodata_clouds: missings_indice_set = set(self.l2a.products) - { @@ -835,6 +834,9 @@ class Tile: tries: int = 1, sleep: int = 0, ): + """ + function to download L1C products using EODAG + """ if provider == "scihub": NUM_THREADS = 4 else: