ice_shelf_state_and_fate.helper_functions
Helper functions for the ‘Ice Shelf State and Fate’ package.
Functions
Get the base folder path. |
|
|
Find the path to where the plot is stored. |
|
Extract the ice shelf multipolygon for an ice shelf in both EPSG4326(lat/lon) and the input projection. |
|
Extract the ice shelf ocean multipolygon for an ice shelf in both EPSG4326(lat/lon) and the input projection. |
- get_plot_base_path() Path
Get the base folder path.
- Returns:
The path to the investigations/plots folder
- Return type:
Path
- get_plot_path(base_path: Path, file_name: str) Path
Find the path to where the plot is stored.
- Parameters:
base_path (Path) – The base folder
file_name (str) – The plot filename
- Returns:
The full path to the plot
- Return type:
Path
- iceshelf_polygon(ice_shelf_polygons: GeoDataFrame, ice_shelf_name: str) tuple[Polygon | MultiPolygon, Polygon | MultiPolygon]
Extract the ice shelf multipolygon for an ice shelf in both EPSG4326(lat/lon) and the input projection.
- Parameters:
ice_shelf_polygons (gpd.GeoDataFrame) – Input GeoDataFrame with atleas the column ‘Name’ for the ice shelf name and ‘geometry’ with the polygon. This GeoDataFrame must have a valid CRS.
ice_shelf_name (str) – The ice shelf name
- Returns:
The shapely object for the specified ice shelf in both EPSG4326(lat/lon) and the input projection.
- Return type:
tuple[Polygon | MultiPolygon, Polygon | MultiPolygon]
- ocean_polygon(ice_shelf_polygons: GeoDataFrame, ice_shelf_name: str, distance: int | float = 10000) tuple[Polygon | MultiPolygon, Polygon | MultiPolygon]
Extract the ice shelf ocean multipolygon for an ice shelf in both EPSG4326(lat/lon) and the input projection. To do this a buffer of ‘distance’ units is applied to the ice shelf polygon.
- Parameters:
ice_shelf_polygons (gpd.GeoDataFrame) – Input GeoDataFrame with atleas the column ‘Name’ for the ice shelf name and ‘geometry’ with the polygon. This GeoDataFrame must have a valid CRS.
ice_shelf_name (str) – The ice shelf name
distance (int | float) – The distance in projected units to buffer the ice shelf polygon, by default 10000
- Returns:
The shapely object for the ocean around the specified ice shelf in both EPSG4326(lat/lon) and the input projection.
- Return type:
tuple[Polygon | MultiPolygon, Polygon | MultiPolygon]