climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From huiky...@apache.org
Subject [1/2] climate git commit: CLIMATE-955 - Bugs in dataset_processor.temporal_slice
Date Mon, 18 Jun 2018 02:47:43 GMT
Repository: climate
Updated Branches:
  refs/heads/master 050d3ac44 -> 926f65a3b


CLIMATE-955 - Bugs in dataset_processor.temporal_slice

- the bug that used netCDF4.netcdftime attribute has been fixed


Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/8742ee08
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/8742ee08
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/8742ee08

Branch: refs/heads/master
Commit: 8742ee0805459f2640a6ace0074eaaf3de97ad9d
Parents: 050d3ac
Author: huikyole <huikyole@argo.jpl.nasa.gov>
Authored: Sun Jun 17 19:45:37 2018 -0700
Committer: huikyole <huikyole@argo.jpl.nasa.gov>
Committed: Sun Jun 17 19:45:37 2018 -0700

----------------------------------------------------------------------
 ocw/dataset_processor.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/8742ee08/ocw/dataset_processor.py
----------------------------------------------------------------------
diff --git a/ocw/dataset_processor.py b/ocw/dataset_processor.py
index d27dc63..7d0dd4b 100755
--- a/ocw/dataset_processor.py
+++ b/ocw/dataset_processor.py
@@ -515,7 +515,7 @@ def temporal_slice(target_dataset, start_time, end_time):
     slice_start_time = start_time
     slice_end_time = end_time
 
-    if isinstance(target_dataset.times.item(0), netCDF4.netcdftime._netcdftime.datetime):
+    if type(target_dataset.times[0]) != datetime.datetime:
         slice_start_time =\
             type(target_dataset.times.item(0))(start_time.year, start_time.month, start_time.day,
                                             start_time.hour, start_time.minute, start_time.second)


Mime
View raw message