boutproject / xBOUT

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

Fix condition for 'bout_v5' behaviour of dz #223

Closed johnomotani closed 3 years ago

johnomotani commented 3 years ago

For output files created with next after it changed to pre-release of BOUT++ v5 but before dz was changed to a Field2D, creating the z-coordinate would previously fail (due to trying to index a scalar). Need to check for this case explicitly in the condition for applying bout_v5 behaviour.

Fixes https://github.com/boutproject/xBOUT-examples/issues/13.

codecov-commenter commented 3 years ago

Codecov Report

Merging #223 (80f6cd2) into master (1bc4d31) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #223   +/-   ##
=======================================
  Coverage   75.68%   75.68%           
=======================================
  Files          15       15           
  Lines        2682     2682           
  Branches      631      631           
=======================================
  Hits         2030     2030           
  Misses        420      420           
  Partials      232      232           
Impacted Files Coverage Δ
xbout/geometries.py 71.16% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1bc4d31...80f6cd2. Read the comment docs.