Skip to content

Commit

Permalink
maps
Browse files Browse the repository at this point in the history
  • Loading branch information
malmans2 committed Jul 21, 2023
1 parent 878f185 commit d14eb19
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions notebooks/wp5/lake_water_temperature_outlier_detection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@
"lat_slice = slice(-16, 4)\n",
"\n",
"# Variable\n",
"varname = \"lake_surface_water_temperature\""
"varname = \"lake_surface_water_temperature\"\n",
"\n",
"# Lakes to show in the analysis\n",
"lakeids = [3, 7, 10]"
]
},
{
Expand Down Expand Up @@ -145,7 +148,7 @@
" \"lon_slice\": lon_slice,\n",
" \"lat_slice\": lat_slice,\n",
" \"varname\": varname,\n",
" \"lakeids\": [3, 7, 10],\n",
" \"lakeids\": lakeids,\n",
" },\n",
")\n",
"da = ds[varname].compute()"
Expand All @@ -163,7 +166,7 @@
" k: v if isinstance(v, str) or k not in chunks else v[0]\n",
" for k, v in requests[0].items()\n",
"}\n",
"da_lakeid = download.download_and_transform(\n",
"da_map = download.download_and_transform(\n",
" collection_id,\n",
" single_request,\n",
" chunks=chunks,\n",
Expand All @@ -190,7 +193,9 @@
"metadata": {},
"outputs": [],
"source": [
"_ = plot.projected_map(da_lakeid, projection=ccrs.PlateCarree(), show_stats=False)"
"for da_to_plot in [da_map, da_map.where(da_map.isin(lakeids))]:\n",
" _ = plot.projected_map(da_to_plot, projection=ccrs.PlateCarree(), show_stats=False)\n",
" plt.show()"
]
},
{
Expand Down

0 comments on commit d14eb19

Please sign in to comment.