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/03 06:28:55 UTC
[1/2] climate git commit: CLIMATE-748 - Debugging
ocw.dataset_processor
Repository: climate
Updated Branches:
refs/heads/master 027cea08c -> d34caaea5
CLIMATE-748 - Debugging ocw.dataset_processor
- dataset_processor.tempora_rebin has been fixed
- dataset_processor.spatial_regrid has been fixed
Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/7501df18
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/7501df18
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/7501df18
Branch: refs/heads/master
Commit: 7501df18991691be4b069420a5b84df0a8083dbd
Parents: 7f6bb69
Author: huikyole <hu...@argo.jpl.nasa.gov>
Authored: Tue Feb 2 21:24:00 2016 -0800
Committer: huikyole <hu...@argo.jpl.nasa.gov>
Committed: Tue Feb 2 21:24:00 2016 -0800
----------------------------------------------------------------------
ocw/dataset_processor.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/climate/blob/7501df18/ocw/dataset_processor.py
----------------------------------------------------------------------
diff --git a/ocw/dataset_processor.py b/ocw/dataset_processor.py
index 8ee5962..1825864 100755
--- a/ocw/dataset_processor.py
+++ b/ocw/dataset_processor.py
@@ -256,7 +256,10 @@ def spatial_regrid(target_dataset, new_latitudes, new_longitudes):
# Regrid the data on each time slice
for i in range(len(target_dataset.times)):
- values_original = ma.array(target_dataset.values[i])
+ if len(target_dataset.times) == 1:
+ values_original = ma.array(target_dataset.values)
+ else:
+ values_original = ma.array(target_dataset.values[i])
for shift in (-1, 1):
for axis in (0, 1):
q_shifted = np.roll(values_original, shift=shift, axis=axis)
@@ -905,7 +908,7 @@ def _rcmes_calc_average_on_new_time_unit(data, dates, unit):
nt, ny, nx = data.shape
if unit == 'full':
new_data = ma.mean(data, axis=0)
- new_date = [dates[size(dates)/2]]
+ new_date = [dates[dates.size/2]]
if unit == 'annual':
years = [d.year for d in dates]
years_sorted = np.unique(years)
[2/2] climate git commit: CLIMATE-748 - Debugging
ocw.dataset_processor
Posted by hu...@apache.org.
CLIMATE-748 - Debugging ocw.dataset_processor
- dataset_processor.tempora_rebin has been fixed
- dataset_processor.spatial_regrid has been fixed
Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/d34caaea
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/d34caaea
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/d34caaea
Branch: refs/heads/master
Commit: d34caaea5266c130671fbce89385b68afdf7277e
Parents: 027cea0 7501df1
Author: huikyole <hu...@argo.jpl.nasa.gov>
Authored: Tue Feb 2 21:28:17 2016 -0800
Committer: huikyole <hu...@argo.jpl.nasa.gov>
Committed: Tue Feb 2 21:28:17 2016 -0800
----------------------------------------------------------------------
ocw/dataset_processor.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------