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/01/20 19:42:34 UTC
[1/4] climate git commit: CLIMATE-717 - Debugging CLI
Repository: climate
Updated Branches:
refs/heads/master 67189a7d6 -> 8bc19c65a
CLIMATE-717 - Debugging CLI
- ocw-cli/cli_app.py has been updated.
- Spatial subsetting is not applied if the model data uses curvilinear grids.
- Units of all datasets are checked and converted if needed.
- Missing data information is propagated from each dataset to the others.
- CLI uses the recently added metrics class, TemporalMeanBias.
- Climatology plots of an observation and a model are generated.
Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/a40b8e42
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/a40b8e42
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/a40b8e42
Branch: refs/heads/master
Commit: a40b8e42b7ffb1459cd328102303ef5e7d7dbd7c
Parents: ca93686
Author: huikyole <hu...@argo.jpl.nasa.gov>
Authored: Thu Jan 7 00:02:03 2016 -0800
Committer: huikyole <hu...@argo.jpl.nasa.gov>
Committed: Thu Jan 7 00:02:03 2016 -0800
----------------------------------------------------------------------
ocw-cli/cli_app.py | 32 +++++++++++++++++++-------------
1 file changed, 19 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/climate/blob/a40b8e42/ocw-cli/cli_app.py
----------------------------------------------------------------------
diff --git a/ocw-cli/cli_app.py b/ocw-cli/cli_app.py
index 0d28ce6..76ca391 100644
--- a/ocw-cli/cli_app.py
+++ b/ocw-cli/cli_app.py
@@ -599,7 +599,13 @@ def run_screen(model_datasets, models_info, observations_info,
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.subset(EVAL_BOUNDS, new_model_datasets[member])
+ 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:
+ timeStart = min(np.nonzero(each_target_dataset.times >= EVAL_BOUNDS.start)[0])
+ timeEnd = max(np.nonzero(each_target_dataset.times <= EVAL_BOUNDS.end)[0])
+ new_model_datasets[member].times = each_target_dataset.times[timeStart:timeEnd+1]
+ new_model_datasets[member].values = each_target_dataset.values[timeStart:timeEnd+1,:]
screen.addstr(5, 4, "--> Temporally regridded.")
screen.refresh()
@@ -609,21 +615,18 @@ def run_screen(model_datasets, models_info, observations_info,
new_lons = np.arange(overlap_min_lon, overlap_max_lon, spatial_grid_setting_lon)
for i in range(len(obs_dataset)):
obs_dataset[i] = dsp.spatial_regrid(obs_dataset[i], new_lats, new_lons)
+ obs_dataset[i] = dsp.variable_unit_conversion(obs_dataset[i])
for member, each_target_dataset in enumerate(new_model_datasets):
new_model_datasets[member] = dsp.spatial_regrid(new_model_datasets[member], new_lats, new_lons)
+ new_model_datasets[member] = dsp.variable_unit_conversion(new_model_datasets[member])
screen.addstr(6, 4, "--> Spatially regridded.")
screen.refresh()
- if metric == 'bias':
- for i in range(len(obs_dataset)):
- _, obs_dataset[i].values = utils.calc_climatology_year(obs_dataset[i])
- obs_dataset[i].values = np.expand_dims(obs_dataset[i].values, axis=0)
-
- for member, each_target_dataset in enumerate(new_model_datasets):
- _, new_model_datasets[member].values = utils.calc_climatology_year(new_model_datasets[member])
- new_model_datasets[member].values = np.expand_dims(new_model_datasets[member].values, axis=0)
+ obs_dataset = dsp.mask_missing_data(obs_dataset+new_model_datasets)[0:len(obs_dataset)]
+ new_model_datasets = dsp.mask_missing_data(obs_dataset+new_model_datasets)[len(obs_dataset):]
+ if metric == 'bias':
allNames = []
for model in new_model_datasets:
@@ -631,7 +634,7 @@ def run_screen(model_datasets, models_info, observations_info,
screen.addstr(7, 4, "Setting up metrics...")
screen.refresh()
- mean_bias = metrics.Bias()
+ mean_bias = metrics.TemporalMeanBias()
pattern_correlation = metrics.PatternCorrelation()
spatial_std_dev_ratio = metrics.StdDevRatio()
screen.addstr(7, 4, "--> Metrics setting done.")
@@ -652,21 +655,24 @@ def run_screen(model_datasets, models_info, observations_info,
targets.append(new_model_datasets[int(target[-1])])
evaluation_result = evaluation.Evaluation(reference, targets, [mean_bias])
- export_evaluation_to_config(evaluation_result)
+ #export_evaluation_to_config(evaluation_result)
evaluation_result.run()
screen.addstr(8, 4, "--> Evaluation Finished.")
screen.refresh()
screen.addstr(9, 4, "Generating plots....")
screen.refresh()
- rcm_bias = evaluation_result.results[:][0]
- new_rcm_bias = np.squeeze(np.array(evaluation_result.results))
+ new_rcm_bias = evaluation_result.results[0]
if not os.path.exists(working_directory):
os.makedirs(working_directory)
fname = working_directory + 'Bias_contour'
+ fname2= working_directory + 'Obs_contour'
+ fname3= working_directory + 'Model_contour'
plotter.draw_contour_map(new_rcm_bias, new_lats, new_lons, gridshape=(2, 5), fname=fname, subtitles=allNames, cmap='coolwarm_r')
+ plotter.draw_contour_map(utils.calc_temporal_mean(reference), new_lats, new_lons, gridshape=(2, 5), fname=fname2, subtitles=allNames, cmap='coolwarm_r')
+ plotter.draw_contour_map(utils.calc_temporal_mean(targets[0]), new_lats, new_lons, gridshape=(2, 5), fname=fname3, subtitles=allNames, cmap='coolwarm_r')
screen.addstr(9, 4, "--> Plots generated.")
screen.refresh()
screen.addstr(y-2, 1, "Press 'enter' to Exit: ")
[4/4] climate git commit: -ocw-cli/cli_app.py has been updated.
-Spatial subsetting is not applied if the model data uses curvilinear grids.
-Units of all datasets are checked and converted if needed. -Missing data
information is propagated from each dat
Posted by hu...@apache.org.
-ocw-cli/cli_app.py has been updated.
-Spatial subsetting is not applied if the model data uses curvilinear grids.
-Units of all datasets are checked and converted if needed.
-Missing data information is propagated from each dataset to the others.
-CLI uses the recently added metrics class, TemporalMeanBias.
-Climatology plots of an observation and a model are generated.
Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/8bc19c65
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/8bc19c65
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/8bc19c65
Branch: refs/heads/master
Commit: 8bc19c65a5e23e0e0a01b5780175b0d915d8ac30
Parents: 67189a7 39202dc
Author: huikyole <hu...@argo.jpl.nasa.gov>
Authored: Wed Jan 20 10:41:40 2016 -0800
Committer: huikyole <hu...@argo.jpl.nasa.gov>
Committed: Wed Jan 20 10:41:40 2016 -0800
----------------------------------------------------------------------
ocw-cli/cli_app.py | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
[3/4] climate git commit: updated subset after CLIMATE-718 is merged
Posted by hu...@apache.org.
updated subset after CLIMATE-718 is merged
Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/39202dc4
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/39202dc4
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/39202dc4
Branch: refs/heads/master
Commit: 39202dc49f434f062d40e7a09c655161405036d1
Parents: cee5b62
Author: huikyole <hu...@argo.jpl.nasa.gov>
Authored: Fri Jan 15 16:53:48 2016 -0800
Committer: huikyole <hu...@argo.jpl.nasa.gov>
Committed: Fri Jan 15 16:53:48 2016 -0800
----------------------------------------------------------------------
ocw-cli/cli_app.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/climate/blob/39202dc4/ocw-cli/cli_app.py
----------------------------------------------------------------------
diff --git a/ocw-cli/cli_app.py b/ocw-cli/cli_app.py
index 76ca391..60f5219 100644
--- a/ocw-cli/cli_app.py
+++ b/ocw-cli/cli_app.py
@@ -602,10 +602,7 @@ def run_screen(model_datasets, models_info, observations_info,
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:
- timeStart = min(np.nonzero(each_target_dataset.times >= EVAL_BOUNDS.start)[0])
- timeEnd = max(np.nonzero(each_target_dataset.times <= EVAL_BOUNDS.end)[0])
- new_model_datasets[member].times = each_target_dataset.times[timeStart:timeEnd+1]
- new_model_datasets[member].values = each_target_dataset.values[timeStart:timeEnd+1,:]
+ new_model_datasets[member] = dsp.temporal_slice(EVAL_BOUNDS.start, EVAL_BOUNDS.end, each_target_dataset)
screen.addstr(5, 4, "--> Temporally regridded.")
screen.refresh()
[2/4] climate git commit: Merge branch 'master' of
https://github.com/apache/climate into CLIMATE-717
Posted by hu...@apache.org.
Merge branch 'master' of https://github.com/apache/climate into CLIMATE-717
Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/cee5b627
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/cee5b627
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/cee5b627
Branch: refs/heads/master
Commit: cee5b6273f73d9119535fa8b7610be536111c755
Parents: a40b8e4 bb415ad
Author: huikyole <hu...@argo.jpl.nasa.gov>
Authored: Fri Jan 15 15:55:47 2016 -0800
Committer: huikyole <hu...@argo.jpl.nasa.gov>
Committed: Fri Jan 15 15:55:47 2016 -0800
----------------------------------------------------------------------
easy-ocw/conda-install.sh | 45 +++++++++++
easy-ocw/conda_environment.txt | 54 +++++++++++++
easy-ocw/install-osx.sh | 50 ++++++++----
easy-ocw/install-ubuntu.sh | 17 +++-
easy-ocw/ocw-conda-dependencies.txt | 1 +
.../NARCCAP_paper/Fig10_and_Fig11.yaml | 81 +++++++++++++++++++
.../NARCCAP_paper/Fig12_summer.yaml | 75 ++++++++++++++++++
.../NARCCAP_paper/Fig12_winter.yaml | 75 ++++++++++++++++++
.../NARCCAP_paper/Fig14_and_Fig15.yaml | 82 ++++++++++++++++++++
.../NARCCAP_paper/Fig16_summer.yaml | 75 ++++++++++++++++++
.../NARCCAP_paper/Fig16_winter.yaml | 75 ++++++++++++++++++
.../NARCCAP_paper/Fig5_and_Fig6.yaml | 50 ++++++++++++
.../NARCCAP_paper/Fig7_summer.yaml | 75 ++++++++++++++++++
.../NARCCAP_paper/Fig7_winter.yaml | 75 ++++++++++++++++++
.../NARCCAP_paper/Fig8_and_Fig9.yaml | 50 ++++++++++++
...ordex-AF_tasmax_annual_mean_bias_to_cru.yaml | 2 +-
...ordex-arctic_cloud_fraction_bias_to_SRB.yaml | 65 ++++++++++++++++
.../cordex-arctic_rlds_bias_to_SRB.yaml | 65 ++++++++++++++++
.../cordex-arctic_rlus_bias_to_SRB.yaml | 65 ++++++++++++++++
.../cordex-arctic_rsds_bias_to_SRB.yaml | 65 ++++++++++++++++
.../metrics_and_plots.py | 32 ++++++--
.../configuration_file_examples/run_RCMES.py | 19 +++++
ocw-vm/Vagrantfile | 2 +-
ocw-vm/init-ocw-vm.sh | 23 ++++--
ocw/dataset_processor.py | 64 +++++++++++----
25 files changed, 1233 insertions(+), 49 deletions(-)
----------------------------------------------------------------------