Repository: climate
Updated Branches:
  refs/heads/master 7187cf306 -> 9fa81d3bc


CLIMATE-892 - Fix GPM IMERG data loader

ocw.data_source.local.load_GPM_IMERG_files has been fixed to maintain the 
information on missing values.


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

Branch: refs/heads/master
Commit: 9dceb87e9685beff2c4e22d56630fd9d3870bd6d
Parents: 7187cf3
Author: huikyole <huiky...@argo.jpl.nasa.gov>
Authored: Mon Jan 9 20:46:08 2017 -0800
Committer: huikyole <huiky...@argo.jpl.nasa.gov>
Committed: Mon Jan 9 20:46:08 2017 -0800

----------------------------------------------------------------------
 ocw/data_source/local.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/9dceb87e/ocw/data_source/local.py
----------------------------------------------------------------------
diff --git a/ocw/data_source/local.py b/ocw/data_source/local.py
index fecf25c..66fae9b 100644
--- a/ocw/data_source/local.py
+++ b/ocw/data_source/local.py
@@ -643,13 +643,13 @@ def load_GPM_IMERG_files(file_path=None,
         file_object = h5py.File(file)
         time_struct_parsed = strptime(file[-39:-23], "%Y%m%d-S%H%M%S")
         times.append(datetime(*time_struct_parsed[:6]))
-        values0 = numpy.transpose(ma.masked_less(
+        values0 = ma.transpose(ma.masked_less(
             file_object['Grid'][variable_name][:], 0.))
-        values0 = numpy.expand_dims(values0, axis=0)
+        values0 = ma.expand_dims(values0, axis=0)
         if ifile == 0:
             values = values0
         else:
-            values = numpy.concatenate((values, values0))
+            values = ma.concatenate((values, values0))
         file_object.close()
     times = numpy.array(times)
     return Dataset(lats, lons, times, values, variable_name, 
units=variable_unit, name=name)

Reply via email to