Compare different \(K_e\) estimates#

Compare the different \(K_e\) estimates of Abernathey & Marshall (2013), Cole et al. (2015) and ECCO

Load data#

ECCO#

ecco = xr.open_dataset("../datasets/ecco/interp_Ks_ECCOv4.nc", autoclose=True).rename(
    {"Ks_ECCOv4": "Ke", "lon": "longitude", "lat": "latitude"}
)
ecco["i3"].values = ecco.dep.values
ecco["i2"].values = ecco.longitude[0, :].values
ecco["i1"].values = ecco.latitude[:, 0].values

ecco = ecco.rename({"i1": "lat", "i2": "lon", "i3": "depth"}).drop(["dep"])

# roll so that pacific is in the middle and we have coverage of all 3 basins
ecco = ecco.roll(lon=-360)
ecco.lon.values[ecco.lon.values < 0] += 360

ecco

# Ke = xr.Dataset()
# Ke['ecco'] = xr.DataArray(ecco.Ks_ECCOv4.values,
#                      coords={'lon': ecco.Ks_ECCOv4.lon.sel(i1=1).values,
#                              'lat': ecco.Ks_ECCOv4.lat.sel(i2=1).values,
#                              'depth': ecco.Ks_ECCOv4.dep.values},
#                      dims=['lat', 'lon', 'depth'])

np.log10(ecco.Ke.sel(depth=50, method="nearest")).plot.contourf(levels=15);
_images/5fbe605f6aa7dccbcde7124386ca4ef8e199e33a813868b17c97c88f1d676a1e.png

Abernathey & Marshall (2013)#

aber = xr.open_dataset("../datasets/diffusivity_AM2013.nc", autoclose=True)
aber

np.log10(aber.K_OC_LAT).plot(vmin=0)
/home/deepak/work/python/xarray/xarray/core/computation.py:565: RuntimeWarning: divide by zero encountered in log10
  result_data = func(*input_data)
<matplotlib.collections.QuadMesh at 0x7f2468461278>
_images/1eeb0d34970ed95c0304357bbd253e34976cfa7b571e705c3fddad5b29cc0d53.png

Cole et al. (2015)#

cole = (
    xr.open_dataset(
        "../datasets/argo-diffusivity/ArgoTS_eddydiffusivity_20052015_1deg.nc",
        autoclose=True,
    )
    .rename({"latitude": "lat", "longitude": "lon", "density": "sigma"})
    .set_coords(["lat", "lon", "sigma"])
)

cole["diffusivity_first"] = cole.diffusivity.bfill(dim="depth").isel(depth=0)

np.log10(cole.diffusivity.sel(depth=50, method="nearest")).plot()
<matplotlib.collections.QuadMesh at 0x7fc5f95a8198>
/home/deepak/anaconda3/lib/python3.6/site-packages/_pytest/fixtures.py:847: DeprecationWarning: The `convert` argument is deprecated in favor of `converter`.  It will be removed after 2019/01.
  params = attr.ib(convert=attr.converters.optional(tuple))
/home/deepak/anaconda3/lib/python3.6/site-packages/_pytest/fixtures.py:849: DeprecationWarning: The `convert` argument is deprecated in favor of `converter`.  It will be removed after 2019/01.
  ids = attr.ib(default=None, convert=_ensure_immutable_ids)
_images/339868f83d5175effa664ff97b07ef3ee4eef8c751395a854aef825791840b86.png

All three together#

f, ax = plt.subplots(3, 1, sharex=True, sharey=True)
f.set_size_inches(8, 12)

kwargs = dict(vmin=1, vmax=4)

np.log10(aber.K_OC_LAT).plot(ax=ax[0], **kwargs)

np.log10(cole.diffusivity_first).plot(ax=ax[1], **kwargs)

np.log10(ecco.Ke.sel(depth=0, method="nearest")).plot.contourf(
    ax=ax[2], levels=np.linspace(1, 4, 30), **kwargs
)

f.suptitle("Compare diffusivities", y=1)

ax[0].text(
    x=0.08,
    y=0.9,
    s="Abernathey & Marshall (2013) \nNear-Surface",
    fontsize=10,
    transform=ax[0].transAxes,
)
ax[1].text(
    x=0.08,
    y=0.9,
    s="Cole et al (2015)\nShallowest estimate",
    fontsize=10,
    transform=ax[1].transAxes,
)
ax[2].text(
    x=0.08,
    y=0.9,
    s="Forget et al (2015) \nECCO",
    fontsize=10,
    transform=ax[2].transAxes,
)

[aa.set_xlabel("") for aa in ax]
[aa.set_title("") for aa in ax]

plt.tight_layout()

plt.savefig("../images/diff-compare-surface.png", bbox_inches="tight")
/home/deepak/work/python/xarray/xarray/core/computation.py:565: RuntimeWarning: divide by zero encountered in log10
  result_data = func(*input_data)
_images/1db3a1a919749f046128abbd47e8d1b204f817ca478c2e62a131dc5f48dd04d6.png