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
d55e84e1
Commit
d55e84e1
authored
5 years ago
by
James Harle
Browse files
Options
Download
Email Patches
Plain Diff
netcdftime -> cftime
parent
e5d9a610
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
pynemo/nemo_bdy_extr_tm3.py
pynemo/nemo_bdy_extr_tm3.py
+1
-1
pynemo/reader/directory.py
pynemo/reader/directory.py
+2
-2
pynemo/reader/ncml.py
pynemo/reader/ncml.py
+2
-2
No files found.
pynemo/nemo_bdy_extr_tm3.py
View file @
d55e84e1
...
...
@@ -38,7 +38,7 @@ import numpy as np
import
scipy.spatial
as
sp
from
calendar
import
monthrange
,
isleap
from
scipy.interpolate
import
interp1d
from
netcd
ftime
import
datetime
,
utime
from
c
ftime
import
datetime
,
utime
from
pynemo
import
nemo_bdy_ncgen
as
ncgen
from
pynemo
import
nemo_bdy_ncpop
as
ncpop
...
...
This diff is collapsed.
Click to expand it.
pynemo/reader/directory.py
View file @
d55e84e1
...
...
@@ -5,7 +5,7 @@ This is an abstraction for the data repository
from
os
import
listdir
import
numpy
as
np
from
netCDF4
import
Dataset
from
netCDF4
import
netcdf
time
from
cftime
import
u
time
import
copy
import
logging
class
Reader
(
object
):
...
...
@@ -74,7 +74,7 @@ class Reader(object):
x
=
[
filename
,
index
]
group
.
data_list
.
append
(
x
)
group
.
time_counter
.
append
(
varid
[
index
]
+
t_adjust
)
group
.
date_counter
.
append
(
netcdftime
.
utime
(
varid
.
units
,
group
.
date_counter
.
append
(
utime
(
varid
.
units
,
varid
.
calendar
).
num2date
(
varid
[
index
]
+
t_adjust
))
group
.
units
=
varid
.
units
group
.
calendar
=
varid
.
calendar
...
...
This diff is collapsed.
Click to expand it.
pynemo/reader/ncml.py
View file @
d55e84e1
...
...
@@ -10,7 +10,7 @@ import string
import
logging
import
numpy
as
np
import
jnius_config
from
netCDF4
import
netcdf
time
from
cftime
import
u
time
ncmlpath
,
file_name
=
os
.
path
.
split
(
__file__
)
ncmlpath
=
os
.
path
.
join
(
ncmlpath
,
"jars"
,
"netcdfAll-4.6.jar"
)
jnius_config
.
set_classpath
(
'.'
,
ncmlpath
)
...
...
@@ -78,7 +78,7 @@ class Reader(object):
grid
.
time_counter
=
timevar
[:]
+
t_adjust
grid
.
date_counter
=
[]
for
index
in
range
(
0
,
len
(
grid
.
time_counter
)):
grid
.
date_counter
.
append
(
netcdftime
.
utime
(
grid
.
units
,
grid
.
date_counter
.
append
(
utime
(
grid
.
units
,
grid
.
calendar
).
num2date
(
grid
.
time_counter
[
index
]))
def
close
(
self
):
...
...
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