Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
malmans2 committed Apr 3, 2024
1 parent 1bd9afe commit ab9205b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions notebooks/wp5/glacier_distribution.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@
"\n",
"# Mask data\n",
"shapefile_url = \"https://www.glims.org/RGI/rgi60_files/00_rgi60_regions.zip\"\n",
"gdf = gpd.read_file(shapefile_url)\n",
"gdf = gdf.dissolve(by=\"RGI_CODE\", as_index=False)\n",
"gdf_mask = gpd.read_file(shapefile_url)\n",
"gdf_mask = gdf_mask.dissolve(by=\"RGI_CODE\", as_index=False)\n",
"regions = regionmask.from_geopandas(\n",
" gdf, numbers=\"RGI_CODE\", names=\"FULL_NAME\", abbrevs=\"WGMS_CODE\"\n",
" gdf_mask, numbers=\"RGI_CODE\", names=\"FULL_NAME\", abbrevs=\"WGMS_CODE\"\n",
")\n",
"mask = regions.mask_3D(ds)\n",
"ds = ds.where(mask)\n",
Expand Down

0 comments on commit ab9205b

Please sign in to comment.