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
90809b7b
Commit
90809b7b
authored
5 years ago
by
Anne Philipp
Browse files
Options
Downloads
Patches
Plain Diff
python2 downgrade / changed flexpartdir to installdir / added purefc check /
parent
91e4dba6
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/python/classes/ControlFile.py
+14
-12
14 additions, 12 deletions
source/python/classes/ControlFile.py
with
14 additions
and
12 deletions
source/python/classes/ControlFile.py
+
14
−
12
View file @
90809b7b
#!/usr/bin/env python
3
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#*******************************************************************************
# @Author: Leopold Haimberger (University of Vienna)
...
...
@@ -42,11 +42,12 @@
# ------------------------------------------------------------------------------
# MODULES
# ------------------------------------------------------------------------------
from
__future__
import
print_function
import
os
import
re
import
sys
import
inspect
import
numpy
as
np
# software specific classes and modules from flex_extract
sys
.
path
.
append
(
'
../
'
)
...
...
@@ -273,7 +274,7 @@ class ControlFile(object):
Path to the FORTRAN executable file. Default value is
_config.PATH_FORTRAN_SRC.
flexpart
dir : str
install
dir : str
Path to a FLEXPART root directory. Default value is None.
makefile : str
...
...
@@ -413,7 +414,7 @@ class ControlFile(object):
self
.
outputdir
=
None
self
.
flexextractdir
=
_config
.
PATH_FLEXEXTRACT_DIR
self
.
exedir
=
_config
.
PATH_FORTRAN_SRC
self
.
flexpart
dir
=
None
self
.
install
dir
=
None
self
.
makefile
=
'
Makefile.gfortran
'
self
.
destination
=
None
self
.
gateway
=
None
...
...
@@ -607,8 +608,8 @@ class ControlFile(object):
check_queue
(
queue
,
self
.
gateway
,
self
.
destination
,
self
.
ecuid
,
self
.
ecgid
)
self
.
outputdir
,
self
.
flexpart
dir
=
check_pathes
(
self
.
inputdir
,
self
.
outputdir
,
self
.
flexpart
dir
,
self
.
flexextractdir
)
self
.
outputdir
,
self
.
install
dir
=
check_pathes
(
self
.
inputdir
,
self
.
outputdir
,
self
.
install
dir
,
self
.
flexextractdir
)
self
.
start_date
,
self
.
end_date
=
check_dates
(
self
.
start_date
,
self
.
end_date
)
...
...
@@ -630,6 +631,8 @@ class ControlFile(object):
self
.
time
=
check_time
(
self
.
time
)
self
.
purefc
=
check_purefc
(
self
.
type
)
self
.
type
,
self
.
time
,
self
.
step
=
check_len_type_time_step
(
self
.
type
,
self
.
time
,
self
.
step
,
...
...
@@ -638,13 +641,12 @@ class ControlFile(object):
self
.
acctype
=
check_acctype
(
self
.
acctype
,
self
.
type
)
self
.
acctime
=
check_acctime
(
self
.
acctime
,
self
.
marsclass
,
self
.
purefc
)
self
.
acctime
=
check_acctime
(
self
.
acctime
,
self
.
marsclass
,
self
.
purefc
,
self
.
time
)
self
.
accmaxstep
=
check_accmaxstep
(
self
.
accmaxstep
,
self
.
marsclass
,
self
.
purefc
,
self
.
maxstep
)
self
.
purefc
=
check_purefc
(
self
.
type
)
self
.
grid
=
check_grid
(
self
.
grid
)
self
.
area
=
check_area
(
self
.
grid
,
self
.
area
,
self
.
upper
,
self
.
lower
,
...
...
@@ -661,7 +663,7 @@ class ControlFile(object):
def
to_list
(
self
):
'''
Just generates a list of strings containing the attributes and
assigned values except the attributes
"
_expanded
"
,
"
exedir
"
,
"
flexextractdir
"
and
"
flexpart
dir
"
.
"
flexextractdir
"
and
"
install
dir
"
.
Parameters
----------
...
...
@@ -671,7 +673,7 @@ class ControlFile(object):
l : list of *
A sorted list of the all ControlFile class attributes with
their values except the attributes
"
_expanded
"
,
"
exedir
"
,
"
flexextractdir
"
and
"
flexpart
dir
"
.
"
flexextractdir
"
and
"
install
dir
"
.
'''
import
collections
...
...
@@ -685,7 +687,7 @@ class ControlFile(object):
pass
elif
'
exedir
'
in
item
[
0
]:
pass
elif
'
flexpart
dir
'
in
item
[
0
]:
elif
'
install
dir
'
in
item
[
0
]:
pass
elif
'
flexextractdir
'
in
item
[
0
]:
pass
...
...
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