Closed TomNicholas closed 4 years ago
Hello @TomNicholas! 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:
Merging #136 into master will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## master #136 +/- ##
=======================================
Coverage 77.88% 77.88%
=======================================
Files 14 14
Lines 2139 2139
Branches 480 480
=======================================
Hits 1666 1666
Misses 304 304
Partials 169 169
Impacted Files | Coverage Δ | |
---|---|---|
xbout/load.py | 81.23% <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 ec95524...98390d5. Read the comment docs.
I've no objections to this going in to maintain backward compatibility, but @TomNicholas if it's not much work to change, reload_boutdataset(
boutdata_*.nc, pre_squashed=True)
should work and also restore metadata, etc. (see the test at the bottom of this message).
I think the reload_boutdataset
function is nicer for this use-case so I'd suggest actually removing the pre_squashed
option from open_boutdataset
in favour of always recommending reloading with reload_boutdataset
.
It seemed cleaner to me at the time to have a separate function for reloading, but I think the ideal would be to auto-detect files that need 'reloading' instead of 'loading', and also auto-detect the 'pre-squashed' vs. all-variables-in-one-file cases. I might have a go at that now, and see if I can get it to work easily...
Replaced by #137
One of the recent commits caused this error when loading pre-squashed files:
This change fixes it.