xCDAT / xcdat

An extension of xarray for climate data analysis on structured grids.
https://xcdat.readthedocs.io/en/latest/
Apache License 2.0
101 stars 11 forks source link

Fixes regrid2 mapping output to input ordering #653

Closed jasonb5 closed 1 month ago

jasonb5 commented 1 month ago

Description

Output dimensional order was always ..., Y, X where ... is all other dimensions. This would cause an error when adding bounds as the input dimensional ordering was used in this process.

This PR fixes the issue by correctly transposing the output data to the same ordering as the input data.

Checklist

If applicable:

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (7745757) to head (b7f6fe9).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #653 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 15 15 Lines 1543 1544 +1 ========================================= + Hits 1543 1544 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.