Skip to content

Conversation

@blue-jaye-121
Copy link
Contributor

Description Of Changes

As described in issue #3844, when attempting to use an xarray for the calculation of turbulence kinetic energy (TKE), a ValueError was thrown because the input and output array sizes differ. The removal of the wrap-like argument in the @preprocess_and_wrap decorator solved this issue. Tests have also been added to ensure functionality of TKE with xarray inputs.

Checklist

@blue-jaye-121 blue-jaye-121 requested a review from a team as a code owner July 24, 2025 17:31
@blue-jaye-121 blue-jaye-121 requested review from dopplershift and removed request for a team July 24, 2025 17:31
@CLAassistant
Copy link

CLAassistant commented Jul 24, 2025

CLA assistant check
All committers have signed the CLA.

@blue-jaye-121
Copy link
Contributor Author

The Codacy is upset because I use a numpy .reshape() function with 4 positional parameters (.reshape(2, 2, 2, 2)) but since this is a well known use case of numpy's reshape functionality, I was wondering if this was something that I needed to change or will be alright as it is?

@dopplershift dopplershift added Type: Bug Something is not working like it should Area: Calc Pertains to calculations labels Jul 28, 2025
@dopplershift dopplershift added this to the 1.7.1 milestone Jul 28, 2025
@dopplershift dopplershift added the Area: Xarray Pertains to xarray integration label Jul 28, 2025
@dopplershift dopplershift merged commit c880ce5 into Unidata:main Jul 28, 2025
42 checks passed
@dopplershift dopplershift added the backport Pull Requests that are automatically back-ported to the stable release label Jul 28, 2025
@github-actions
Copy link
Contributor

🏁 Successfully backported as #3885. 🏁

@blue-jaye-121 blue-jaye-121 deleted the turbulence_fixes branch July 29, 2025 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Calc Pertains to calculations Area: Xarray Pertains to xarray integration backport Pull Requests that are automatically back-ported to the stable release Type: Bug Something is not working like it should

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Turbulence kinetic energy (tke) calculation on 4D xarray throwing ValueError

3 participants