%%capture# comment above line to see details about the run(s) displayedfrommiscimport*frommom6_tools.m6plotimportmyStats,annotateStats,xycompareimportcartopy.crsasccrsimportcartopy.featureimportintake%matplotlibinline
# load aviso from oce-catalogobs='adt-aviso-tx2_3v2'catalog=intake.open_catalog(diag_config_yml['oce_cat'])print('\n Reading climatology from: ',obs)ssh_obs=catalog[obs].to_dask().where(grd_xr[0].wet>0.)ssh_obs
foriinrange(len(casename)):ds_model=ds[i].assign_coords({"latitude":(("yh","xh"),grd[i].geolat.data),"longitude":(("yh","xh"),grd[i].geolon.data)})g=ds_model.ssh_climatology.plot(x="longitude",y="latitude",col='month',col_wrap=3,robust=True,figsize=(14,12),cmap=plt.cm.RdBu_r,vmin=-1.2,vmax=1.2,cbar_kwargs={"orientation":"horizontal","pad":0.05,"label":'MLD (m), 0.03 density criteria'},)# Add a suptitleg.fig.suptitle('Run {}, mean between {} to {}'.format(label[i],start_date,end_date),fontsize=16,y=1.02);
foriinrange(len(casename)):ds_model=ds[i].assign_coords({"latitude":(("yh","xh"),grd[i].geolat.data),"longitude":(("yh","xh"),grd[i].geolon.data)})ax=ds_model.ssh_climatology.weighted(grd_xr[i].areacello.fillna(0)).mean('xh').plot(hue='month',figsize=(10,6))plt.grid()plt.suptitle('Run {}, mean between {} to {}'.format(label[i],start_date,end_date),fontsize=16,y=1.02);