Created
April 3, 2021 14:01
-
-
Save tommylees112/869a5210d31ac343cadead06278debf2 to your computer and use it in GitHub Desktop.
initial plotting code for antonia
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
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