Skip to content

Conversation

bendudson
Copy link
Contributor

Converts a set of BOUT++ v3.1 restart files so they can be used to restart a simulation with BOUT++ v4 (next branch).

bendudson and others added 2 commits May 16, 2022 13:59
Converts a set of BOUT++ v3.1 restart files so they can be used to
restart a simulation with BOUT++ v4 (next branch).
@ZedThree
Copy link
Member

LGTM! I think we can ignore the failing test, it's complaining about line length, but we're running black, so I don't care. We should probably change the lint test

raise ValueError("Can't overwrite restart file")

file_list = glob.glob(os.path.join(path, "BOUT.restart.*." + informat))
file_list.sort()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will fail if there are more than 10 files, because .sort() thinks BOUT.restart.10.nc comes before BOUT.restart.1.nc. Need to use natsort - I'll push a fix...

@johnomotani johnomotani merged commit f6829a2 into master Sep 1, 2022
@johnomotani johnomotani deleted the restart-shift_v3_to_v4 branch September 1, 2022 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants