Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to allow reference_tools to load some broken equation_coefficients files #561

Merged
merged 4 commits into from
Jun 25, 2024

Conversation

tukss
Copy link
Contributor

@tukss tukss commented Jun 23, 2024

This fixes #560 and includes some Python cleanup.

A simple script like this (save as convert.py) can be used to convert all the equation_coefficients files that were written in the inconsistent state:

#!/usr/bin/env python3

import sys
from reference_tools import equation_coefficients

for f in sys.argv[1:]:
    e = equation_coefficients(file=f, override_nconst=True)
    e.write(f)

Run it with find -name equation_coefficients -exec python3 path/to/convert.py {} +. Back up your files first.

@tukss tukss requested a review from feathern June 23, 2024 20:49
Copy link
Member

@gassmoeller gassmoeller left a comment

Choose a reason for hiding this comment

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

Seems good to me.

@feathern
Copy link
Contributor

Me too. Sorry that we didn't catch this bug before it snagged someone. I'll merge.

@feathern feathern merged commit f32a7e2 into geodynamics:main Jun 25, 2024
7 checks passed
@tukss tukss deleted the ref-tools-fix branch June 26, 2024 13:59
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.

Some past checkpoint files had inconsistent equation_coefficients
3 participants