Falwa

Latest version: v2.1.0

Safety actively analyzes 722631 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 6

2.1.0

- Functionalities to calculate contribution of diabatic heating to vertical-averaged budget of local wave activity (LWA) is added to `QGFieldNHN22` and `QGDataset`. Please refer to notebook examples in `notebooks/lubis_et_al_2024/` and corresponding documentation for example of usage on MERRA2 data.
- Note: The calculation of layerwise fluxes and diabatic heating will be included in v2.2.0 tentatively released in early April. See 133 for the plan of the next release.
- The basis function `falwa.basis.lwa` now supports partition of LWA into cyclonic and anti-cyclonic components (by setting parameter `return_partitioned_lwa=True`). See documentation for detailed instructions and notebook examples (`notebooks/simple/Example_barotropic.ipynb` and `notebooks/simple/BarotropicField_example.ipynb`).
- Additional integration tests are included to cover new functionalities.
- `QGDataset` has been updated to accommodate variable name change in ERA5 data downloaded from new CDS of ECMWF (2024/10/26 132 - Thanks Christopher Polster for the update!).

2.1.0a

This pre-release is made for the sake of generating a zenodo code to be included in Lubis et al. (in prep). Functionality to compute the contribution of diabatic heating in the wave activity budget equation is included. See documentation of `QGField.compute_lwa_and_barotropic_fluxes` for details. A formal release will be made once the manuscript is finalized.

2.0.0

To cope with the need to compile F2PY modules upon the deprecation of `numpy.disutils` in python 3.12, `falwa` switch to using `meson`. While the user interfaces remain the same, this release changes the installation mechanism of the package. The `develop` mode is not available anymore as both the compiled F2PY modules and python modules are stored in python site-package directory.

Please refer to the README section "[Package Installation](https://github.com/csyhuang/hn2016_falwa?tab=readme-ov-file#package-installation)" for the updated installation procedures.

Great thanks to Christopher Polster for figuring out a timely and clean solution for migration to python 3.12. 👏 For details and references related to this migration, users can refer to [Christopher's Pull request](https://github.com/csyhuang/hn2016_falwa/pull/126).

1.3.0

Issue to release 1.3: 116

Major changes

Major changes 1, 2 and 4 below lead to small changes in output values of `QGField` compared to the previous release. Users may compare the plots on example jupyter notebooks over different releases to gauge the magnitude of difference.

1. User can put in already interpolated (on evenly-spaced vertical grid) fields from hybrid coordinate interpolation by setting `data_on_evenly_spaced_pseudoheight_grid=True` to avoid interpolating twice - vertical interpolation is delegated to `scipy` instead of fortran modules. The old interpolation f2py modules is renamed `compute_qgpv` (as this is its sole duty now). (See 94 for the discussion.)
2. Compute Static Stability in *original* vertical coordinates (*before* vertical interpolation) with `UnivariateSpline` and its `derivative` to reduce the numerical error, leading to a smoother field
3. The behavior of `QGField.compute_reference_state` is modified such that even when `Uref` cannot be computed, users won't get an error and can still access `Qref` computed. A boolean parameter `QGField.nonconvergent_uref` is added to indicate whether `Uref` is properly computed. If `False`, `compute_lwa_and_barotropic_fluxes` cannot be called.
4. Added `QGField.compute_lwa_only` to provide users with a choice of computing solely LWA from `Qref`. That way, even if `Uref` cannot be solved for purely numerical reason, LWA can still be calculated from `Qref`. This method is available in `QGDataset` too.

Additional utilities
1. Added "Plot Utilities" (for plots presented in POD contribution to MDTF), "Statistics Utilities" (to compute covariance between `<LWA>` and `<U>`) and "netCDF Utilities"
2. Added "Preprocessing" module which include gridfill function used in MDTF with documentation
3. Included `developers/run_through_notebooks.sh` to run through notebooks for each release

Minor fixes
- Fixed the build test in Git Workflow
- Fixed Sphinx build on ReadTheDoc
- Fixed misformed link in documentation

1.2.1

This is fixing the issue reported in 108 that the barotropic component of zonal wind in southern hemisphere was wrongly computed using the data in the northern hemisphere. Other barotropic quantities computed were not affected.

Thanks chpolste for figuring out the fix.

1.2.0

**Important:** This release fix a bug in computing the reference states 102 : the differential area to compute reference states, $a^2 \cos\phi \Delta\phi \Delta\lambda$ , was miscomputed as $a^2 \cos\phi (\Delta\phi)^2$ . This has not caused issues in results presented in our previous publications because we have been using ERA5 datasets with $\Delta\phi = \Delta\lambda$. Great thanks to Pragallva Barpanda for fixing the issue and also sharing her working example to preprocess model output for consumption of `QGField` downstream.

Summary of changes:
1. $\Delta\phi$ and $\Delta\lambda$ are precomputed in `QGField` object and passed into the F2PY modules as parameters
2. Pragallva has included an example in `scripts/pre_process_data_in_hybrid_coordinates/` how to preprocess climate model output in hybrid coordinate for consumption of `QGField` downstream by (1) transforming the fields to pressure coordinates, and (2) do gridfill over underground" gridpoints using poisson solver (as [how Clare did in MDTF project](https://github.com/csyhuang/MDTF-diagnostics/blob/finite_amplitude_wave_diag/diagnostics/finite_amplitude_wave_diag/finite_amplitude_wave_diag_zonal_mean.py))
3. Added `CONTRIBUTING.md` to include instructions for potential contributors.

Page 1 of 6

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.