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 2015/10/09 02:15:04 UTC

[3/5] climate git commit: CLIMATE-688 - Visualization and model ensemble calculation in run_RCMES.py

CLIMATE-688 - Visualization and model ensemble calculation in run_RCMES.py

- color map for the bias map is changed
- the model ensemble is calculated only if there are multiple models


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

Branch: refs/heads/master
Commit: 965e7c45d195928d0ad192e5c7a753dd82062a41
Parents: 491c78b
Author: huikyole <hu...@argo.jpl.nasa.gov>
Authored: Thu Oct 8 15:55:18 2015 -0700
Committer: huikyole <hu...@argo.jpl.nasa.gov>
Committed: Thu Oct 8 15:55:18 2015 -0700

----------------------------------------------------------------------
 examples/configuration_file_examples/metrics_and_plots.py | 2 +-
 examples/configuration_file_examples/run_RCMES.py         | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/965e7c45/examples/configuration_file_examples/metrics_and_plots.py
----------------------------------------------------------------------
diff --git a/examples/configuration_file_examples/metrics_and_plots.py b/examples/configuration_file_examples/metrics_and_plots.py
index b564da5..f32446c 100644
--- a/examples/configuration_file_examples/metrics_and_plots.py
+++ b/examples/configuration_file_examples/metrics_and_plots.py
@@ -51,7 +51,7 @@ def Map_plot_bias_of_multiyear_climatology(obs_dataset, obs_name, model_datasets
     m.drawcoastlines(linewidth=1)
     m.drawcountries(linewidth=1)
     m.drawstates(linewidth=0.5, color='w')
-    max = m.contourf(x,y,obs_clim,levels = plotter._nice_intervals(obs_dataset.values, 10), extend='both',cmap='PuOr')
+    max = m.contourf(x,y,obs_clim,levels = plotter._nice_intervals(obs_dataset.values, 10), extend='both',cmap='rainbow')
     ax.annotate('(a) \n' + obs_name,xy=(lon_min, lat_min))
     cax = fig.add_axes([0.02, 1.-float(1./row), 0.01, 1./row*0.6])
     plt.colorbar(max, cax = cax) 

http://git-wip-us.apache.org/repos/asf/climate/blob/965e7c45/examples/configuration_file_examples/run_RCMES.py
----------------------------------------------------------------------
diff --git a/examples/configuration_file_examples/run_RCMES.py b/examples/configuration_file_examples/run_RCMES.py
index 6064c11..d32c7af 100644
--- a/examples/configuration_file_examples/run_RCMES.py
+++ b/examples/configuration_file_examples/run_RCMES.py
@@ -141,8 +141,9 @@ for idata,dataset in enumerate(model_datasets):
     
 
 print 'Generating multi-model ensemble'
-model_datasets.append(dsp.ensemble(model_datasets))
-model_names.append('ENS-models')
+if len(model_datasets) >= 2.:
+    model_datasets.append(dsp.ensemble(model_datasets))
+    model_names.append('ENS')
 
 """ Step 6: Generate subregion average and standard deviation """
 if config['use_subregions']: