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
e1228f35
Commit
e1228f35
authored
7 years ago
by
Anne Philipp
Browse files
Options
Downloads
Patches
Plain Diff
resolved loop import between controlfile and tools
parent
ff99eae6
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
python/ControlFile.py
+1
-3
1 addition, 3 deletions
python/ControlFile.py
python/EcFlexpart.py
+6
-6
6 additions, 6 deletions
python/EcFlexpart.py
python/GribTools.py
+2
-2
2 additions, 2 deletions
python/GribTools.py
with
9 additions
and
11 deletions
python/ControlFile.py
+
1
−
3
View file @
e1228f35
...
...
@@ -67,9 +67,6 @@
import
os
import
inspect
# software specific module from flex_extract
from
tools
import
get_list_as_string
,
my_error
# ------------------------------------------------------------------------------
# CLASS
# ------------------------------------------------------------------------------
...
...
@@ -108,6 +105,7 @@ class ControlFile(object):
@Return:
<nothing>
'''
from
tools
import
my_error
# read whole CONTROL file
with
open
(
filename
)
as
f
:
...
...
This diff is collapsed.
Click to expand it.
python/EcFlexpart.py
+
6
−
6
View file @
e1228f35
...
...
@@ -111,7 +111,7 @@ from gribapi import grib_set, grib_index_select, grib_new_from_index, grib_get,\
grib_index_release
,
grib_index_get
# software specific classes and modules from flex_extract
from
Grib
t
ools
import
Grib
t
ools
from
Grib
T
ools
import
Grib
T
ools
from
tools
import
init128
,
to_param_id
,
silent_remove
,
product
,
my_error
from
MarsRetrieval
import
MarsRetrieval
import
disaggregation
...
...
@@ -223,17 +223,17 @@ class EcFlexpart(object):
# for gaussian grid retrieval
self
.
glevelist
=
'
1/to/
'
+
c
.
level
if
c
.
gaussian
:
if
hasattr
(
c
,
'
gaussian
'
)
and
c
.
gaussian
:
self
.
gaussian
=
c
.
gaussian
else
:
self
.
gaussian
=
''
if
c
.
expver
:
if
hasattr
(
c
,
'
expver
'
)
and
c
.
expver
:
self
.
expver
=
c
.
expver
else
:
self
.
expver
=
'
1
'
if
c
.
number
:
if
hasattr
(
c
,
'
number
'
)
and
c
.
number
:
self
.
number
=
c
.
number
else
:
self
.
number
=
'
0
'
...
...
@@ -871,7 +871,7 @@ class EcFlexpart(object):
index_keys
=
[
"
date
"
,
"
time
"
,
"
step
"
]
indexfile
=
c
.
inputdir
+
"
/date_time_stepRange.idx
"
silent_remove
(
indexfile
)
grib
=
Grib
t
ools
(
inputfiles
.
files
)
grib
=
Grib
T
ools
(
inputfiles
.
files
)
# creates new index file
iid
=
grib
.
index
(
index_keys
=
index_keys
,
index_file
=
indexfile
)
...
...
@@ -1113,7 +1113,7 @@ class EcFlexpart(object):
index_keys
=
[
"
date
"
,
"
time
"
,
"
step
"
]
indexfile
=
c
.
inputdir
+
"
/date_time_stepRange.idx
"
silent_remove
(
indexfile
)
grib
=
Grib
t
ools
(
inputfiles
.
files
)
grib
=
Grib
T
ools
(
inputfiles
.
files
)
# creates new index file
iid
=
grib
.
index
(
index_keys
=
index_keys
,
index_file
=
indexfile
)
...
...
This diff is collapsed.
Click to expand it.
python/GribTools.py
+
2
−
2
View file @
e1228f35
...
...
@@ -51,7 +51,7 @@ from gribapi import grib_new_from_file, grib_is_defined, grib_get, \
# ------------------------------------------------------------------------------
# CLASS
# ------------------------------------------------------------------------------
class
Grib
t
ools
(
object
):
class
Grib
T
ools
(
object
):
'''
Class for GRIB utilities (new methods) based on GRIB API
'''
...
...
@@ -61,7 +61,7 @@ class Gribtools(object):
def
__init__
(
self
,
filenames
):
'''
@Description:
Initialise an object of Grib
t
ools and assign a list
Initialise an object of Grib
T
ools and assign a list
of filenames.
@Input:
...
...
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