Skip to content
This repository has been archived by the owner on Oct 31, 2022. It is now read-only.
/ StormTrackingScripts Public archive

THIS REPO IS ARCHIVED. Development of Scripts from ICAS dynamics group

License

Notifications You must be signed in to change notification settings

cemac/StormTrackingScripts

Repository files navigation

Storm Tracking Scripts

DOI GitHub release GitHub top language GitHub issues GitHub last commit GitHub All Releases HitCount

Description

Development of Storm Tracking Scripts from ICAS dynamics group.

Version 2.0

The first major release of developed scripts. Building from Rory's storm tracking scripts these functions have been moved a modular system. Finding storms in an area, extracting information about those storms and calculating some statistics about those storms and producing a set of Standard plots.

New Features

  • Removed Hardcoding, can be used on different model runs, easily adapted for different variable etc
  • Runs in Parallel - giving a speed improvement
  • Python 3 version available
  • Reduction in lines of code from 3600 to 1100
  • Large increase in comments docstrings

Possible Upcoming Features

  1. Documentation improvements
  2. STASH code variable library
  3. Feature requests
  4. Switch to CF-python
  5. minor speed up
  6. Python GUI

Requirements

  • Python (Standard anaconda package)

A full list of Requirements is listed in the yml files (python 3). installing via setup.py will account for requirements.


Installation (recommended method)

Storm Scripts requires a few non-standard modules (skewt, meteocalc). anaconda or miniconda is the recommended method of Installation.

Python 2

# download anaconda installer
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh
bash Miniconda2-latest-Linux-x86_64.sh #skip if you already have anaconda
export PATH="$HOME/miniconda3/bin:$PATH" #skip if you already have anaconda
cd StormTrackingScripts
conda env create -f StormScripts_py2.yml
conda activate StormS
conda clean -t
cd Storm_Scripts_py2
python StormScriptsPy2/setup.py install

Python 3

SkewT python 3 support is not yet in the anaconda cloud coming soon, for now an extra step is required

# download anaconda installer
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh #skip if you already have anaconda
export PATH="$HOME/miniconda3/bin:$PATH" #skip if you already have anaconda
cd StormTrackingScripts
conda env create -f StormScripts_py3.yml
conda activate StormS
git clone https://github.com/tjlang/SkewT.git
cd SkewT
python setup.py install
conda clean -t
cd Storm_Scripts
python StormScriptsPy3/setup.py install

Usage

Either have installed the module or added to python path.

Can be used to find a subset of storms from the precip_tracking_12km_hourly text files and mine the relevant data. Comes with plotting tools.

from os.path import expanduser
import numpy as np
import pandas as pd
import StormScriptsPy3 as SSP3

# print some help?
SSP3.S_Box.StormInBox?
# Define your storms
c = SSP3.S_Box.StormInBox(345, 375, 10, 18, 5000, 'cc_storms_')
# generate the list of storms
c.gen_storm_box_csv()
# point to data and if you want the full set of calculations done
dmf = SSP3.dm_functions('/path/to/data/', CAPE='Y', TEPHI='Y')
dmf.genvarscsv('cc_storms_', pd.read_csv('generated_file.csv', sep=',')

Issue Templates

  • A full guide on submitting issue and bug are given in our contribution guidelines
  • Please use our issue templates for feature requests and bug fixes.

Acknowledgements

These scripts have been developed based on the work done by the Institute of Climate and Atmospheric Science (ICAS) dynamics group and the University of Leeds. This work was originally part of the African Monsoon Multidisciplinary Analysis (AMMA-2050) project.