brown-ccv / icesat2waves

ICESat-2 track analysis
GNU General Public License v3.0
0 stars 2 forks source link

ICESAT2 Track Analysis

Installation for Developers

Prerequisites:

[!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.

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
  2. Make spectra from downloaded data

    icesat2waves make-spectra --track-name SH_20190502_05180312 --batch-key SH_testSLsinglefile2 --output-dir ./output
  3. Plot spectra

    icesat2waves plot-spectra --track-name SH_20190502_05180312 --batch-key SH_testSLsinglefile2 --output-dir ./output
  4. Build IOWAGA priors

    icesat2waves make-iowaga-threads-prior --track-name SH_20190502_05180312 --batch-key SH_testSLsinglefile2 --output-dir ./output
  5. 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
  2. Make corrections and separations

    icesat2waves correct-separate --track-name SH_20190502_05180312 --batch-key SH_testSLsinglefile2 --output-dir ./output