import xarray as xr
import matplotlib.pyplot as plt

# Abrir o arquivo NetCDF
ds = xr.open_dataset("test.nc")

# Verificar as variáveis disponíveis
print(ds)

# Selecionar a variável mdepth
mdepth = ds['mdepth']

# Plotar a variável
plt.figure(figsize=(10,6))
mdepth.plot()
plt.title('MDepth')
plt.xlabel('Longitude')
plt.ylabel('Latitude')
plt.show()
