mantra-postprocessing

Scripts for postprocessing data generated with the "MountAiN glacier Transient snowline Retrieval Algorithm".

https://github.com/cryotools/mantra-postprocessing

Science Score: 57.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.7%) to scientific vocabulary
Last synced: 7 months ago · JSON representation ·

Repository

Scripts for postprocessing data generated with the "MountAiN glacier Transient snowline Retrieval Algorithm".

Basic Info
  • Host: GitHub
  • Owner: cryotools
  • License: mit
  • Language: Python
  • Default Branch: main
  • Size: 3.62 MB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 2
Created over 3 years ago · Last pushed over 3 years ago
Metadata Files
Readme License Citation

README.md

MANTRA Postprocessing scripts

This repository contains scripts to turn raw results from the "MountAiN glacier Transient snowline Retrieval Algorithm" into analysis-ready data.

In case you have a Slurm-based HPC cluster at hand, you may use the Bash shell files to run scripts in parallel.

Requirements

Data

First, you will need to process some MANTRA TSLA data. An small example file is ./data/MANTRA/.

Many of the scripts require a CSV file of Randolph Glacier Inventory (RGI) data to work. An example for High Mountain Asia is provided in ./data/RGI. For other regions, you may download the according shapefile, open it in your preferred GIS environment, and export the attribute table to CSV.

Software

  • Python 3 (a current version of Anaconda is recommended).
  • Pandas and Numpy (will be included in Anaconda).

Filter and clean raw GEE TSLA result data

Step 1: Merge GEE files

Append all CSV files but make sure the header line is included only once: console head -n 1 TSL-results-0001.csv > _TARGET_PATH_/TSL-results-merged.csv && tail -n+2 -q *.csv >> _TARGET_PATH_/TSL-results-merged.csv

Step 2: Basic filtering and cleaning

Make sure input_file and output_path are set correctly in tidy-raw-gee-tsl-csvs.py. Then run it ... console python tidy-raw-gee-tsl-csvs.py

Step 3: Remove winter maxima

The script to remove winter maxima is designed to be run in parallel on a HPC cluster using the workload manager Slurm. For convenience, you may want assign the path where the HDF5 file is located to a bash variable, here named H5_PATH.

```console cd PATHTOHDF5FILE_ H5_PATH=$( pwd )

~/launchrwm.sh $H5PATH/TSLA-HMA-2020-07-filtered.h5 $H5_PATH/glaciers-HMA-full.list 500 ```

Step 4: Merge HDF5 files

Step 3 will result in a series of HDF5 files that need to be merged, subsequently. In the directory containing the files, first create a file containing a list of all file names that should be merged, using e.g. console ls *-noWinterMax.h5 > h5-files.list

And merge the HDF5 files by running: console python merge-multiple-hdfs.py <input_dir> <output_file> <file_list>

Optional scripts

Append CSVs to existing HDF5

Edit and run append_GEE_obs.py. This is supposed to be used when you process additional MANTRA data and what to append it to an existing data set. For instance, you may want to add a new year to an existing set of TSLA timeseries.

Append a preprocessed HDF5 to existing HDF5 file

Edit and run append_preproc_TSLA_data.py.

Drop duplicates

Edit and run drop_duplicates.py. This is convenience script to ensure, well, that there are no duplicates in your dataset.

Grid preprocessing

Edit and run grid_preprocessing.py. This will support to create a gridded dataset of TSLA anomalies, e.g. for EOF analyses.

Obtain TSLA maxima per year and glacier

python maxima-per-glacier-and-year.py <input_file> <glacier_list_file> <lower_limit> <upper_limit> <output_path>

Split big file to individual glaciers

Helper tool to convert a full TSL file into individual files per glacier. console python plot-glacier-timeseries.py <tsl_file> <output_dir> <output_type> With tsl_file being a TSL result file in HDF format, output_dir a valid directory to which the output will be written, and output_type either csv or hdf5.

Citing MANTRA

If you publish work based on MANTRA, please cite as:

David Loibl (2022): MountAiN glacier Transient snowline Retrieval Algorithm (MANTRA) v0.8.2, doi: 10.5281/zenodo.7133644

Acknoledgements

MANTRA was developed within the research project "TopoClimatic Forcing and non-linear dynamics in the climate change adaption of glaciers in High Asia" (TopoClif). TopoCliF and David Loibl's work within the project were funded by DFG under the ID LO 2285/1-1.

The development of filters identification of adequate thresholds was supported by Inge Grünberg. Inge's contribution to this project was supported by Geo.X, the research network for Geosciences in Berlin and Potsdam.

Owner

  • Name: CryoTools
  • Login: cryotools
  • Kind: organization

Scientific software tools to investigate the cryosphere - community driven, free, open source

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
  - family-names: Loibl
    given-names: David
    orcid: https://orcid.org/0000-0002-7583-999X
title: "Scripts to postprocess data from the MountAiN glacier Transient snowline Retrieval Algorithm (MANTRA)"
version: v0.1
date-released: 2022-11-01

GitHub Events

Total
Last Year

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 3
  • Total Committers: 1
  • Avg Commits per committer: 3.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 3
  • Committers: 1
  • Avg Commits per committer: 3.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
David Loibl i****o@d****e 3
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: about 2 years ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels