hn2016-falwa

This python package has been renamed from `hn2016_falwa` to `falwa` since version v1.0.0.


Keywords
climate, climate-analysis, climate-data, climate-data-analysis, climate-science, hacktoberfest, python, science, science-research
License
MIT
Install
pip install hn2016-falwa==0.7.3

Documentation

Python Library: falwa (v1.2.1)

Build Statuscodecov.ioDocumentation StatusDOI

Important: this python package has been renamed from hn2016_falwa to falwa since version v1.0.0.

hn2016_falwa_diagram

Compute from gridded climate data the Finite-amplitude Local Wave Activity (FALWA) and flux terms introduced in:

Package Installation

This current version works for Python 3.x. Note that since v0.3.0, some functions have backend in Fortran. To build the package from source, you need a fortran compiler (e.g. gfortran) to implement the installation.

Since the package is still being actively developed, please use the develop mode for installation.

To install the package for the first time, clone the GitHub repo and install via develop mode:

git clone https://github.com/csyhuang/hn2016_falwa.git
cd hn2016_falwa
python setup.py develop

To incorporate updates, pull the new version of the code from GitHub. Remove any existing f2py modules and recompile.

# Assume you are already in the hn2016_falwa/ repo
git pull
rm falwa/*.so
python setup.py develop
pytest tests/ # to check if the package can be run properly

Quick start

There are some readily run python scripts (in scripts/) and jupyter notebooks (in notebooks/) which you can start with. The netCDF files needed can be found in Clare's Dropbox folder.

Depending on what you want to do, the methods to be use may be different.

  1. If you solely want to compute equivalent latitude and local wave activity from a 2D field, you can refer to notebooks/simple/Example_barotropic.ipynb. This is useful for users who want to use LWA to quantify field anomalies.

  2. If you want to compute zonal wind reference states and wave activity fluxes in QG Formalism, look at notebooks/nh2018_science/demo_script_for_nh2018.ipynb for the usage of QGField. This notebook demonstrates how to compute wave activity and reference states presented in Nakamura and Huang (2018). To make sure the package is properly installed in your environment, run through the notebook after installation to see if there is error.

THe conda environment for running the notebook can be found in environment.yml. To create the conda environment, execute:

conda env create -f environment.yml

Sponsorship acknowledgement

This project is sponsored by JetBrains as one of the non-commercial open source projects. JetBrains provides core project contributors with a set of best-in-class developer tools free of charge. Please check out their Open Source Support page for details.

Inquiries / Issues reporting

  • If you are interested in using the package, please leave your contact here or email me(csyhuang@uchicago.edu) such that I can keep you updated of any changes made.
  • If you encounter coding issues/bugs when using the package, please create an Issue ticket.
  • If you have scientific questions, please contact Clare S. Y. Huang via email(csyhuang@uchicago.edu).