Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Flex Extract
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Flexpart
Flex Extract
Commits
d8785f85
Commit
d8785f85
authored
Nov 27, 2018
by
Anne Philipp
Browse files
Options
Downloads
Patches
Plain Diff
moved max level list definition to config file
parent
e0e99a5e
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/python/_config.py
+3
-0
3 additions, 0 deletions
source/python/_config.py
source/python/classes/ControlFile.py
+2
-4
2 additions, 4 deletions
source/python/classes/ControlFile.py
with
5 additions
and
4 deletions
source/python/_config.py
+
3
−
0
View file @
d8785f85
...
@@ -31,6 +31,9 @@ _VERSION_STR = '7.1'
...
@@ -31,6 +31,9 @@ _VERSION_STR = '7.1'
QUEUES_LIST
=
[
'
ecgate
'
,
'
cca
'
,
'
ccb
'
]
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
# FILENAMES
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
source/python/classes/ControlFile.py
+
2
−
4
View file @
d8785f85
...
@@ -344,8 +344,6 @@ class ControlFile(object):
...
@@ -344,8 +344,6 @@ class ControlFile(object):
sys
.
exit
(
1
)
sys
.
exit
(
1
)
# assure consistency of levelist and level
# 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
:
if
not
self
.
levelist
and
not
self
.
level
:
print
(
'
Warning: neither levelist nor level
\
print
(
'
Warning: neither levelist nor level
\
specified in CONTROL file
'
)
specified in CONTROL file
'
)
...
@@ -359,11 +357,11 @@ class ControlFile(object):
...
@@ -359,11 +357,11 @@ class ControlFile(object):
pass
pass
# check if max level is a valid level
# 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
(
'
ERROR:
'
)
print
(
'
LEVEL must be the maximum level of a specified
'
print
(
'
LEVEL must be the maximum level of a specified
'
'
level list from ECMWF, e.g.
'
)
'
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
"
!
'
)
print
(
'
Check parameter
"
LEVEL
"
or the max level of
"
LEVELIST
"
!
'
)
sys
.
exit
(
1
)
sys
.
exit
(
1
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment