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
Open sidebar
thopri
PyNEMO
Commits
67505f90
Commit
67505f90
authored
5 years ago
by
James Harle
Browse files
Options
Download
Email Patches
Plain Diff
2to3 gui
parent
190d199b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
pynemo/reader/directory.py
pynemo/reader/directory.py
+2
-2
pynemo/reader/factory.py
pynemo/reader/factory.py
+2
-2
pynemo/reader/ncml.py
pynemo/reader/ncml.py
+2
-2
No files found.
pynemo/reader/directory.py
View file @
67505f90
...
...
@@ -50,7 +50,7 @@ class Reader(object):
dir_list
[
i
]
=
self
.
directory
+
dir_list
[
i
]
dir_list
.
sort
()
return
filter
(
None
,
dir_list
)
return
[
_f
for
_f
in
dir_list
if
_f
]
def
_delta_time_interval
(
self
,
time1
,
time2
):
""" Get the difference between the two times in days and hours"""
...
...
@@ -94,7 +94,7 @@ class Reader(object):
error"""
days
=
set
()
hrs
=
set
()
for
grid_type
in
self
.
grid_source_data
.
keys
():
for
grid_type
in
list
(
self
.
grid_source_data
.
keys
()
)
:
day
,
hr
=
self
.
_delta_time_interval
(
self
.
grid_source_data
[
grid_type
].
time_counter
[
0
],
self
.
grid_source_data
[
grid_type
].
time_counter
[
1
])
days
.
add
(
day
)
...
...
This diff is collapsed.
Click to expand it.
pynemo/reader/factory.py
View file @
67505f90
...
...
@@ -15,13 +15,13 @@ from netCDF4 import Dataset
def
GetReader
(
uri
,
t_adjust
,
reader_type
=
None
):
if
reader_type
is
None
:
print
uri
print
(
uri
)
if
uri
.
endswith
(
".ncml"
):
reader_type
=
"NcML"
elif
os
.
path
.
isdir
(
uri
):
reader_type
=
"Directory"
else
:
print
"Error input should be a NcML file or URL or a Local directory"
print
(
"Error input should be a NcML file or URL or a Local directory"
)
return
None
if
reader_type
==
"NcML"
:
return
NcMLReader
(
uri
,
t_adjust
)
...
...
This diff is collapsed.
Click to expand it.
pynemo/reader/ncml.py
View file @
67505f90
...
...
@@ -22,7 +22,7 @@ try:
proxy_port
=
proxylist
[
1
]
jnius_config
.
add_options
(
'-Dhttp.proxyHost='
+
proxy_host
,
'-Dhttp.proxyPort='
+
proxy_port
)
except
:
print
"Didn't find a proxy environment variable"
print
(
"Didn't find a proxy environment variable"
)
NetcdfDataset
=
None
NcMLReader
=
None
Section
=
None
...
...
@@ -37,7 +37,7 @@ try:
Section
=
autoclass
(
'ucar.ma2.Section'
)
init_jnius
()
except
ImportError
:
print
'Warning: Please make sure pyjnius is installed and jvm.dll/libjvm.so/libjvm.dylib is in the path'
print
(
'Warning: Please make sure pyjnius is installed and jvm.dll/libjvm.so/libjvm.dylib is in the path'
)
time_counter_const
=
"time_counter"
class
Reader
(
object
):
...
...
This diff is collapsed.
Click to expand it.
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