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-742 - ocw.data_source.local.py cannot properly detect the altitude dimension
Date Tue, 02 Feb 2016 02:58:02 GMT
Repository: climate
Updated Branches:
  refs/heads/master 9d789cac9 -> a4ccb10f7


CLIMATE-742 - ocw.data_source.local.py cannot properly detect the altitude dimension

- In ocw.data_source.local.load_file, level_index is fixed as 1 (the 2nd dimension) if the
input dataset has four dimensions.


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

Branch: refs/heads/master
Commit: 71696cb79be8ebb3cf1e74f4c2e5280f23174187
Parents: d9e3c7e
Author: huikyole <huikyole@argo.jpl.nasa.gov>
Authored: Mon Feb 1 18:49:52 2016 -0800
Committer: huikyole <huikyole@argo.jpl.nasa.gov>
Committed: Mon Feb 1 18:49:52 2016 -0800

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


http://git-wip-us.apache.org/repos/asf/climate/blob/71696cb7/ocw/data_source/local.py
----------------------------------------------------------------------
diff --git a/ocw/data_source/local.py b/ocw/data_source/local.py
index 34738ac..14c9da3 100644
--- a/ocw/data_source/local.py
+++ b/ocw/data_source/local.py
@@ -257,7 +257,8 @@ def load_file(file_path,
         elev_names = set(dimension_names) - set(lat_lon_time_var_names)
 
         # Grab the index value for the elevation values
-        level_index = dimension_names.index(elev_names.pop())
+        #level_index = dimension_names.index(elev_names.pop())
+        level_index = 1
 
         # Strip out the elevation values so we're left with a 3D array.
         if level_index == 0:
@@ -406,9 +407,9 @@ def load_WRF_2d_files_RAIN(file_path=None,
     times2 = numpy.array(times2)
     return Dataset(lats, lons, times2, values, variable_name, units=variable_unit, name=name)
 
-def load_dataset_from_multiple_netcdf_files(file_list, variable_name,
+def load_dataset_from_multiple_netcdf_files(variable_name, 
                                             lat_name=None, lon_name=None, time_name=None,
-                                            name='', file_path=None, filename_pattern=None,
+                                            name='', file_list=None, file_path=None, filename_pattern=None,
                                             mask_file=None, mask_variable=None, mask_value=0):
     ''' Load multiple netCDF files from the same source (an observation or a model) into
a Dataset.
     The dataset can be spatially subset.


Mime
View raw message