In [1]:
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
In [2]:
df = pd.read_csv('drifts_reformatted.csv')
In [3]:
df
Out[3]:
In [18]:
df_subset = df[df['variable'] == 'thermal OHC (J yr-1)']
df_subset['drift'] = df_subset['drift'].abs()
sns.boxplot(x="project", y="drift", data=df_subset)
plt.title('OHC temperature component')
plt.show()
In [20]:
df_subset = df[df['variable'] == 'hfds (J yr-1)']
df_subset['drift'] = df_subset['drift'].abs()
sns.boxplot(x="project", y="drift", data=df_subset)
plt.title('surface heat flux')
plt.ylim(0, 1e22)
plt.show()
In [16]:
df_subset['drift'] = df_subset['drift'].abs()
In [21]:
df_subset = df[df['variable'] == 'netTOA (J yr-1)']
df_subset['drift'] = df_subset['drift'].abs()
sns.boxplot(x="project", y="drift", data=df_subset)
plt.title('netTOA')
plt.show()
In [24]:
df_subset = df[df['variable'] == 'wfo (kg yr-1)']
df_subset['drift'] = df_subset['drift'].abs()
sns.boxplot(x="project", y="drift", data=df_subset)
plt.title('wfo')
plt.ylim(0, 0.6e16)
plt.show()
In [27]:
df_subset = df[df['variable'] == 'masso (kg yr-1)']
df_subset['drift'] = df_subset['drift'].abs()
sns.boxplot(x="project", y="drift", data=df_subset)
plt.title('masso')
plt.ylim(0, 2e14)
plt.show()
In [30]:
df_subset = df[df['variable'] == 'soga (g/kg yr-1)']
df_subset['drift'] = df_subset['drift'].abs()
sns.boxplot(x="project", y="drift", data=df_subset)
plt.title('soga')
plt.ylim(0, 1e-5)
plt.show()
In [ ]: