Repository: climate
Updated Branches:
  refs/heads/master 3fb6bc193 -> e6fb4aa0b


CLIMATE-735 - Update utils.decode_time_values

- With this update, it is possible to efficiently handle the netCDF files whose 
time unit ends with 'Z' character.


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

Branch: refs/heads/master
Commit: b30e12b86f48c09c7365730fd66f87136b340a67
Parents: 162a1ba
Author: huikyole <[email protected]>
Authored: Sat Jan 30 11:51:06 2016 -0800
Committer: huikyole <[email protected]>
Committed: Sat Jan 30 11:51:06 2016 -0800

----------------------------------------------------------------------
 ocw/utils.py | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/b30e12b8/ocw/utils.py
----------------------------------------------------------------------
diff --git a/ocw/utils.py b/ocw/utils.py
index 3c7beb0..7adb3ed 100755
--- a/ocw/utils.py
+++ b/ocw/utils.py
@@ -43,6 +43,8 @@ def decode_time_values(dataset, time_var_name):
     '''
     time_data = dataset.variables[time_var_name]
     time_format = time_data.units
+    if time_format[-1].lower() == 'z':
+        time_format = time_format[:-1]
 
     time_units = parse_time_units(time_format)
     time_base = parse_time_base(time_format)

Reply via email to