Download polar data

1. Download polar data#

One of the main functionalities of PolarToolkit is to download datasets commonly used for polar research. There is a very simple demonstration of how this works. We will download a grid file, a shapefile, and some point data.

Import the fetch module of PolarToolkit

[1]:
from polartoolkit import fetch

Download bathymetry and bed elevation data from IBCSO. The first time you call this function, it will download the IBCSO netcdf (.nc) file, reproject it to EPSG 3031 (a mapping projection useful for Antarctica) and save the reprojected file to your computer. Subsequent calls to the function will find this reprojected file and load it for you, without re-downloading. This function returns the grid loaded as an xarray dataarray.

[2]:
grid = fetch.ibcso(layer="bed")
grid
[2]:
<xarray.DataArray 'bed' (y: 14001, x: 14001)> Size: 784MB
dask.array<open_dataset-bed, shape=(14001, 14001), dtype=float32, chunksize=(438, 876), chunktype=numpy.ndarray>
Coordinates:
  * x        (x) float64 112kB -3.5e+06 -3.5e+06 -3.499e+06 ... 3.5e+06 3.5e+06
  * y        (y) float64 112kB -3.5e+06 -3.5e+06 -3.499e+06 ... 3.5e+06 3.5e+06
Attributes:
    Conventions:   CF-1.7
    actual_range:  [-8447.6396484375, 4731.80712890625]
    description:
    history:       gmt grdsample @GMTAPI@-S-I-G-M-G-N-000000 -G@GMTAPI@-S-O-G...
    long_name:     z
    title:         

There are also some shapefiles available to download. Here we will download a shapefile (.shp) of the Greenland grounding line. In this case, the function returns the path to the download shapefile.

[3]:
filepath = fetch.groundingline(version="measures-greenland")
filepath
[3]:
'/home/sungw937/.cache/pooch/polartoolkit/shapefiles/measures/mog100_geus_coastline_v02.shp'

There are also some point datasets available. Below we will download the individual point data of topography from Bedmap1 as a .csv file and automatically load it into a pandas dataframe.

[4]:
df = fetch.bedmap_points(version="bedmap1")
df
/tmp/ipykernel_287521/2057769998.py:1: UserWarning: this file is large, if you only need a subset of data please provide a bounding box region via `region` to subset the data.
  df = fetch.bedmap_points(version="bedmap1")
[4]:
trajectory_id trace_number longitude (degree_east) latitude (degree_north) date time_UTC surface_altitude (m) land_ice_thickness (m) bedrock_altitude (m) two_way_travel_time (m) aircraft_altitude (m) along_track_distance (m) easting northing project geometry
0 1 NaN 4.44900 -75.62300 NaN NaN NaN 2650.0 NaN NaN NaN NaN 121788.567945 1.565282e+06 NaN POINT (121788.568 1565282.264)
1 2 NaN 4.43800 -75.62100 NaN NaN NaN 2628.0 NaN NaN NaN NaN 121505.125021 1.565526e+06 NaN POINT (121505.125 1565525.58)
2 3 NaN 4.42500 -75.61900 NaN NaN NaN 2620.0 NaN NaN NaN NaN 121166.937514 1.565773e+06 NaN POINT (121166.938 1565773.075)
3 4 NaN 4.42000 -75.61900 NaN NaN NaN 2635.0 NaN NaN NaN NaN 121030.297575 1.565784e+06 NaN POINT (121030.298 1565783.643)
4 5 NaN 4.40700 -75.61700 NaN NaN NaN 2646.0 NaN NaN NaN NaN 120691.982493 1.566031e+06 NaN POINT (120691.982 1566031.037)
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
1905045 1905046 NaN -53.79618 -83.97787 NaN NaN 1350.0 779.0 NaN NaN NaN NaN -528450.753601 3.868216e+05 NaN POINT (-528450.754 386821.593)
1905046 1905047 NaN -53.81247 -83.98000 NaN NaN 1346.0 756.0 NaN NaN NaN NaN -528373.430978 3.865343e+05 NaN POINT (-528373.431 386534.325)
1905047 1905048 NaN -53.88616 -83.98947 NaN NaN 1342.0 941.0 NaN NaN NaN NaN -528036.700836 3.852464e+05 NaN POINT (-528036.701 385246.393)
1905048 1905049 NaN -53.90617 -83.99211 NaN NaN 1343.0 705.0 NaN NaN NaN NaN -527938.815436 3.848925e+05 NaN POINT (-527938.815 384892.529)
1905049 1905050 NaN -53.92110 -83.99413 NaN NaN 1341.0 581.0 NaN NaN NaN NaN -527861.239735 3.846254e+05 NaN POINT (-527861.24 384625.356)

1905050 rows × 16 columns

[ ]: