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 20:18:57 UTC
[1/2] climate git commit: CLIMATE-749 - Changing temporal_resolution
key in CLI
Repository: climate
Updated Branches:
refs/heads/master d34caaea5 -> bd5ab80ab
CLIMATE-749 - Changing temporal_resolution key in CLI
- This is a follow up of the previous ticket, CLIMATE-732. CLI now uses correct keys when calling dataset_processor.temporal_rebin.
Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/97f9824d
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/97f9824d
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/97f9824d
Branch: refs/heads/master
Commit: 97f9824d2e41c2ea610c9b2c574c5d84575a3aed
Parents: d34caae
Author: huikyole <hu...@argo.jpl.nasa.gov>
Authored: Wed Feb 3 11:14:12 2016 -0800
Committer: huikyole <hu...@argo.jpl.nasa.gov>
Committed: Wed Feb 3 11:14:12 2016 -0800
----------------------------------------------------------------------
RCMES/cli_app.py | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/climate/blob/97f9824d/RCMES/cli_app.py
----------------------------------------------------------------------
diff --git a/RCMES/cli_app.py b/RCMES/cli_app.py
index 60f5219..4aaaad4 100644
--- a/RCMES/cli_app.py
+++ b/RCMES/cli_app.py
@@ -586,19 +586,11 @@ def run_screen(model_datasets, models_info, observations_info,
screen.addstr(5, 4, "Temporally regridding...")
screen.refresh()
- if temp_grid_setting.lower() == 'hourly':
- days = 0.5
- elif temp_grid_setting.lower() == 'daily':
- days = 1
- elif temp_grid_setting.lower() == 'monthly':
- days = 31
- else:
- days = 365
for i in range(len(obs_dataset)):
- obs_dataset[i] = dsp.temporal_rebin(obs_dataset[i], timedelta(days))
+ obs_dataset[i] = dsp.temporal_rebin(obs_dataset[i], temp_grid_setting.lower())
for member, each_target_dataset in enumerate(new_model_datasets):
- new_model_datasets[member] = dsp.temporal_rebin(new_model_datasets[member], timedelta(days))
+ new_model_datasets[member] = dsp.temporal_rebin(new_model_datasets[member], temp_grid_setting.lower())
if each_target_dataset.lats.ndim !=2 and each_target_dataset.lons.ndim !=2:
new_model_datasets[member] = dsp.subset(EVAL_BOUNDS, new_model_datasets[member])
else:
[2/2] climate git commit: CLIMATE-749 - Changing temporal_resolution
key in CLI
Posted by hu...@apache.org.
CLIMATE-749 - Changing temporal_resolution key in CLI
- This is a follow up of the previous ticket, CLIMATE-732. CLI now uses correct keys when calling dataset_processor.temporal_rebin.
Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/bd5ab80a
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/bd5ab80a
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/bd5ab80a
Branch: refs/heads/master
Commit: bd5ab80ab27e195db0517f2f144628cef3e4cc53
Parents: d34caae 97f9824
Author: huikyole <hu...@argo.jpl.nasa.gov>
Authored: Wed Feb 3 11:18:20 2016 -0800
Committer: huikyole <hu...@argo.jpl.nasa.gov>
Committed: Wed Feb 3 11:18:20 2016 -0800
----------------------------------------------------------------------
RCMES/cli_app.py | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
----------------------------------------------------------------------