source: CPL/oasis3-mct/branches/OASIS3-MCT_2.0_branch/util/oasisgui/library/oasis3-mct/scripts/process_models.py @ 4775

Last change on this file since 4775 was 4775, checked in by aclsce, 5 years ago
  • Imported oasis3-mct from Cerfacs svn server (not suppotred anymore).

The version has been extracted from https://oasis3mct.cerfacs.fr/svn/branches/OASIS3-MCT_2.0_branch/oasis3-mct@1818

  • Property svn:executable set to *
File size: 842 bytes
Line 
1from XDR import *
2
3###########################
4# INITIALIZATION
5
6init()
7
8##
9#
10model_names_list = []
11after_model_names_list = []
12
13# Create the list with the names of the models
14# Verify that either all the maximum fortran are given for all the models
15# either none fortran units are given
16nb_models = 0
17nb_units = 0
18for model_id in getChildrenName("models"):
19    model_name = getValue(model_id)
20    model_names_list.append(model_name)
21    nb_models += 1
22    if model_name == "no label":
23        error("You must give a name to your model or delete it")
24    if getValue("maxunits",model_id) == "units_on" :
25        nb_units += 1
26
27if  nb_models != nb_units and nb_units != 0 :
28    error("The maximum fortan units must be given for none or for all the models")
29
30
31#print model_names_list
32setValue(model_names_list, "model_names_list")
33
34finish()
35
36
Note: See TracBrowser for help on using the repository browser.