Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
parser-atk
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nomad-lab
parser-atk
Commits
8e6def6b
Commit
8e6def6b
authored
Aug 12, 2019
by
Markus Scheidgen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to use old and new SciPy version
parent
120d46e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
atkparser/atkio.py
atkparser/atkio.py
+12
-6
No files found.
atkparser/atkio.py
View file @
8e6def6b
...
...
@@ -30,9 +30,13 @@ class Reader:
self
.
conf_names
=
None
self
.
calc_names
=
None
self
.
f
=
netcdf_file
(
fname
,
'r'
,
mmap
=
True
)
self
.
atk_version
=
'unavailable'
# TODO this implementation causes an error, in current SciPy netcdf_file has no .version
# self.atk_version = self.f.version[:].decode('utf-8').split()[-1]
try
:
# TODO this implementation might causes an error, in current SciPy netcdf_file has no .version
self
.
atk_version
=
self
.
f
.
version
[:].
decode
(
'utf-8'
).
split
()[
-
1
]
except
Exception
as
e
:
self
.
atk_version
=
'unavailable'
self
.
read_names
()
for
gid
in
self
.
calc_names
.
keys
():
conf_name
=
self
.
conf_names
[
gid
]
...
...
@@ -120,9 +124,11 @@ class Reader:
the finger print table which maps between calculated
quantities and configurations.
"""
# TODO there are no ._names in this SciPy version
# self._names = self.f._names[:].decode('utf-8').split(';')
self
.
_names
=
self
.
f
.
variables
.
keys
()
# [:].decode('utf-8').split(';')
# TODO there might be are no ._names in new SciPy version
try
:
self
.
_names
=
self
.
f
.
_names
[:].
decode
(
'utf-8'
).
split
(
';'
)
except
Exception
:
self
.
_names
=
list
(
self
.
f
.
variables
.
keys
())
self
.
conf_names
=
self
.
_read_configuration_names
()
self
.
calc_names
=
self
.
_read_calculator_names
()
self
.
finger_print_table
=
self
.
_read_finger_print_table
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment