Skip to content

Instantly share code, notes, and snippets.

@tommylees112
Created April 3, 2021 14:01
Show Gist options
  • Save tommylees112/869a5210d31ac343cadead06278debf2 to your computer and use it in GitHub Desktop.
Save tommylees112/869a5210d31ac343cadead06278debf2 to your computer and use it in GitHub Desktop.
initial plotting code for antonia
import xarray as xr
import matplotlib.pyplot as plt
import seaborn as sns
preds = xr.open_dataset("test_predictions_E030.nc")
preds = preds.drop(["horizon", "easting", "northing"])
f, ax = plt.subplots(figsize=(12, 4))
preds.isel(pixel=0).sel(time="2007").obs.plot(ax=ax, color="k")
preds.isel(pixel=0).sel(time="2007").sim.plot(ax=ax)
ax.set_ylabel("Level")
sns.despine()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment