cryoswath is a python package containing processing pipelines, a tool library, and some pre-assembled data to retrieve and study CryoSat-2 data.
Adaptability lies at its core. The user can access many options simply by passing arguments to functions; everything else can be customized changing the concerned function or adding a new one.
Currently, it is in the beta phase. main
contains those parts that I
believe to work if used as intended and that tested to some
extent. Other branches are for development.
- find all CryoSat-2 tracks passing over your region of interest
- download L1b data from ESA
- retrieve swath elevation estimates
- aggregate point data to gridded data
- fill data gaps using tested methods
- calculate change rates
To use cryoswath, pull this repo and download ArcticDEM and the RGI
glacier and complex shape files into the data/auxiliary/DEM
and -RGI
directories. Then, either use the provided docker container or set up an
environment and install the software dependencies. If you choose the
latter, you will have to either limit xarray to <2024.3 or to apply a
small patch.
docker run --detach --interactive --volume <base dir>:/altimetry_project cryoswath/cryoswath:nightly
- connect with your favorite IDE or
docker exec --interactive <container hash> sh
conda create --name env_name --file <base dir>/docker/conda_requirements.txt
conda activate env_name
conda install patch
find -name variables.py -path */env_name/*/xarray/coding/* -exec patch {} <base dir>/docker/custom_xarray.patch \;
(the patch works forxarray=2024.9.0
)
(The last two steps are necessary to change *=
to x=x*
in the xarray code.)
- requirements.txt
- reference elevation model
- glacier outlines
cryoswath will point you to the required resources.
-
! compatibility issues with xarray >= v2024.3.0
-> apply patch as described in getting started -> conda -> steps 4+5
-> \or downgrade to 2024.1.1
If not fixed, xarray throws an error when you load the raw data. The error message points you to a line in the function_scale_offset_decoding
wherex*=y
needs to be spelled out asx=x*y
because the operator is not defined for the data type. -
projected RGI basins sometimes "invalid" -> add
.make_valid()
if it is missing somewhere -
it has mostly been tested for the Arctic
Further: see open issues.
You can cite this package using bibtex:
@misc{cryoswath,
author = {J. Haacker},
title = {cryoswath: CryoSat-2 swath processing package},
year = {2024},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/j-haacker/cryoswath}}
}
Please mind that you likely used other resources on the way.
- ESA provides the L1b data under these Terms and Conditions
- RGI data is distributed under CC-BY-4.0 license
- if you (likely) used DEMs of the PGC, see their Acknowledgement Policy
- the many python packages and libraries this package depends on; some of which are indispensable.
MIT. See LICENSE.txt.