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

Interpolation methods #165

Open johnomotani opened 4 years ago

johnomotani commented 4 years ago

It would be nice to have some generic interpolation method to convert a Dataset to a higher (or lower) resolution grid. We could then use to_restart() to create restart files for a simulation to continue at a different resolution. This would be a more general version of BoutDataset.interpolate_parallel().

Things to remember/consider:

bendudson commented 4 years ago

Agreed, this would be really nice functionality. Very useful for many different projects.

johnomotani commented 4 years ago

Another comment: x-direction interpolation should be done region-by-region (so similar code to interpolate_parallel(), but without the shifting to/from field-aligned). z-direction interpolation doesn't need to split into regions since there are no region boundaries in the z-direction, so should be simpler (although there's a question of whether we use FFT-based interpolation or polynomial interpolation).