Python Library: falwa (v2.3.3)
Important: this python package has been renamed from hn2016_falwa to falwa since version v1.0.0.
Compute from gridded climate data the Finite-amplitude Local Wave Activity (FALWA) and flux terms presented in:
- Huang and Nakamura (2016, JAS)
- Huang and Nakamura (2017, GRL).
- Nakamura and Huang (2018, Science) Atmospheric Blocking as a Traffic Jam in the Jet Stream.
- Neal et al (2022, GRL) The 2021 Pacific Northwest Heat Wave and Associated Blocking: Meteorology and the Role of an Upstream Cyclone as a Diabatic Source of Wave Activity.
- Lubis et al (2025, Nature Comm). Cloud-Radiative Effects Significantly Increase Wintertime Atmospheric Blocking in the Euro-Atlantic Sector.
Citing this package
We would be grateful if you mention falwa and cite our software package paper published in the Geoscience Data Journal upon usage:
Huang, C. S. Y., Polster, C., & Nakamura, N. (2025). Falwa: Python Package to Implement Finite‐Amplitude Local Wave Activity Diagnostics on Climate Data. Geoscience Data Journal, 12(2), e70006.
@article{huang_polster_nakamura_2025,
title={Falwa: Python Package to Implement Finite-Amplitude Local Wave Activity Diagnostics on Climate Data},
author={Huang, Clare S Y and Polster, Christopher and Nakamura, Noboru},
journal={Geoscience Data Journal},
volume={12},
number={2},
pages={e70006},
year={2025},
doi = {10.1002/GDJ3.70006},
publisher={Wiley Online Library}}
Package Installation
Attention: substantial changes took place in release v2.0.0. Installation in develop mode is no longer available.
Since release v2.0.0, the F2PY modules in falwa is compiled with meson (See Issue #95 for details) to cope with the deprecation of numpy.disutils in python 3.12.
First-time installation
- To build the package from source, you need a fortran compiler (e.g., gfortran) to implement the installation.
- Clone the package repo by
git clone https://github.com/csyhuang/hn2016_falwa.git. - Navigate into the repository and set up a python environment satisfying the installation requirement by
conda env create -f environment.yml. The environment name in the file is set to befalwa_env(which users can change). - Install the package with the command
python -m pip install .. The compile modules will be saved to python site-packages directory. - If the installation is successful, you should be able to run through all unit tests in the folder
tests/by executingpytest tests/.
Get updated code from new releases
- To incorporate updates, first, pull the new version of the code from GitHub by
git pull. - Uninstall existing version of
falwa:pip uninstall falwa - If there is change in
environment.yml, remove the existing environment byconda remove --name falwa_env --alland create the environment again from the updated YML file:conda env create -f environment.yml. - Reinstall the updated version by
python -m pip install .. - Run through all unit tests in the folder
tests/by executingpytest tests/to make sure the package has been properly installed.
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.
-
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. -
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.ipynbfor the usage ofQGField. 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.
Inquiries / Issues reporting
- If you are interested in getting email message related to update of this package, please leave your contact here 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 create a thread in the Discussion Board with the category "General" or "Q&A" according to the circumstance.
Metadata
Release files for falwa 2.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| falwa-2.3.3.tar.gz | 62.2 kB | With provenance | Details for falwa-2.3.3.tar.gz |
Release files / falwa-2.3.3.tar.gz
| Download URL | falwa-2.3.3.tar.gz |
|---|---|
| Size | 62.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
13b3f6918a8aa4ef7d1577b1662bd975ba8beecf8723352bc6484623569ad949
|
|
BLAKE2b-256 checksum How to use checksums |
e0f6c3ffe988b2480492c708deaa6c5802cf22fbb819bd893cff961c945b6f32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.
Transparency logSecurity for falwa 2.3.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 1 file in this release has been uploaded with provenance metadata.
Attestation for falwa-2.3.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.