.. falwa documentation master file, created by sphinx-quickstart on Mon Aug 21 13:58:59 2017. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. falwa: Finite-amplitude local wave activity ================================================== .. image:: https://github.com/csyhuang/csyhuang.github.io/raw/master/assets/img/hn2016_falwa_diagram.png `falwa `_ is a python library that provides tools to measure and study life cycle of large-scale extreme weather events. It implements the finite-amplitude local wave activity and flux diagnostic introduced in: - `Huang and Nakamura (2016, JAS) `_ - `Huang and Nakamura (2017, GRL) `_ - `Nakamura and Huang (2018, Science) `_ - `Neal et al (2022, GRL) `_ 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 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 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 ---------------------------- .. image:: https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.png :width: 100 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. 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). Modules ======== .. toctree:: :maxdepth: 2 Object Oriented Interface Xarray Interface Barotropic Field Basis Functions Plot Utilities Utility Functions Wrapper Functions Data Storage Example Notebooks Indices and tables ================== * :ref:`genindex` * :ref:`modindex`