Skip to content

Conversation

@samhatfield
Copy link

Here are some further suggestions to trltog_clean. It looks like a lot in the diff, but if you look at the commits one by one you can see that it's not so significant.

@dhaumont do you need to add a copyright statement for RMI?

Sorry for the nitpicking again, but I find this process of going over every line really useful for understanding what the code does.

BTW @dhaumont, have you discussed these changes with @RyadElKhatibMF? I think he was the original author for these routines so might be interested / concerned about some changes.

Original PR here which will be updated once this one is merged.

@samhatfield samhatfield force-pushed the trltog_clean_ecmwf_suggestions branch from 67540f7 to bdea362 Compare December 5, 2025 09:13
@dhaumont dhaumont self-requested a review December 5, 2025 09:16
- Lines can be up to 100 characters
- Always two continuation characters
- One indentation on the next line before the character
@samhatfield samhatfield force-pushed the trltog_clean_ecmwf_suggestions branch from bdea362 to d2dcc54 Compare December 5, 2025 09:24
@samhatfield
Copy link
Author

Sorry, spotted a couple of typos so I've force updated a few commits.

@dhaumont
Copy link
Owner

dhaumont commented Dec 5, 2025

@samhatfield Thank you for this very nice improvements. I will merge your changes, they look OK to me.
Regarding the copyright, thanks for asking, it is more a question for a lawyer, but for this kind of small refactoring I don't think we care so much.
As a general remark, we spend quite a lot of time on indentation and code beautification, it would be a great improvement to have an automated tool like a linter that would do this for us and would check it during the CI/CD.

@dhaumont dhaumont merged commit aea7fd1 into dhaumont:trltog_clean Dec 5, 2025
@samhatfield
Copy link
Author

I totally agree RE automatic linting. The issue is that there is so much inconsistency in the existing code and any commit to bring the code up to the standards (which are not published anywhere - another thing we need to sort out!) would touch many lines of code and be an "event horizon" in the commit log. I'm much stricter with new code contributions for that reason.

Even my commit to "fix" indentation in TRGL_MOD is not really meeting existing standards. Other files have no indentation in subroutine bodies. But in those files, there is only one subroutine, whereas TRGL_MOD collects many subroutines, so it felt natural to follow different rules... at that point I wondered if I was overthinking it a bit :)

Perhaps it's possible to have a tool which only lints lines which are changed by a pull request. If you find any Fortran linting tools, let me know.

@samhatfield
Copy link
Author

Thanks for the speedy review BTW!

@samhatfield samhatfield deleted the trltog_clean_ecmwf_suggestions branch December 5, 2025 09:42
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.

2 participants