Hello DG,
I noticed that the ReadInterpolate Thorn only works with Carpet. Is it possible to get something like it for Pugh? What would be the differences?
I have not tried it with PUGH. PUGH implements a subset of what Carpet offers and at the very basic level one could think of having only a single refinement level in Carpet. Ie one would have to return 0 for each call to Carpet_GetRefinementLevel. There are also uses of Carpet_GetTimeLevel which may not have an equivalent in PUGH (but would not be so bad to obtain). Some more changes are required b/c PUGH does not directly let one call initial data routines (which is what ReadInterpolate is) on past timelevels so, if one wants to read in all 3 timelevels from a checkpoint, one has to manually cycle through the 3 timelevels. The various BEGIN_XXX macros then become no-ops. These are the changes that come to mind right now, there may be others that I am not aware of at this point.
Please note that PUGH is hardly used anymore for production simulations since Carpet offers (in almost all cases) a strict superset of features to it. Your fastest option to get ReadInterpolate working may be to switch over to using Carpet.
Please also keep in mind that ReadInterpolate will only ever allow you to shrink the domain (since it cannot make up numbers if you increase the domain size).
If this is a one-off operation you may also be faster by writing a small set of python scripts to operate between two checkpoints: one written in the old grid setup (containing the data) and one written in the new setup (contains say just zeroes for the values) and use something like
https://docs.scipy.org/doc/scipy-0.18.0/reference/generated/scipy.interpolat...
for the interpolation.
The easiest way to get the coordinates is to ask for 3d output of the CartGrid3D variables x,y,z (which are not checkpointed so it needs to be regular output).
Yours, Roland