Open mredenti opened 2 years ago
Yes, true. I believe it's not an issue in practice as only the evolving variables (which are probably Field3D
s) are actually read from the restart files by BOUT++. PR to improve this would be welcome though!
Yes, true. I believe it's not an issue in practice as only the evolving variables (which are probably
Field3D
s) are actually read from the restart files by BOUT++. PR to improve this would be welcome though!
I will have a go at it
Yes, true. I believe it's not an issue in practice as only the evolving variables (which are probably
Field3D
s) are actually read from the restart files by BOUT++. PR to improve this would be welcome though!
I don't think that is actually the case. If you look into in the reference code below you will see that BOUT++ reads other parameters from the BOUT.restart.*.nc files.
https://github.com/boutproject/BOUT-dev/blob/ab69d52f362dcaaddb22f3bd3b16aa7bab924d84/src/fileio/datafile.cxx#L1093-L1118
I know this for a fact: when creating restart files with the boutdata.restart.create much of the metadata is missing (for example "MXG" - # guard cells in the x-direction). Older version of BOUT++ (version v4.3.0 for example) did not read these parameters but the current version of BOUT++ does and won't restart the simulation if restarting from a file created with boutdata.restart.create
Ah, in that case you're right and the metadata definitely needs updating!
Copying the metadata from a
BOUT.restart.*.nc
file to the resizedBOUT.restart.*.nc
file is a bad idea. I mean, you are resizing the grid and therefore parameters like "nx" (and others) should be obviously updated to match the size of the new grid. https://github.com/boutproject/boutdata/blob/1cb6d08f8515c1541b937fadb65ffeccc5a4edc1/boutdata/restart.py#L219