From 177b1a367c6b1d58dc5ed0b02db8e1f11e9a0f4e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Ribes?= Date: Fri, 18 Mar 2011 17:17:20 +0100 Subject: [PATCH] Nouveau catalogue en cours --- bin/AdaoCatalogGenerator.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/AdaoCatalogGenerator.py b/bin/AdaoCatalogGenerator.py index 22b2148..e0f137a 100644 --- a/bin/AdaoCatalogGenerator.py +++ b/bin/AdaoCatalogGenerator.py @@ -40,7 +40,7 @@ from Accas import * JdC = JDC_CATA (code = 'ADAO', execmodul = None, - regles = ( AU_MOINS_UN ('ASSIM_STUDY')), + regles = ( AU_MOINS_UN ('ASSIM_STUDY'), AU_PLUS_UN ('ASSIM_STUDY')), ) """ @@ -128,6 +128,8 @@ ASSIM_STUDY = PROC(nom="ASSIM_STUDY", op=None, repetable = "n", STUDY_NAME = SIMP(statut="o", typ = "TXM"), + ALGORITHM_NAME = SIMP(statut="o", typ = "TXM", into=(${algos_names})), + STUDY_REPERTORY = SIMP(statut="f", typ ALGORITHM = FACT(statut='o', regles = ( UN_PARMI (${algos}),), ${decl_algos} @@ -245,6 +247,7 @@ mem_file.write(init_method) # Final step: Add algorithm and assim_study algos = "" +algos_names = "" decl_algos = "" decl_opts = "" for opt_name in opt_names: @@ -254,12 +257,14 @@ assim_study_object = daCore.AssimilationStudy.AssimilationStudy() algos_list = assim_study_object.get_available_algorithms() for algo_name in algos_list: logging.debug("An assimilation algorithm is found: " + algo_name) + algos_names += "\"" + algo_name + "\", " if algo_name == "3DVAR": algo_name = "ThreeDVAR" algos += "\"" + algo_name + "\", " decl_algos += assim_algo.substitute(name = algo_name, decl_opts=decl_opts) + "\n" mem_file.write(assim_study.substitute(algos=algos, + algos_names=algos_names, decl_algos=decl_algos)) # Write file final_file = open(catalog_path + "/" + catalog_name, "wr") -- 2.39.2