Created
October 29, 2020 15:36
-
-
Save jbusecke/a083f6e7abf74e94b9e797dda6246e9b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ds_sigma_section = ds_sigma.sel( | |
time='2010-01', | |
y=slice(-90,10) | |
).interp(x=230).squeeze() | |
fig, axarr = plt.subplots(nrows=2, figsize=[10,8], sharex=True) | |
for ax, var, cmap in zip( | |
axarr.flat, | |
['so', 'cfc11'], | |
[cmo.haline, cmo.matter] | |
): | |
kwargs = dict(yincrease=False, x='lat', y='sigma_0', ax=ax) | |
ds_sigma_section[var].plot.contourf( | |
levels=31, robust=True, cmap=cmap, **kwargs | |
) | |
ax.axhline(26.4, color='C1') | |
ax.set_title('') | |
# add a bit more space between the panels | |
fig.subplots_adjust(hspace=0.2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment