How to leave the oceans blank in the basemap?

0

The following code produces a map with a color scheme. I need the colors to be just on the continents, leaving the oceans blank. How do I get this? Excel file: link

dados=['meteo_model.xlsx']    #vai buscar os dados ao ficheiro excel
sheets=['Longitude (deg)','Latitude (deg)','Pressure (hPa)','Temperature (K)','qv (g kg^-1)','W (m s^-1)','V (m s^-1)','U (m s^-1)','Rain (mm)'
    ,'Elevation (m)']
nvar=len(sheets)
wb=pyxl.load_workbook(dados[0]) 


ivar=0 
for variable in sheets: 
ws=wb[variable]
if variable=='Longitude (deg)': 
    rows=ws.max_row        #identifica dimensao da worksheet
    cols=ws.max_column
    var=np.zeros((rows,cols,nvar))
for r in range(rows):
    for c in range(cols):
            var[r,c,ivar]=ws.cell(row=r+1,column=c+1).value        
ivar=ivar+1
lon=var[:,:,0];lat=var[:,:,1]; qv = var [:,:,3] - 273.15

plt.figure()
mymap = Basemap(height = 1.2e6, width = 1.2e6, resolution = 'l', area_thresh = 0.1, projection = 'tmerc',lon_0= -5,lat_0 = 40)
mymap.drawcoastlines(linewidth = 1)
mymap.drawmeridians(np.arange(0,360,5),labels = [False,False,False,True])
mymap.drawparallels(np.arange(-90,90,5),labels = [True,False,False,False])
x , y = mymap(lon,lat)



mymap = mymap.pcolormesh(x,y,qv,cmap='jet')
    
asked by anonymous 17.04.2018 / 00:30

0 answers