diff --git a/README.md b/README.md index 3957d11c6abbe04e182a0d290bc881c4e0c2b504..5eea72aa055c49d57e34bc85eec2cb3aa3cf9feb 100644 --- a/README.md +++ b/README.md @@ -324,7 +324,7 @@ sh ./launch-tests.sh {install_repository} ## Contributors -Aurore Dupuis (CNES), Simon Gascoin (CNRS/CESBIO), Manuel Grizonnet (CNES), Germain Salgues (Magellium), Rémi Jugier (Magellium) +Aurore Dupuis (CNES), Simon Gascoin (CNRS/CESBIO), Manuel Grizonnet (CNES), Tristan Klempka, Germain Salgues (Magellium), Rémi Jugier (Magellium) ## License diff --git a/python/s2snow/lis_constant.py b/python/s2snow/lis_constant.py index 8cf43263751849a5eed43d15fec4feec3821ff83..6491a59043593474342d017481314ac4aa961b82 100644 --- a/python/s2snow/lis_constant.py +++ b/python/s2snow/lis_constant.py @@ -48,6 +48,7 @@ LIS = "LIS" LANDSAT8_OLITIRS_XS = "LANDSAT8-OLITIRS-XS" LANDSAT8 = "LANDSAT8" N2A = "N2A" +FSC = "FSC" # Build gdal option to generate maks of 1 byte using otb extended filename # syntaxx diff --git a/python/s2snow/snow_product.py b/python/s2snow/snow_product.py index a3e58d029e709ba0d7ef671260c9d8205024d4c1..0c5b20ff0a6a1b8de3c34c637525faa194f897aa 100644 --- a/python/s2snow/snow_product.py +++ b/python/s2snow/snow_product.py @@ -28,7 +28,7 @@ import zipfile from os.path import basename, dirname from s2snow.lis_constant import SENTINEL2, LIS, LANDSAT8_OLITIRS_XS, LANDSAT8, N2A, MUSCATE_DATETIME_FORMAT, \ - LIS_DATETIME_FORMAT, LANDSAT_DATETIME_FORMAT + LIS_DATETIME_FORMAT, LANDSAT_DATETIME_FORMAT, FSC from s2snow.lis_exception import UnknownPlatform, NoSnowProductFound, NoZipFound @@ -37,6 +37,7 @@ class SnowProduct: # example 1 "SENTINEL2A_20160912-103551-370_L2B-SNOW_T32TLS_D_V1-0" # example 2 "LANDSAT8_OLITIRS_XS_20160812_N2A_France-MetropoleD0005H0001" # exemple 3 : "LIS_S2-SNOW-FSC_T31TCH_20180101T105435_1.7.0_1" + # exemple 4 : "FSC_20200612T110855_S2A_T31TCJ_V100_1[.zip]" logging.debug("snow_product initialisation") logging.debug("absolute_filename : " + absolute_filename) @@ -92,6 +93,11 @@ class SnowProduct: self.tile_id = name_splitted[2] self.snow_mask = find_files(self.product_path, ".*SNOW-FS.*C_.*(tif|TIF)") self.metadata_file = find_files(self.product_path, ".*SNOW-.*.(xml|XML)") + elif FSC in platform: + self.acquisition_date = datetime.strptime(name_splitted[1], LIS_DATETIME_FORMAT) + self.tile_id = name_splitted[3] + self.snow_mask = find_files(self.product_path, ".*FSC(OG|TOC).(tif|TIF)") + self.metadata_file = find_files(self.product_path, ".*_MTD.(xml|XML)") else: msg = "Unknown platform or producer: " + platform logging.error(msg) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt old mode 100644 new mode 100755 index 810a4511f1d340420188461d419905891f557139..301683910c16ebb5f3fae4e6de8f92c4b3c033aa --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -451,7 +451,26 @@ add_test(NAME snow_synthesis_with_zip -o ${OUTPUT_TEST}/SNOW_SYNTHESIS_WITH_ZIP ) - # ---------------------------------- +# --------------------------------------- +# Synthesis with Copernicus snow products +# --------------------------------------- +add_test(NAME snow_synthesis_with_cosims_snow_products + COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_BINARY_DIR}/app/let_it_snow_synthesis.py + -t T31TCH + -i ${DATA_TEST}/SNOW_PRODUCTS/FSC_20200308T104911_S2A_T31TCH_V100_1 + -i ${DATA_TEST}/SNOW_PRODUCTS/FSC_20200321T105909_S2A_T31TCH_V100_1 + -i ${DATA_TEST}/SNOW_PRODUCTS/FSC_20200326T105910_S2B_T31TCH_V100_1 + -i ${DATA_TEST}/SNOW_PRODUCTS/FSC_20200328T104911_S2A_T31TCH_V100_1 + -i ${DATA_TEST}/SNOW_PRODUCTS/FSC_20200405T105909_S2B_T31TCH_V100_1 + -b 01/03/2020 + -e 10/04/2020 + -m 2 + -l INFO + -c ${DATA_TEST}/SYNTHESIS/synthesis_cosims_configuration.json + -o ${OUTPUT_TEST}/SNOW_SYNTHESIS_WITH_COSIMS_SNOW_PRODUCTS + ) + +# ---------------------------------- # Synthesis with H2 snow products # ---------------------------------- add_test(NAME snow_synthesis_with_h2_snow_products