|
38 | 38 | "cell_type": "markdown", |
39 | 39 | "metadata": {}, |
40 | 40 | "source": [ |
41 | | - "Download only data for the Southern emisphere. You can do the same for the Northern emisphere by changing the `area` key to `[90, -180, 0, 180]`, or leave out the key altogether to get global data. The data is saved in `msl_monthly_south_1979_2020.nc`. Provide the full path if you want it saved under another directory, e.g. `../data/msl_monthly_south_1979_2020.nc`." |
| 41 | + "Download only data for the Southern hemisphere. You can do the same for the Northern hemisphere by changing the `area` key to `[90, -180, 0, 180]`, or leave out the key altogether to get global data. The data is saved in `msl_monthly_south_1979_2020.nc`. Provide the full path if you want it saved under another directory, e.g. `../data/msl_monthly_south_1979_2020.nc`." |
42 | 42 | ] |
43 | 43 | }, |
44 | 44 | { |
|
937 | 937 | "outputs": [], |
938 | 938 | "source": [ |
939 | 939 | "import matplotlib.pyplot as plt\n", |
940 | | - "import matplotlib.animation as animation\n", |
941 | 940 | "import numpy as np\n", |
942 | | - "import xarray as xr\n", |
943 | | - "from IPython.display import Image\n", |
944 | | - "from matplotlib.cm import ScalarMappable\n", |
945 | | - "from matplotlib.colors import Normalize\n", |
946 | | - "from matplotlib.animation import PillowWriter\n", |
947 | 941 | "import cartopy.crs as ccrs\n", |
948 | 942 | "import cartopy.feature as cfeature\n", |
949 | 943 | "import cmocean\n", |
|
953 | 947 | " is_arctic = msl_data.latitude.mean().item() > 0\n", |
954 | 948 | " proj = ccrs.NorthPolarStereo() if is_arctic else ccrs.SouthPolarStereo()\n", |
955 | 949 | "\n", |
956 | | - " fig = plt.figure(figsize=(8, 8))\n", |
| 950 | + " plt.figure(figsize=(8, 8))\n", |
957 | 951 | " ax = plt.axes(projection=proj)\n", |
958 | 952 | "\n", |
959 | 953 | " # Set appropriate extent for polar views\n", |
|
981 | 975 | " )\n", |
982 | 976 | "\n", |
983 | 977 | " # Colorbar\n", |
984 | | - " cbar = plt.colorbar(\n", |
985 | | - " cs, orientation=\"horizontal\", pad=0.05, aspect=50, label=\"MSLP (hPa)\"\n", |
986 | | - " )\n", |
| 978 | + " plt.colorbar(cs, orientation=\"horizontal\", pad=0.05, aspect=50, label=\"MSLP (hPa)\")\n", |
987 | 979 | "\n", |
988 | 980 | " ax.set_title(title)\n", |
989 | 981 | "\n", |
|
0 commit comments