Falwa

Latest version: v1.2.1

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

Scan your dependencies

Page 1 of 5

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.

1.1.0

Bug being fixed

This release fix the bug occuring in `QGField`/`QGDataset` when processing latitude grid with even number of grid points - the dimension of latitude grid is recorded inconsistently, leading the code to crash. With this fix, computed variables are returned with original dimension (or original dimension / 2 if `northern_hemisphere_results_only=False`).

Additional unit tests

There are two additional unit tests demostrating the fix:
- `tests/test_output_results.py::test_offgrid_data_input`
- `tests/test_output_results.py::test_offgrid_data_input_xarrayinterface`

Corresponding changes

See code comparison: https://github.com/csyhuang/hn2016_falwa/compare/v1.0.0...v1.1.0

1.0.0

1. The python package is renamed from `hn2016_falwa` to `falwa` 91
2. There is a fix in code for zonal advective flux computation. The correction done in release 0.7.2 happens to be an over-correction. See 92 for mathematical details. Thanks Christopher Polster for spotting the error. The fix requires re-compilation of fortran modules.
3. QGDataset now supports dataset with even number of latitude gridpoints 85
4. User can delay the return of variable from methods in QGField/QGDataset by the boolean parameter `return_named_tuple`.
5. Cartopy is replacing Basemap (deprecated) in all the visualization examples 87
6. The GitHub workflow has been updated and run successfully 82

The changes can be found in this pull request: 93

1.0.0a0

This pre-release includes the changes mentioned in 75 , namely,
- Code fix for zonal advective flux computation, see 92 for details.
- Python package name change from `hn2016_falwa` to `falwa` 91
- QGDataset now also supports data input with even number of latitude gridpoints 85
- Used Cartopy instead of Basemap (deprecated) in all the visualization examples 87
- Fixed GitHub action 82

0.7.2

This release requires **recompilation of fortran modules**.

Two weeks ago, we discovered that there is a mistake in the derivation of expression of nonlinear zonal advective flux term:
$$\frac{1}{a\cos\phi} \frac{\partial}{\partial \lambda} \int^{\Delta\phi}_0 u_e q_e \cos(\phi+\phi^\prime) d\phi^\prime$$

The correct definition of $u_e$ in the integral should be:

$$u_e(\lambda, \phi, \phi^\prime, z, t) \equiv \omega_e a \cos\phi = \frac{u(\lambda, \phi + \phi^\prime, z, t)\cos\phi}{\cos(\phi+\phi^\prime)} - u_{\text{REF}}(\phi, z, t)$$

where $\omega = \frac{u}{a\cos\phi}$ is the angular velocity (and $\phi^\prime \in [0, \Delta\phi]$).

The fix has been done in the following commit and will be published in release 0.7.2:

https://github.com/csyhuang/hn2016_falwa/commit/1995e1dfcd422c61b0a6728d1d54a6fbb2f2cf58#diff-7e797030d6c037af018d523e2e6a20f0d9f01c3dd8f41a2d7f044b4800684455

This error led to an *underestimation* of nonlinear component of advective flux ("ua2" in the code). Fixing this error indeed makes traffic jam mechanism (i.e. how waves are slowed down by the nonlinear effect that grows with wave amplitude) more robust.

We will submit corrigendums for [Neal et al. (2022, GRL)](https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2021GL097699) and [Nakamura and Huang (2018, Science)](https://www.science.org/doi/10.1126/science.aat0721) to update the numerical results. The correct derivation of the flux expression can be found in the corrected supplementary materials of NH18. There is no change in conclusions in any of the articles.

Please refer to Issue 83 for a preliminary comparison between originally published figures and updated figures.

Page 1 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.