From 292edfc90479df27f3bf400c6f3a12017065480f Mon Sep 17 00:00:00 2001 From: Wei Ji Date: Sun, 1 Nov 2020 16:46:55 +1300 Subject: [PATCH] :package: Add MEaSUREs Antarctic Boundaries v2 to ATLAS intake catalog Putting the IceBoundaries_Antarctica_v2.shp file into our intake catalog. Canonical source is at https://doi.org/10.5067/AXE4121732AD, but we're pulling it from PGC instead which doesn't require authentication. There's also the option of pulling the Coastline and GroundingLine (actually polygons) boundaries. Note to self that the urlpaths need to be in alphabetical order for fsspec caching to work. --- atlxi_lake.ipynb | 4 ++-- atlxi_lake.py | 4 ++-- deepicedrain/README.md | 1 + deepicedrain/atlas_catalog.yaml | 22 ++++++++++++++++++++++ deepicedrain/tests/test_deepicedrain.py | 1 + 5 files changed, 28 insertions(+), 4 deletions(-) diff --git a/atlxi_lake.ipynb b/atlxi_lake.ipynb index 521ba71..300d30d 100644 --- a/atlxi_lake.ipynb +++ b/atlxi_lake.ipynb @@ -113,8 +113,8 @@ "outputs": [], "source": [ "# Read in Antarctic Drainage Basin Boundaries shapefile into a GeoDataFrame\n", - "ice_boundaries: gpd.GeoDataFrame = gpd.read_file(\n", - " filename=\"Quantarctica3/Glaciology/MEaSUREs Antarctic Boundaries/IceBoundaries_Antarctica_v2.shp\"\n", + "ice_boundaries: gpd.GeoDataFrame = (\n", + " deepicedrain.catalog.measures_antarctic_boundaries.read()\n", ")\n", "drainage_basins: gpd.GeoDataFrame = ice_boundaries.query(expr=\"TYPE == 'GR'\")" ] diff --git a/atlxi_lake.py b/atlxi_lake.py index eb18660..00b3740 100644 --- a/atlxi_lake.py +++ b/atlxi_lake.py @@ -85,8 +85,8 @@ # %% # Read in Antarctic Drainage Basin Boundaries shapefile into a GeoDataFrame -ice_boundaries: gpd.GeoDataFrame = gpd.read_file( - filename="Quantarctica3/Glaciology/MEaSUREs Antarctic Boundaries/IceBoundaries_Antarctica_v2.shp" +ice_boundaries: gpd.GeoDataFrame = ( + deepicedrain.catalog.measures_antarctic_boundaries.read() ) drainage_basins: gpd.GeoDataFrame = ice_boundaries.query(expr="TYPE == 'GR'") diff --git a/deepicedrain/README.md b/deepicedrain/README.md index d0d933e..b56893e 100644 --- a/deepicedrain/README.md +++ b/deepicedrain/README.md @@ -6,6 +6,7 @@ Contents: - icesat2atlasdownloader - Download Antarctic ICESat-2 ATLAS products from [NSIDC](https://nsidc.org/data/ICESat-2) - icesat2atl06 - Reads in ICESat-2 ATL06 data into an xarray.Dataset - icesat2dhdt - Preprocessed ICESat-2 height change over time (dhdt) data in a columnar format + - measures_antarctic_boundaries - MEaSUREs Antarctic Boundaries from Satellite Radar as a geopandas.GeoDataFrame - subglacial_lakes - ICESat-2 detected Antarctic subglacial lake polygons as a geopandas.GeoDataFrame - test_data - Sample ICESat-2 datasets for testing purposes diff --git a/deepicedrain/atlas_catalog.yaml b/deepicedrain/atlas_catalog.yaml index d33b531..2ad0814 100644 --- a/deepicedrain/atlas_catalog.yaml +++ b/deepicedrain/atlas_catalog.yaml @@ -161,6 +161,28 @@ sources: h_corr: c: h_corr_{{cycle}} cmap: gist_earth + measures_antarctic_boundaries: + description: 'MEaSUREs Antarctic Boundaries for IPY 2007-2009 from Satellite Radar, Version 2' + args: + storage_options: + simplecache: + cache_storage: Quantarctica3/Glaciology/MEaSUREs Antarctic Boundaries/ + same_names: true + urlpath: + - simplecache::http://data.pgc.umn.edu/gis/packages/quantarctica/Quantarctica3/Glaciology/MEaSUREs%20Antarctic%20Boundaries/{{boundary_type}}_Antarctica_v2.dbf + - simplecache::http://data.pgc.umn.edu/gis/packages/quantarctica/Quantarctica3/Glaciology/MEaSUREs%20Antarctic%20Boundaries/{{boundary_type}}_Antarctica_v2.prj + - simplecache::http://data.pgc.umn.edu/gis/packages/quantarctica/Quantarctica3/Glaciology/MEaSUREs%20Antarctic%20Boundaries/{{boundary_type}}_Antarctica_v2.qix + - simplecache::http://data.pgc.umn.edu/gis/packages/quantarctica/Quantarctica3/Glaciology/MEaSUREs%20Antarctic%20Boundaries/{{boundary_type}}_Antarctica_v2.shp + - simplecache::http://data.pgc.umn.edu/gis/packages/quantarctica/Quantarctica3/Glaciology/MEaSUREs%20Antarctic%20Boundaries/{{boundary_type}}_Antarctica_v2.shx + use_fsspec: true + parameters: + boundary_type: + description: 'Antarctic Boundary type. Either Coastline, GroundingLine or IceBoundaries' + type: str + default: IceBoundaries + allowed: ["Coastline", "GroundingLine", "IceBoundaries"] + driver: intake_geopandas.geopandas.ShapefileSource + metadata: {} subglacial_lakes: description: 'Antarctic subglacial lake polygons detected from ICESat-2/ATLAS laser altimetry' args: diff --git a/deepicedrain/tests/test_deepicedrain.py b/deepicedrain/tests/test_deepicedrain.py index 39c5c12..173c783 100644 --- a/deepicedrain/tests/test_deepicedrain.py +++ b/deepicedrain/tests/test_deepicedrain.py @@ -16,6 +16,7 @@ def test_deepicedrain_catalog(): "icesat2atlasdownloader", "icesat2atl06", "icesat2dhdt", + "measures_antarctic_boundaries", "subglacial_lakes", "test_data", ]