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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Flexpart
Flex Extract
Commits
5606fc90
Commit
5606fc90
authored
2 years ago
by
Anne Tipka
Browse files
Options
Downloads
Patches
Plain Diff
included checking for Bologna vs Reading servers and adapted queue and host names
parent
5adaf8a5
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Source/Python/Mods/checks.py
+6
-6
6 additions, 6 deletions
Source/Python/Mods/checks.py
Source/Python/_config.py
+29
-6
29 additions, 6 deletions
Source/Python/_config.py
with
35 additions
and
12 deletions
Source/Python/Mods/checks.py
+
6
−
6
View file @
5606fc90
...
...
@@ -119,8 +119,8 @@ def check_area(grid, area, upper, lower, left, right):
'''
Defines the correct area string.
Checks the format of the four area components wether it is on
the order of 1000 or 1.
Also checks wether area was already set on command line,
the order of 1000 or 1.
Also checks wether area was already set on command line,
then the four components are overwritten.
Convert to correct format of the order of magnitude
"
1
"
and sets the
area parameter (North/West/South/East).
...
...
@@ -452,7 +452,7 @@ def check_mail(mail):
def
check_queue
(
queue
,
gateway
,
destination
,
ecuid
,
ecgid
):
'''
Check if the necessary ECMWF parameters are set if the queue is
one of the QUEUES_LIST (in _config).
one of the QUEUES_LIST
_ALL
(in _config).
Parameters
----------
...
...
@@ -478,14 +478,14 @@ def check_queue(queue, gateway, destination, ecuid, ecgid):
------
'''
if
queue
in
_config
.
QUEUES_LIST
and
\
if
queue
in
_config
.
QUEUES_LIST
_ALL
and
\
(
not
ecuid
or
not
ecgid
):
raise
ValueError
(
'
\n
Environment variables ECUID
'
'
and ECGID were not set properly!
\n
'
'
Please check for existence of file
"
ECMWF_ENV
"
'
'
in the run directory!
'
)
elif
queue
in
_config
.
QUEUES_LIST
and
\
(
not
gateway
or
not
destination
):
elif
queue
in
_config
.
QUEUES_LIST
_ALL
and
\
(
not
gateway
or
not
destination
):
print
(
'
WARNING: Parameters GATEWAY and DESTINATION were
'
'
not properly set for working on ECMWF server.
\n
'
'
There will be no transfer of output files to the
'
...
...
This diff is collapsed.
Click to expand it.
Source/Python/_config.py
+
29
−
6
View file @
5606fc90
...
...
@@ -10,9 +10,9 @@
# - changed template filenames to .template
# August 2020 - Leopold Haimberger
# - added another target for installation
# - added filename which will contain paths for system version
# - added filename which will contain paths for system version
# - checks if software runs in normal local mode or system local mode
# and defines paths to user directory and executable paths
# and defines paths to user directory and executable paths
#
# @License:
# (C) Copyright 2014-2020.
...
...
@@ -42,11 +42,34 @@ import platform
# PARAMETERS
# ------------------------------------------------------------------------------
_VERSION_STR
=
'
7.1.2_ctbto
'
FLAG_ON_ECMWFSERVER
=
'
ecgb
'
in
platform
.
node
()
_VERSION_STR
=
'
7.1.3
'
HOSTNAMES_BOLOGNA_LIST
=
[
'
ecs
'
,
'
aa
'
,
'
ab
'
,
'
ac
'
,
'
ad
'
]
HOSTNAMES_READING_LIST
=
[
'
ecgb
'
,
'
cca
'
,
'
ccb
'
]
# name of environment variable on ECMWF Bologna servers
# that indicates which cluster / host we are on
HOSTENV_BOLOGNA
=
'
EC_CLUSTER
'
# name of environment variable on ECMWF Reading servers
# that indicates which cluster / host we are on
HOSTENV_READING
=
'
ECPLATFORM
'
# test if we are on a Bologna or Reading server
# Test and set ECMWF Bologna server values
if
os
.
getenv
(
HOSTENV_BOLOGNA
)
is
not
None
:
ec_hostname
=
os
.
getenv
(
HOSTENV_BOLOGNA
)
FLAG_ON_ECMWFSERVER
=
ec_hostname
in
HOSTNAMES_BOLOGNA_LIST
QUEUES_LIST
=
[
'
ecs
'
,
'
ecs-login
'
,
'
hpc
'
,
'
hpc-login
'
,
'
hpc-2020
'
]
# Test and set ECMWF Reading server values
elif
os
.
getenv
(
HOSTENV_READING
)
is
not
None
:
ec_hostname
=
os
.
getenv
(
HOSTENV_READING
)
FLAG_ON_ECMWFSERVER
=
ec_hostname
in
HOSTNAMES_READING_LIST
QUEUES_LIST
=
[
'
ecgate
'
,
'
cca
'
,
'
ccb
'
]
else
:
FLAG_ON_ECMWFSERVER
=
False
QUEUES_LIST
=
[
'
ecgate
'
,
'
cca
'
,
'
ccb
'
]
QUEUES_LIST
_ALL
=
[
'
ecs
'
,
'
ecs-login
'
,
'
hpc
'
,
'
hpc-login
'
,
'
hpc-2020
'
,
'
ecgate
'
,
'
cca
'
,
'
ccb
'
]
INSTALL_TARGETS
=
[
'
local
'
,
'
syslocal
'
,
'
ecgate
'
,
'
cca
'
,
'
ccb
'
]
...
...
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