climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject [2/6] climate git commit: CLIMATE-552 - Remove dead code from local.py
Date Fri, 07 Nov 2014 21:39:39 GMT
CLIMATE-552 - Remove dead code from local.py


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

Branch: refs/heads/master
Commit: 3992e0c61058770df7d4df90347e0e910db4dddc
Parents: 99b5732
Author: Michael Joyce <joyce@apache.org>
Authored: Fri Nov 7 11:09:07 2014 -0800
Committer: Michael Joyce <joyce@apache.org>
Committed: Fri Nov 7 11:09:07 2014 -0800

----------------------------------------------------------------------
 ocw/data_source/local.py | 21 ---------------------
 1 file changed, 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/3992e0c6/ocw/data_source/local.py
----------------------------------------------------------------------
diff --git a/ocw/data_source/local.py b/ocw/data_source/local.py
index b72cd70..85e27b3 100644
--- a/ocw/data_source/local.py
+++ b/ocw/data_source/local.py
@@ -116,26 +116,6 @@ def load_file(file_path, variable_name, elevation_index=0):
     lon_name = _get_netcdf_variable_name(LON_NAMES, netcdf, variable_name)
     time_name = _get_netcdf_variable_name(TIME_NAMES, netcdf, variable_name)
 
-    # Check returned variable dimensions. lats, lons, and times should be 1D
-    #
-    # Check dimensions of the values
-    # if != 3
-    #   find the indices for lat, lon, time
-    #   strip out everything else by select 1st of possible options
-    #
-    # Check the order of the variables
-    # if not correct order (times, lats, lons)
-    #    reorder as appropriate
-    #
-    # Make new dataset object
-
-    '''
-    if variable_name in variable_names:
-        value_variable_name = variable_name
-    else:
-        possible_value_name = list(set(variable_names) - set([lat_variable_name, lon_variable_name,
time_variable_name, level_variable_name]))
-        value_variable_name = _get_value_name(possible_value_name)
-    '''
     lats = netcdf.variables[lat_name][:]    
     lons = netcdf.variables[lon_name][:]
     time_raw_values = netcdf.variables[time_name][:]
@@ -145,7 +125,6 @@ def load_file(file_path, variable_name, elevation_index=0):
 
 
     if len(values.shape) == 4:
-        #value_dimensions_names = list(netcdf.variables[variable_name].dimensions)
         value_dimensions_names = [dim_name.encode() for dim_name in netcdf.variables[variable_name].dimensions]
         lat_lon_time_var_names = [lat_name, lon_name, time_name]
         level_index = value_dimensions_names.index(list(set(value_dimensions_names) - set(lat_lon_time_var_names))[0])


Mime
View raw message