|
1 | 1 | # Global lake-terminating glacier classification: a community effort for the Randolph Glacier Inventory (RGI) and beyond |
2 | 2 |
|
| 3 | +[](https://zenodo.org/badge/latestdoi/764141248) |
| 4 | + |
3 | 5 | Written by William Armstrong and Tobias Bolch with contributions from Robert McNabb, Rodrigo Aguayo, Fabien Maussion, |
4 | 6 | Jakob Steiner, and Will Kochtitzky |
5 | 7 |
|
@@ -62,16 +64,72 @@ Each of the files in the dataset folders contains the following fields: |
62 | 64 | - `contributor` - the ID of the contributor(s) who classified the glacier |
63 | 65 | - `notes` - any additional notes from each contributor |
64 | 66 |
|
| 67 | +Additionally, the `contributor_files/` may have an additional field, `auto_term`. When running |
| 68 | +`scripts/finalize_csv.py`, the column `term_type` (if included in the CSV) is renamed to `auto_term` to indicate that |
| 69 | +`scripts/assign_lake_flag.py` was run and there was an inventory lake within the buffer around the terminus |
| 70 | +(`auto_term == 2`) |
| 71 | + |
65 | 72 | The `.gpkg` files contained in the `lakeflags/` and `outlines/` directories are generated from the `.csv` files and the |
66 | 73 | RGI outlines using `scripts/generate_geopackage.py`. |
67 | 74 |
|
| 75 | +## Scripts |
| 76 | + |
| 77 | +The repository has a number of scripts that can be used to update or work with the dataset. To be able to run any of the |
| 78 | +scripts, you will first need to create a [conda]() environment using the `environment.yml` file found in the repository. |
| 79 | + |
| 80 | +The following scripts are found in the `scripts/` folder: |
| 81 | + |
| 82 | +- `test_submission.py`: this script contains a number of tests that can be run with `pytest` to check that any new or |
| 83 | + updated files in `dataset/contributor_files` or `dataset/csv` match the formatting of the dataset. |
| 84 | +- `update_dataset.py`: this script can be used to update the dataset with any new or revised files found in |
| 85 | + `dataset/contributor_files`. The script first checks for any conflicts (glaciers with multiple `lake_cat` values). If |
| 86 | + there are conflicts, these need to be resolved by editing the `{region}_conflicts.csv` file(s) created and changing |
| 87 | + the conflicting `lake_cat` values to an agreed value, and the script then needs to be run again. Once all conflicts |
| 88 | + have been resolved, the script updates the geopackage files, and re-creates `dataset/summary_table.csv` with the |
| 89 | + updated number and area of lake-terminating glaciers. At this point, the updated files can be committed and merged |
| 90 | + using a [pull request](https://github.com/GLIMS-RGI/lake_terminating/pulls). For more information about how to use |
| 91 | + the script, run `python scripts/update_dataset.py -h` from within the `conda` environment. |
| 92 | +- `assign_lake_flag.py`: can be used with a lake inventory to identify glaciers that have a lake within some buffer |
| 93 | + around the terminus. For more information about how to use the script, run `python scripts/assign_lake_flag.py -h` |
| 94 | + from within the `conda` environment, or see the "Workflow using existing lake inventory" section below. |
| 95 | +- `assign_term_type.py`: this script can be used to update the RGI v7.0 `term_type` attribute, using the files found |
| 96 | + in `dataset/csv`. Glaciers with a `lake_cat` of 2 or 3 will be assigned a `term_type` of 2 (lake-terminating), while |
| 97 | + glaciers with a `lake_cat` of 0 or 1 will be assigned a `term_type` of 0 (land-terminating). The updated .csv files |
| 98 | + can then be joined to the RGI shapefiles. |
| 99 | +- `generate_geopackage.py`: re-generates the geopackage files for each region. |
| 100 | +- `summary_table.py`: re-creates `dataset/summary_table.csv` based on the files in `dataset/csv`. |
| 101 | +- `finalize_csv.py`: converts the attribute table from a shapefile used for mapping into a .csv file that is compatible |
| 102 | + with the dataset. For more information about how to use the script, run `python scripts/finalize_csv.py -h` |
| 103 | + from within the `conda` environment. |
| 104 | + |
| 105 | + |
68 | 106 | ## Contributing |
69 | 107 |
|
70 | 108 | The classifications provided here are the result of a community effort, which means that there may be disagreement |
71 | | -between analysts. If you find any such issues, we invite you to submit your updates/corrections by first forking this |
72 | | -repository and submitting a Pull Request (https://github.com/GLIMS-RGI/lake_terminating/pulls). |
| 109 | +between analysts. If you find any such issues, we invite you to submit your updates/corrections in one of the following |
| 110 | +ways, depending on your level of comfort with git/GitHub: |
| 111 | + |
| 112 | +### through GitHub |
| 113 | + |
| 114 | +1. Open an issue (https://github.com/GLIMS-RGI/lake_terminating/issues) for further discussion; |
| 115 | +2. Fork this repository, make your changes/updates, and open a Pull Request |
| 116 | + (https://github.com/GLIMS-RGI/lake_terminating/pulls). **Please Note**: if you choose this option, ensure |
| 117 | + that your updated files are placed in the relevant regional folder in `dataset/contributor_files`, rather than |
| 118 | + updating the files in `dataset/csv` directly. |
| 119 | + |
| 120 | +As part of the PR process, any updated CSV files will be checked for formatting consistency. Once those checks have |
| 121 | +passed, the updates can be merged using the process outlined by `scripts/update_dataset.py`. |
| 122 | + |
| 123 | +You are welcome to make these changes yourself; alternatively, one of the maintainers will be able to do the final |
| 124 | +merge/update. |
| 125 | + |
| 126 | +### outside of GitHub |
| 127 | + |
| 128 | +Outside of GitHub, you are welcome to contact one or more of the maintainers to discuss any issues or to send along |
| 129 | +your proposed updates/corrections. |
73 | 130 |
|
74 | | -Alternatively, you are welcome to open an issue for further discussion (https://github.com/GLIMS-RGI/lake_terminating/issues). |
| 131 | +Please ensure that your submitted CSV file uses the same format as is found in the `lake_term_data_template.csv` |
| 132 | +file found in this repository, as it will greatly simplify the integration process. |
75 | 133 |
|
76 | 134 | ## 1. Definition and categories of lake-terminating glaciers |
77 | 135 |
|
@@ -136,12 +194,12 @@ that have not amalgamated to form one lake spanning the majority of the glacier |
136 | 194 | Similarly, we did not consider glaciers with proglacial water bodies smaller than 0.01 km<sup>2</sup> to be |
137 | 195 | lake-terminating. |
138 | 196 |
|
139 | | - |
| 197 | + |
140 | 198 | *Background images are Landsat 7 ETM+ false-color composites (bands 5, 4, 3). RGI7 outlines are shown in red, while lake |
141 | 199 | outlines are shown in white. (a) Eklutna Glacier (RGI2000-v7.0-G-01-10928) in Alaska. Landsat image acquired 1999-07-31. |
142 | 200 | (b) Unnamed glacier (RGI2000-v7.0-G-01-11048) in Alaska (region 01). Landsat image acquired 1999-07-31. (c) Harris |
143 | 201 | Glacier (RGI2000-v7.0-G-01-08628) in Alaska (region 01). Landsat image acquired 2000-08-09. (d) Hispar Glacier, with |
144 | | -numerous supraglacial ponds (RGI2000-v7.0-G-14-21670) in South Asia West (region 14). Landsat image acquired 2000-09-11. |
| 202 | +numerous supraglacial ponds (RGI2000-v7.0-G-14-21670) in South Asia West (region 14). Landsat image acquired 2000-09-11.* |
145 | 203 |
|
146 | 204 | ### Ambiguous lake termini |
147 | 205 |
|
@@ -175,7 +233,7 @@ includes exclusively glaciers that are definitely not lake-terminating is helpfu |
175 | 233 |
|
176 | 234 | ### Workflow using existing lake inventory |
177 | 235 |
|
178 | | -We have provided a Python script (`scripts/assign_flag.py`) that utilizes an existing ice-marginal |
| 236 | +We have provided a Python script (`scripts/assign_lake_flag.py`) that utilizes an existing ice-marginal |
179 | 237 | lake inventory to produce a limited subset of RGI glaciers that should be manually verified for lake-terminating status. |
180 | 238 |
|
181 | 239 | We have compiled a list of known [datasets here](https://github.com/GLIMS-RGI/lake_terminating/blob/main/Lake_databases_termini.csv). |
@@ -228,7 +286,7 @@ The contributors to the lake inventory should provide a csv file with the follow |
228 | 286 |
|
229 | 287 | | `rgi_id` | `lake_cat` | `image_id` | `image_date` | `inventory_doi` | `contributor` | |
230 | 288 | |-------------------------|:----------:|:----------------------------------------:|:------------:|:----------------------------------:|:-------------:| |
231 | | -| RGI2000-v7.0-G-01-08604 | 1 | LT05_L1TP_066017_19990927_20200907_02_T1 | 1999/09/27 | https://doi.org/10.18739/A2MK6591G | Armstrong | |
| 289 | +| RGI2000-v7.0-G-01-08604 | 3 | LT05_L1TP_066017_19990927_20200907_02_T1 | 1999-09-27 | https://doi.org/10.18739/A2MK6591G | Armstrong | |
232 | 290 |
|
233 | 291 | The fields are defined as: |
234 | 292 |
|
|
0 commit comments