import os import sys import numpy as np import geotifflib import matplotlib.pyplot as plt import matplotlib LANDSATDIR = os.path.join(os.getenv("DATA_HOME"),"Imagery/Landsat/Helheim/TIF/") xtab,ytab,ztab = geotifflib.readrgb(LANDSATDIR+"20140307140010_LC82320132014066LGN00.tif") xnon,ynon,znon = geotifflib.readrgb(LANDSATDIR+"20140501140530_LC82330132014121LGN00.tif") xmin = 305000.0 xmax = 314000.0 ymin = -2582500.0 ymax = -2572500.0 plt.figure(figsize=(5,2.9)) gs = matplotlib.gridspec.GridSpec(1,2) plt.subplot(gs[0]) plt.imshow(ztab,origin='lower',extent=[np.min(xtab),np.max(xtab),np.min(ytab),np.max(ytab)]) plt.xlim([xmin,xmax]) plt.ylim([ymin,ymax]) plt.xticks([]) plt.yticks([]) plt.text(xmin+0.05*(xmax-xmin),ymax-0.08*(ymax-ymin),'a',fontsize=9,fontname='arial',fontweight='bold') plt.subplot(gs[1]) plt.imshow(znon,origin='lower',extent=[np.min(xnon),np.max(xnon),np.min(ynon),np.max(ynon)])
# # Laura Kehrl, 10 April 2018 import os import numpy as np import cubehelix, matplotlib import masklib, inverselib, geotifflib, datelib, glaclib, vellib import matplotlib.pyplot as plt from mpl_toolkits.basemap import Basemap # Cutoff for velocities velocity_cutoff = 1000 #m/yr # Image for plotting imagetime_HG = datelib.date_to_fracyear(2014, 7, 4) ximage_HG,yimage_HG,image_HG = geotifflib.readrgb(os.path.join(os.getenv("DATA_HOME"),\ "Imagery/Landsat/Helheim/TIF/20140704140535_LC82330132014185LGN00.tif")) imagetime_KG = datelib.date_to_fracyear(2014, 7, 6) ximage_KG,yimage_KG,image_KG = geotifflib.readrgb(os.path.join(os.getenv("DATA_HOME"),\ "Imagery/Landsat/Kanger/TIF/20140706135251_LC82310122014187LGN00.tif")) # Glacier extents for inversions extent_HG = np.loadtxt('/Users/kehrl/Models/Helheim/3D/INV_SSA_ModelT/' + 'DEM20120316_modelT_Lcurve/inputs/mesh_extent.dat') hole1_HG = np.loadtxt('/Users/kehrl/Models/Helheim/3D/INV_SSA_ModelT/' + 'DEM20120316_modelT_Lcurve/inputs/mesh_hole1.dat') hole2_HG = np.loadtxt('/Users/kehrl/Models/Helheim/3D/INV_SSA_ModelT/' + 'DEM20120316_modelT_Lcurve/inputs/mesh_hole2.dat') extent_KG = np.loadtxt('/Users/kehrl/Models/Kanger/3D/INV_SSA_ModelT/' + 'DEM20120522_modelT_Lcurve/inputs/mesh_extent.dat')
bottom=0.26) plt.savefig(os.path.join(os.getenv("HOME"), "Bigtmp/AGU_" + glacier + "_thinning.pdf"), FORMAT='PDF', dpi=600) plt.close() ####################### # Helheim ungrounding # ####################### for i in range(0, 2): if i == 0: ximage, yimage, image = geotifflib.readrgb( os.path.join( os.getenv("DATA_HOME"), "Mosaics/Helheim/mosaicHelheim.2013-128.148.32713_1-20mgeo.tif" )) ind = np.argmin(abs(timewv_H - datelib.date_to_fracyear(2013, 5, 8))) else: ind = np.argmin(abs(timewv_H - datelib.date_to_fracyear(2014, 1, 27))) ximage, yimage, image = geotifflib.readrgb( os.path.join( os.getenv("DATA_HOME"), "Mosaics/Helheim/mosaicHelheim.2014-027.148.36721_1-20mgeo.tif" )) data = zabovefloat_H[:, ind] fig = plt.figure(figsize=(2.5, 2.5)) matplotlib.rc('font', family='Arial') ax = plt.gca()