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 error message if user_nl_blom includes hash comments #448

Merged

Conversation

TomasTorsvik
Copy link
Contributor

@TomasTorsvik TomasTorsvik commented Dec 12, 2024

If someone use an old user_nl_blom file with hash symbols (#) for comments, there will be an error message on the form:

ocn_in_paramgen.OcnInParamGenError: Line number 1 in 'user_nl_blom' starts with a hash sign (#). This may indicate an outdated format of your
user_nl_blom file. Current versions of user_nl_blom file conform to the standard Fortran namelist syntax, indicating comments
with exclamation mark (!). Please check that your user_nl_blom file conforms with the current accepted file format.

This does not guarantee that older files will be caught, only in case comment lines are kept.
Response to NorESM issue #618.

If this PR receives positive reviews, I would include the same error message in release-1.6 and master branches as well.

@TomasTorsvik TomasTorsvik self-assigned this Dec 12, 2024
@TomasTorsvik TomasTorsvik added the documentation Improvements or additions to documentation label Dec 12, 2024
Copy link
Contributor

@JorgSchwinger JorgSchwinger left a comment

Choose a reason for hiding this comment

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

Looks good to me (I'm not very proficient in Python though)

Copy link
Collaborator

@jmaerz jmaerz left a comment

Choose a reason for hiding this comment

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

Looks good to me as well - thanks for providing this error message!

Copy link
Contributor

@matsbn matsbn left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@TomasTorsvik TomasTorsvik merged commit 47a9cfe into NorESMhub:release-1.4 Dec 12, 2024
2 of 4 checks passed
@TomasTorsvik TomasTorsvik deleted the feature_user_nl_file branch December 12, 2024 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants