diff --git a/source/python/_config.py b/source/python/_config.py index cbe125acdc13ad2cd0181c75691689d9436f80f4..1b9339e3233a34f5106d6c524b7cef51ea4824a5 100644 --- a/source/python/_config.py +++ b/source/python/_config.py @@ -31,6 +31,9 @@ _VERSION_STR = '7.1' QUEUES_LIST = ['ecgate', 'cca', 'ccb'] +# up-to-date available maximum level numbers at ECMWF, 05.10.2018 +MAX_LEVEL_LIST = [16, 19, 31, 40, 50, 60, 62, 91, 137] + # ------------------------------------------------------------------------------ # FILENAMES # ------------------------------------------------------------------------------ diff --git a/source/python/classes/ControlFile.py b/source/python/classes/ControlFile.py index bbf468c9a6258da59012f9fe1a3ad05d9c16c79d..6a54c6d57da5b90c50c6c5c930bd4a3fb2c15f2b 100644 --- a/source/python/classes/ControlFile.py +++ b/source/python/classes/ControlFile.py @@ -344,8 +344,6 @@ class ControlFile(object): sys.exit(1) # assure consistency of levelist and level - # up-to-date available maximum level numbers at ECMWF, 05.10.2018 - max_level_list = [16, 19, 31, 40, 50, 60, 62, 91, 137] if not self.levelist and not self.level: print('Warning: neither levelist nor level \ specified in CONTROL file') @@ -359,11 +357,11 @@ class ControlFile(object): pass # check if max level is a valid level - if int(self.level) not in max_level_list: + if int(self.level) not in _config.MAX_LEVEL_LIST: print('ERROR: ') print('LEVEL must be the maximum level of a specified ' 'level list from ECMWF, e.g.') - print('[16, 19, 31, 40, 50, 60, 62, 91 or 137]') + print(_config.MAX_LEVEL_LIST) print('Check parameter "LEVEL" or the max level of "LEVELIST"!') sys.exit(1)