Skip to main content

Tools to analyze wave tracks using icesat2 data

Project description

ICESAT2 Track Analysis

Installation for Developers

Prerequisites:

  • A POSIX-compatible system (Linux or macOS)
  • Python 3.10 (run python --version to check that your version of python is correct)
  • MPI (e.g. from brew install open-mpi on macOS)
  • HDF5 (e.g. from brew install hdf5 on macOS)

[!IMPORTANT]
Windows is not supported for development work – use WSL on Windows hosts

Installation:

[!NOTE] For testing purposes this repository uses Git Large File Storage (LFS) to handle large data files. If you want to clone the repository with the LFS files, make sure you have Git LFS installed on your system. You can download it from here. After installing, you can clone the repository as usual with git clone. Git LFS files will be downloaded automatically. If you've already cloned the repository, you can download the LFS files with git lfs pull.

  • Clone the repository:

  • Open a shell (bash, zsh) in the repository working directory

  • Create a new virtual environment named .venv:

    python -m venv .venv
    
  • Activate the environment

    source ".venv/bin/activate"
    
  • Upgrade pip

    pip install --upgrade pip
    
  • Install or update the environment with the dependencies for this project:

    pip install --upgrade --editable ".[dev]"
    

    You may need to set the value of the HDF5_DIR environment variable to install some of the dependencies, especially when installing on macOS.

    For Apple Silicon (M-Series) CPUs:

    export HDF5_DIR="/opt/homebrew/opt/hdf5"
    pip install --upgrade --editable ".[dev]"
    

    For Intel CPUs:

    export HDF5_DIR="/usr/local/opt/hdf5"
    pip install --upgrade --editable ".[dev]"
    
  • Check the module icesat2waves is available by loading the module:

    python -c "import icesat2waves; print(icesat2waves.__version__)"
    

Command line interface

The icesat2waves package comes with a command-line interface (CLI) that facilitates interaction with the package directly from your terminal. This can be particularly useful for scripting and automation. You can access the help documentation for the CLI by running the following command:

icesat2waves --help

As suggested in the help, to run a specific command run icesat2waves [OPTIONS] COMMAND [ARGS].... To view help on running a command, run icesat2waves COMMAND --help. For example, to get help about the load-file command, you may issue icesat2waves load-file --help to get the following output:

(.venv) $ icesat2waves load-file --help
Usage: icesat2waves load-file [OPTIONS]

  Open an ICEsat2 tbeam_stats.pyrack, apply filters and corrections, and
  output smoothed photon heights on a regular grid in an .nc file.

Options:
  --track-name TEXT         [required]
  --batch-key TEXT          [required]
  --id-flag / --no-id-flag  [default: id-flag]
  --output-dir TEXT         [required]
  --verbose / --no-verbose  [default: no-verbose]
  --help                    Show this message and exit.

Sample workflow

Below is a sample workflow that leverages the included CLI.

  1. Load single file
icesat2waves load-file --track-name 20190502052058_05180312_005_01 --batch-key SH_testSLsinglefile2 --output-dir ./output
  1. Make spectra from downloaded data
icesat2waves make-spectra --track-name SH_20190502_05180312 --batch-key SH_testSLsinglefile2 --output-dir ./output
  1. Plot spectra
icesat2waves plot-spectra --track-name SH_20190502_05180312 --batch-key SH_testSLsinglefile2 --output-dir ./output
  1. Build IOWAGA priors
icesat2waves make-iowaga-threads-prior --track-name SH_20190502_05180312 --batch-key SH_testSLsinglefile2 --output-dir ./output
  1. Build angles
icesat2waves make-b04-angle --track-name SH_20190502_05180312 --batch-key SH_testSLsinglefile2 --output-dir ./output
  1. Define and plot angles
icesat2waves define-angle --track-name SH_20190502_05180312 --batch-key SH_testSLsinglefile2 --output-dir ./output
  1. Make corrections and separations
icesat2waves correct-separate --track-name SH_20190502_05180312 --batch-key SH_testSLsinglefile2 --output-dir ./output

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

icesat2waves-1.0.0.tar.gz (221.4 kB view details)

Uploaded Source

Built Distribution

icesat2waves-1.0.0-py3-none-any.whl (211.3 kB view details)

Uploaded Python 3

File details

Details for the file icesat2waves-1.0.0.tar.gz.

File metadata

  • Download URL: icesat2waves-1.0.0.tar.gz
  • Upload date:
  • Size: 221.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for icesat2waves-1.0.0.tar.gz
Algorithm Hash digest
SHA256 abd038ce26da0706758871598be5edcc311e217fab63b66fa518f37f54973bc2
MD5 a95090a341a73a3ba67d3a71216aa970
BLAKE2b-256 e23928850d165c358fcef6daa79a19a599815f0c5fe7dbf9c02158b9cc49042a

See more details on using hashes here.

File details

Details for the file icesat2waves-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: icesat2waves-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 211.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for icesat2waves-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7800b00cc3fd3f601c54a37efd179b315208580e52d467c51e1f0952e18852a1
MD5 664dcede10f872ff1c361c1021bc49dd
BLAKE2b-256 cd2e26fc8614bac74d0ebc285975d14720d8888cc3613bc8f69c826ce242e772

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page