You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by hu...@apache.org on 2015/10/13 23:10:35 UTC

[2/3] climate git commit: code clean up

code clean up


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

Branch: refs/heads/master
Commit: 6b9df272374690a87458f87fe66cb4a6bf8cb040
Parents: b471b45
Author: Huikyo Lee <hl...@discover28.prv.cube>
Authored: Wed Oct 7 19:47:01 2015 -0400
Committer: Huikyo Lee <hl...@discover28.prv.cube>
Committed: Wed Oct 7 19:47:01 2015 -0400

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


http://git-wip-us.apache.org/repos/asf/climate/blob/6b9df272/ocw/data_source/local.py
----------------------------------------------------------------------
diff --git a/ocw/data_source/local.py b/ocw/data_source/local.py
index 1c83d8f..a12841c 100644
--- a/ocw/data_source/local.py
+++ b/ocw/data_source/local.py
@@ -158,10 +158,10 @@ def load_WRF_2d_files(file_path=None,
             times.append(datetime(*time_struct_parsed[:6]) + timedelta(hours=ihour))
         values0= file_object.variables[variable_name][:]
         if ifile == 0:
-            values = file_object.variables[variable_name][:]
+            values = values0                                  
             variable_unit = file_object.variables[variable_name].units
         else:
-            values = numpy.concatenate((values, file_object.variables[variable_name][:])) 
+            values = numpy.concatenate((values, values0)) 
         file_object.close()
     times = numpy.array(times)
     return Dataset(lats, lons, times, values, variable_name, units=variable_unit, name=name)