Skip to content
Snippets Groups Projects

Merge develop

Merged Aurore Dupuis requested to merge develop into int_stage_roman
12 files
+ 219
152
Compare changes
  • Side-by-side
  • Inline
Files
12
@@ -25,10 +25,12 @@ import sys
@@ -25,10 +25,12 @@ import sys
import json
import json
from logging.handlers import RotatingFileHandler
from logging.handlers import RotatingFileHandler
from s2snow.lis_exception import LisConfigurationException
from s2snow.lis_exception import LisConfigurationException, NoSnowProductFound, NoZipFound, NoProductMatchingSynthesis, \
 
UnknownPlatform
from s2snow.snow_synthesis import compute_snow_synthesis
from s2snow.snow_synthesis import compute_snow_synthesis
from s2snow.synthesis_config import SynthesisConfig
from s2snow.synthesis_config import SynthesisConfig
from s2snow.lis_constant import INPUT_PARAMETER_ERROR, CONFIGURATION_ERROR, TMP_DIR, LOG_FILE
from s2snow.lis_constant import INPUT_PARAMETER_ERROR, CONFIGURATION_ERROR, TMP_DIR, LOG_FILE, NO_SNOW_PRODUCT_FOUND, \
 
NO_ZIP_FOUND, NO_PRODUCT_MATCHING_SYNTHESIS, UNKNOWN_PLATFORM
from s2snow.parser import create_synthesis_argument_parser
from s2snow.parser import create_synthesis_argument_parser
@@ -57,6 +59,18 @@ def main(config_file, tile_id, input_products_list, densification_products_list,
@@ -57,6 +59,18 @@ def main(config_file, tile_id, input_products_list, densification_products_list,
try:
try:
logging.info("Launch snow synthesis computation.")
logging.info("Launch snow synthesis computation.")
compute_snow_synthesis(config, output_dir, h2_chain_version, product_counter)
compute_snow_synthesis(config, output_dir, h2_chain_version, product_counter)
 
except UnknownPlatform as e:
 
logging.error(e)
 
return UNKNOWN_PLATFORM
 
except NoProductMatchingSynthesis as e:
 
logging.error(e)
 
return NO_PRODUCT_MATCHING_SYNTHESIS
 
except NoSnowProductFound as e:
 
logging.error(e)
 
return NO_SNOW_PRODUCT_FOUND
 
except NoZipFound as e:
 
logging.error(e)
 
return NO_ZIP_FOUND
except Exception as e:
except Exception as e:
logging.error(e)
logging.error(e)
return -1
return -1
@@ -78,7 +92,7 @@ if __name__ == "__main__":
@@ -78,7 +92,7 @@ if __name__ == "__main__":
date_start = global_config.get("date_start", None)
date_start = global_config.get("date_start", None)
date_stop = global_config.get("date_stop", None)
date_stop = global_config.get("date_stop", None)
date_margin = global_config.get("date_margin", None)
date_margin = global_config.get("date_margin", None)
log_level = global_config.get("log", "INFO")
log_level = global_config.get("log_level", "INFO")
config_file = global_config.get("config_file", None)
config_file = global_config.get("config_file", None)
h2_chain_version = global_config.get("chain_version", None)
h2_chain_version = global_config.get("chain_version", None)
product_counter = global_config.get("product_counter", "1")
product_counter = global_config.get("product_counter", "1")
Loading