# oggm.utils.gdir_to_tar¶

oggm.utils.gdir_to_tar(gdir, base_dir=None, delete=True)[source]

Writes the content of a glacier directory to a tar file.

The tar file is located at the same location of the original directory. The glacier directory objects are useless if deleted!

Parameters
base_dirstr

path to the basedir where to write the directory (defaults to the same location of the original directory)

deletebool

delete the original directory afterwards (default)

Returns
the path to the tar file

Notes

Files writen to the glacier directory: