In [1]:
import os
import numpy as np
from scipy.io import readsav
import iris
import iris.quickplot as qiplot
In [2]:
gmted2010_awm_path = '/home/bovy/Grids/'
lm_path = '/home/bovy/Grids/'
In [3]:
gmted2010_2x15_cube = iris.load_cube(os.path.join(gmted2010_awm_path, 'dem_GEOS57_2x2.5_awm.nc'))
gmted2010_4x5_cube = iris.load_cube(os.path.join(gmted2010_awm_path, 'dem_GEOS57_4x5_awm.nc'))
lm_2x15 = readsav('/home/mahieu/geos.runs/elev.2x25.sav')
lm_4x5 = readsav('/home/mahieu/geos.runs/elev.4x5.sav')
lm_2x15_cube = gmted2010_2x15_cube.copy()
lm_2x15_cube.data = lm_2x15['elev2x25_m']
lm_2x15_cube.var_name = "LM-ELEV_2x25"
lm_4x5_cube = gmted2010_4x5_cube.copy()
lm_4x5_cube.data = lm_4x5['elev4x5_m']
lm_4x5_cube.var_name = "LM-ELEV_4x5"
In [4]:
diff_2x15_cube = gmted2010_2x15_cube - lm_2x15_cube
diff_2x15_cube.var_name = "Diff_GMTED2010-LM_2x25"
diff_4x5_cube = gmted2010_4x5_cube - lm_4x5_cube
diff_4x5_cube.var_name = "Diff_GMTED2010-LM_4x5"
print diff_2x15_cube
print diff_4x5_cube
In [5]:
%pylab inline
qiplot.pcolormesh(diff_2x15_cube, vmin=-200, vmax=200, cmap=cm.RdBu)
plt.gca().coastlines()
plt.show()
In [6]:
qiplot.pcolormesh(diff_4x5_cube, vmin=-200, vmax=200, cmap=cm.RdBu)
plt.gca().coastlines()
plt.show()
In [6]: