Skip to content

Commit

Permalink
Merge pull request #2 from nhutter/package_pull
Browse files Browse the repository at this point in the history
Package version of the lkf_tools
  • Loading branch information
nhutter authored Jul 3, 2023
2 parents 4f431a6 + e74bb40 commit 3451b2a
Show file tree
Hide file tree
Showing 18 changed files with 3,243 additions and 441 deletions.
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,31 @@
Tools to detect and track deformation features (leads and pressure ridges) in sea-ice deformation data.

## Getting Started
Download/clone this repository.

### Installing python
A good description how to install python is given by N. Koldunov in:
https://github.com/koldunovn/python_for_geosciences
First you need to install conda to install the python environment needed for this package. This can easily be done using a [miniforge](https://github.com/conda-forge/miniforge).

After installing a miniconda you need to install to additional packages with:
After installing conda with a miniforge you can install the python environment using:
```
conda install scipy.ndimage skimage
conda env create -f environment.yml
```
and activate the environment:
```
conda activate lkf_tools
```
To install as python package run the following command with the repository directory:
```
$ python setup.py develop
```

### Download RGPS example data

RGPS data in Lagrangian and Eulerian format need to be downloaded from Ron Kwok's homepage:
https://rkwok.jpl.nasa.gov/radarsat/index.html

RGPS data needs to be unzip. The data needs to be orgnaized in a seperate directory for each winter that are named w9798, w9899, ...


## Generate LKF data-set

Use gen_dataset.py to generate LKF data-sets, which performs three steps for each year:
* run the LKF detection on RGPS deformation data
* interpolate Lagrangian drift data to Eulerian grid
* run the LKF tracking algorithm
There is a [tutorial notebook](notebooks/tutorial_gen_dataset.ipynb) that illustrates how to generate a LKF data-set from a netcdf file. This tutorial uses model output from the [SIREx model output repository](https://doi.org/10.5281/zenodo.5555329) and also uses the SIREx sampling strategies that are described in detail in this [Hutter et al. 2022](https://doi.org/10.1029/2021JC017667). The tutorial shows you how to:
* download and read in the netcdf file
* detect LKFs in the netcdf file
* run the tracking algorithm on the detected LKFs
* some basic plotting routines of the extracted LKFs


## Algorithm description
Expand Down
17 changes: 17 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: lkf_tools
channels:
- conda-forge
dependencies:
- pytest
- netcdf4
- scipy
- jupyter
- numpy
- jupyterlab
- matplotlib
- scikit-image
- xarray
- ipympl
- pyproj
- cartopy
prefix: /Users/nhutter/miniforge3/envs/lkf_tools
102 changes: 0 additions & 102 deletions gen_dataset.py

This file was deleted.

87 changes: 0 additions & 87 deletions griddata_fast.py

This file was deleted.

132 changes: 0 additions & 132 deletions interp_RGPS_drift.py

This file was deleted.

Loading

0 comments on commit 3451b2a

Please sign in to comment.