Skip to content

Commit

Permalink
Merge pull request #37 from boutproject/ignore-fieldperp
Browse files Browse the repository at this point in the history
Ignore FieldPerps when loading datasets
  • Loading branch information
TomNicholas authored Aug 13, 2019
2 parents bad3364 + 08cb040 commit 204280e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions xbout/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,12 @@ def _trim(ds, *, guards, keep_boundaries, nxpe, nype):
selection[dim] = slice(lower, upper)
trimmed_ds = ds.isel(**selection)

# Ignore FieldPerps for now
for name in trimmed_ds:
if (trimmed_ds[name].dims == ('x', 'z')
or trimmed_ds[name].dims == ('t', 'x', 'z')):
trimmed_ds = trimmed_ds.drop(name)

return trimmed_ds.drop(_BOUT_TIMING_VARIABLES, errors='ignore')


Expand Down

0 comments on commit 204280e

Please sign in to comment.