Option to retain boundary/guard cells #19
Labels
bug
Something isn't working
requires BOUT changes
May require changes to BOUT++ upstream to implement
requires xarray changes
May require changes to xarray upstream to implement
Milestone
Currently
open_boutdataset()
will trim off all ghost cells, even at the outside edges of the domain. There should be an option to retain the guard cells at the edge of the domain.This is not completely trivial because currently the trimming is done by a
preprocess
argument toopen_boutdataset()
, so the same function is applied to every dataset. In order to know when to leave the guard cells untouched, the preprocess function has to know the position of the dataset it is currently operating on within the grid. Right now this isn't possible, but there are two ways it could be done:Use the filename of the dataset to determine it's position, which would require a change upstream in xarray as discussed here .
Get BOUT to write out the global position indexes to the dump files, which can then be used to work out the dataset's position in the grid.
Another option is to not use the preprocess function at all, and instead concatenate all the untrimmed data then cut out the unwanted chunks from the result. I don't think this is the best solution however because then you aren't doing the trimming in parallel, it's not as clean conceptually, and it could break a lot of the tests.
I think the best solution would be to use global indexes once BOUT actually writes them out.
The text was updated successfully, but these errors were encountered: