import numpy as np
import matplotlib.pyplot as plt
import xarray as xr
data = xr.open_dataset('mypath/data.nc')
lat=np.array(data['latitude'][:])
lon=np.array(data['longitude'][:])
u = np.array(data['u'][:])
u = u.reshape(len(lat),len(lon))
fig, ax = plt.subplots(1,1,figsize=(8, 6))
X,Y=np.meshgrid(lon,lat)
ax.contourf(X,Y,u)