@@ -0,0 +1,1254 @@
+import pygrib as pg%0Aimport numpy as np%0Aimport matplotlib.pyplot as plt%0Aimport seaborn as sns%0A%0Aimport scipy.sparse as sparse%0A%0AfH = pg.open('metadata/HHL.grb')%0AdH = %5Bx for x in fH%5D%0A%0A#heights = np.array(%5Bx.values for x in fH%5D)%0A#lats, lons = x.latlons()%0A%0A# heights = np.array(%5Bx.values for x in f%5D)%0A# lats, lons = x.latlons()%0A%0A# nodal = np.load('metadata/wndtransfercsr.npz')%0A# transfer = sparse.csr_matrix((nodal%5B'data'%5D, nodal%5B'indices'%5D, nodal%5B'indptr'%5D), shape=solartransfer%5B'shape'%5D)%0A%0A%0A# data = nodal%5B'data'%5D%0A# indices = nodal%5B'indices'%5D%0A# indptr = nodal%5B'indptr'%5D%0A%0A# lats,lons = fH%5B1%5D.latlons()%0A# # data = f2%5B1%5D.values%0A%0A# newlats = %5B%5D%0A# newlons = %5B%5D%0A# for i in range(0, len(lats)-1):%0A# %09newlats.append(lats%5Bi%5D)%0A# %09newlons.append(lons%5Bi%5D)%0A%0Aolats = np.load('../../Data/Metadata/lats.npy')%0Aolons = np.load('../../Data/Metadata/lons.npy')%0Aonshoremap = np.load('../../Data/Metadata/onshore.npy')%0A%0Andata = np.load('../../Data/Metadata/onshore_COSMO.npz')%0Anlats = ndata%5B'lats'%5D%0Anlons = ndata%5B'lons'%5D%0Anonshoremap = ndata%5B'onshore'%5D%0A%0A# plt.contourf(lons, lats, data, 50, cmap=plt.cm.YlGnBu_r)%0A# plt.colorbar()%0A#plt.scatter(newlons, newlats)%0Aplt.contourf(olons, olats, onshoremap, l=2)%0Aplt.contourf(nlons, nlats, nonshoremap, l=2)%0Aplt.tight_layout()%0Aplt.show()%0A%0A

update test.py