Skip to content

Commit 7ab2bdf

Browse files
committed
initialisation maps example rerun to ensure it works with the variable name changes, also cleaned up the final plotting code
1 parent 62f39db commit 7ab2bdf

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

docs/examples/example_initialisation_maps.ipynb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,7 @@
11831183
"name": "stderr",
11841184
"output_type": "stream",
11851185
"text": [
1186-
"/tmp/ipykernel_42384/2574947031.py:1: DtypeWarning: Columns (1,2,3,4) have mixed types. Specify dtype option on import or set low_memory=False.\n",
1186+
"/tmp/ipykernel_498482/2574947031.py:1: DtypeWarning: Columns (1,2,3,4) have mixed types. Specify dtype option on import or set low_memory=False.\n",
11871187
" concentrations_ds = pd.read_csv(settings['release_maps']['global_concentrations'])\n"
11881188
]
11891189
}
@@ -1669,7 +1669,7 @@
16691669
"# Plot the coastal initialisation map\n",
16701670
"ax = plt.subplot(gs[0,0], projection=ccrs.Robinson())\n",
16711671
"vmin, vmax = 1e-1, 1e3\n",
1672-
"cb = ax.scatter(pset_coastal.lon, pset_coastal.lat, c=pset_coastal.plastic_amount, s=0.25, cmap=plt.cm.inferno, transform=ccrs.PlateCarree(), vmin=vmin, vmax =vmax, norm=matplotlib.colors.LogNorm())\n",
1672+
"cb = ax.scatter(pset_coastal.lon, pset_coastal.lat, c=pset_coastal.plastic_amount, s=0.25, cmap=plt.cm.inferno, transform=ccrs.PlateCarree(), vmin=vmin, vmax=vmax, norm=matplotlib.colors.LogNorm())\n",
16731673
"ax.add_feature(cfeature.LAND, zorder=0, color='grey')\n",
16741674
"ax.set_global()\n",
16751675
"cbar_ax = ax.inset_axes(cb_axes_position)\n",
@@ -1680,7 +1680,7 @@
16801680
"# Plot the rivers initialisation map\n",
16811681
"ax = plt.subplot(gs[0,2], projection=ccrs.Robinson())\n",
16821682
"vmin, vmax = 1e-1, 1e2\n",
1683-
"cb = ax.scatter(pset_rivers.lon, pset_rivers.lat, c=pset_rivers.plastic_amount, s=0.25, cmap=cmocean.cm.solar, transform=ccrs.PlateCarree(), vmin=vmin, vmax =vmax, norm=matplotlib.colors.LogNorm())\n",
1683+
"cb = ax.scatter(pset_rivers.lon, pset_rivers.lat, c=pset_rivers.plastic_amount, s=0.25, cmap=cmocean.cm.solar, transform=ccrs.PlateCarree(), vmin=vmin, vmax=vmax, norm=matplotlib.colors.LogNorm())\n",
16841684
"ax.add_feature(cfeature.LAND, zorder=0, color='grey')\n",
16851685
"ax.set_global()\n",
16861686
"cbar_ax = ax.inset_axes(cb_axes_position)\n",
@@ -1691,7 +1691,7 @@
16911691
"# Plot the fisheries initialisation map\n",
16921692
"ax = plt.subplot(gs[1,0], projection=ccrs.Robinson())\n",
16931693
"vmin, vmax = 1e-1, 1e3\n",
1694-
"cb = ax.scatter(pset_fisheries.lon, pset_fisheries.lat, c=pset_fisheries.plastic_amount, s=0.1, cmap=plt.cm.Spectral_r, transform=ccrs.PlateCarree(), vmin=vmin, vmax =vmax, norm=matplotlib.colors.LogNorm())\n",
1694+
"cb = ax.scatter(pset_fisheries.lon, pset_fisheries.lat, c=pset_fisheries.plastic_amount, s=0.1, cmap=plt.cm.Spectral_r, transform=ccrs.PlateCarree(), vmin=vmin, vmax=vmax, norm=matplotlib.colors.LogNorm())\n",
16951695
"ax.add_feature(cfeature.LAND, zorder=0, color='grey')\n",
16961696
"ax.set_global()\n",
16971697
"cbar_ax = ax.inset_axes(cb_axes_position)\n",
@@ -1701,10 +1701,10 @@
17011701
"\n",
17021702
"# Plot the current concentrations initialisation map\n",
17031703
"ax = plt.subplot(gs[1,2], projection=ccrs.Robinson())\n",
1704-
"vmin, vmax = 1e-1, 200\n",
1705-
"vmin2, vmax2 = 1e-6, 0.05\n",
1706-
"cb1 = ax.scatter(pset_conc_ocean.lon, pset_conc_ocean.lat, c=pset_conc_ocean.plastic_amount, s=0.25, cmap=plt.cm.viridis, transform=ccrs.PlateCarree(), vmin=vmin2, vmax =vmax2, norm=matplotlib.colors.LogNorm())\n",
1707-
"cb2 = ax.scatter(pset_conc_beach.lon, pset_conc_beach.lat, c=pset_conc_beach.plastic_amount, s=0.25, cmap=plt.cm.magma, transform=ccrs.PlateCarree(), vmin=vmin, vmax =vmax, norm=matplotlib.colors.LogNorm())\n",
1704+
"vmin, vmax = 1e-6, 0.05\n",
1705+
"vmin2, vmax2 = 1e-1, 200\n",
1706+
"cb1 = ax.scatter(pset_conc_ocean.lon, pset_conc_ocean.lat, c=pset_conc_ocean.plastic_amount, s=0.25, cmap=plt.cm.viridis, transform=ccrs.PlateCarree(), vmin=vmin, vmax=vmax, norm=matplotlib.colors.LogNorm())\n",
1707+
"cb2 = ax.scatter(pset_conc_beach.lon, pset_conc_beach.lat, c=pset_conc_beach.plastic_amount, s=0.25, cmap=plt.cm.magma, transform=ccrs.PlateCarree(), vmin=vmin2, vmax=vmax2, norm=matplotlib.colors.LogNorm())\n",
17081708
"ax.add_feature(cfeature.LAND, zorder=0, color='grey')\n",
17091709
"ax.set_global()\n",
17101710
"cbar_ax1 = ax.inset_axes(cb_axes_position)\n",

0 commit comments

Comments
 (0)