boutproject / xBOUT

Collects BOUT++ data from parallelized simulations into xarray.
https://xbout.readthedocs.io/en/latest/
Apache License 2.0
21 stars 10 forks source link

Interpolate to a Cartesian grid #242

Closed johnomotani closed 2 years ago

johnomotani commented 2 years ago

Methods to add Cartesian (X,Y,Z) coordinates and interpolate to a Cartesian grid.

Mostly intended to create input for visualisation, so interpolate_to_cartesian() methods by default convert data to np.float32 to save memory and speed up calculations.

pep8speaks commented 2 years ago

Hello @johnomotani! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:

Comment last updated at 2022-08-03 14:04:31 UTC
codecov-commenter commented 2 years ago

Codecov Report

Merging #242 (da78317) into master (ceb75b3) will increase coverage by 0.89%. The diff coverage is 90.00%.

@@            Coverage Diff             @@
##           master     #242      +/-   ##
==========================================
+ Coverage   74.71%   75.60%   +0.89%     
==========================================
  Files          15       15              
  Lines        2796     2894      +98     
  Branches      675      687      +12     
==========================================
+ Hits         2089     2188      +99     
+ Misses        462      456       -6     
- Partials      245      250       +5     
Impacted Files Coverage Δ
xbout/utils.py 84.92% <70.58%> (+2.37%) :arrow_up:
xbout/boutdataset.py 77.06% <93.15%> (+2.79%) :arrow_up:
xbout/boutdataarray.py 78.67% <100.00%> (+0.54%) :arrow_up:

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more