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 2016/02/02 03:58:02 UTC
[1/2] climate git commit: CLIMATE-742 - ocw.data_source.local.py
cannot properly detect the altitude dimension
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 <hu...@argo.jpl.nasa.gov>
Authored: Mon Feb 1 18:49:52 2016 -0800
Committer: huikyole <hu...@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.
[2/2] climate git commit: CLIMATE-742 - ocw.data_source.local.py
cannot properly detect the altitude dimension
Posted by hu...@apache.org.
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/a4ccb10f
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/a4ccb10f
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/a4ccb10f
Branch: refs/heads/master
Commit: a4ccb10f78fb04b7afd723f04ce60deb23bead88
Parents: 9d789ca 71696cb
Author: huikyole <hu...@argo.jpl.nasa.gov>
Authored: Mon Feb 1 18:57:33 2016 -0800
Committer: huikyole <hu...@argo.jpl.nasa.gov>
Committed: Mon Feb 1 18:57:33 2016 -0800
----------------------------------------------------------------------
ocw/data_source/local.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------