@@ -0,0 +1,1720 @@
+import numpy as np    %0Aimport matplotlib.pyplot as plt %0Afrom xmitgcm import open_mdsdataset  %0A%0Aimport cartopy.crs as ccrs%0Afrom cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER%0Aplt.ion() %0A%0Adir1 = '/homedata/bderembl/runmit/test_southatlgyre3'%0A%0Ads1 = open_mdsdataset(dir1,prefix=%5B'U','V'%5D)%0A%0Ant = -1%0Anz = 0%0A%0A# Cartography U et V%0A%0Aplt.figure(1)%0Aax = plt.subplot(projection=ccrs.PlateCarree());%0Ads1%5B'U'%5D%5Bnt,nz,:,:%5D.plot.pcolormesh('XG', 'YC', ax=ax);%0Aplt.title('Case 4 : Zonal Component - U')%0Aax.coastlines()%0Agl = ax.gridlines(draw_labels=True, alpha = 0.5, linestyle='--');%0Agl.xlabels_top = False%0Agl.ylabels_right = False%0Agl.xformatter = LONGITUDE_FORMATTER%0Agl.yformatter = LATITUDE_FORMATTER%0Aplt.savefig('U_Zonal_component_cas4'+'.png')%0Aplt.clf()%0A%0Aplt.figure(2)%0Aax = plt.subplot(projection=ccrs.PlateCarree());%0Ads1%5B'V'%5D%5Bnt,nz,:,:%5D.plot.pcolormesh('XC', 'YG', ax=ax);%0Aplt.title(' Case 4 : Meridional Component - V')%0Aax.coastlines()%0Agl = ax.gridlines(draw_labels=True, alpha = 0.5, linestyle='--');%0Agl.xlabels_top = False%0Agl.ylabels_right = False%0Agl.xformatter = LONGITUDE_FORMATTER%0Agl.yformatter = LATITUDE_FORMATTER%0Aplt.savefig('V_Meridional_Component_cas4'+'.png')%0Aplt.clf()%0A%0A# Averages%0A%0AAverage_U = ds1.U.mean().values%0Aprint('Case 4 : Average of Zonal Component - U')%0Aprint(Average_U,'m/s')%0AAverage_U_mask = ds1.U.where(ds1.hFacW%3E0).mean().values%0Aprint('Case 4 : Average of Zonal Component without continents')%0Aprint(Average_U_mask,'m/s')%0A%0AAverage_V = ds1.V.mean().values%0Aprint('Case 4 :Average of Meridional Component - V')%0Aprint(Average_V,'m/s')%0AAverage_V_mask = ds1.V.where(ds1.hFacS%3E0).mean().values%0Aprint('Case 4 : Average of Meridional Component without continents')%0Aprint(Average_V_mask,'m/s')%0A

Create D_Velocity_components.py