-
Notifications
You must be signed in to change notification settings - Fork 26
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
General code clean-up #87
Comments
Another comment I forgot to add to the above list... Variables should not change name when passing through an interface (e.g. there are many places where |
For each variable, use the same case in all usage of the variable name, even though Fortran is case insensitive. |
Declaring arrays, we should choose between
and
Rather than having some of each scattered throughout the code |
Consistent usage of .eq. vs == and .ne. vs /= usage of assumed shape vs. assumed size for non-scalar subroutine/function arguments |
|
|
CamelCase vs seperating_by_underscores |
We have not been consistent about abbreviating variable / routine names... we use |
We tend to line up
vs
|
Avoid compile-time settings as much as possible. Currently, we define the following at build-time:
We also use build-time macros to tell MARBL if some optional libraries are available:
In general, though, we want MARBL to be run-time configurable. |
I will add a straw-man set of guidelines to the developer's guide over at https://marbl-ecosys.github.io/MARBL/html/ and let folks know when that is available. |
consisting formatting of comments is desirable |
Get rid of un-used kinds ( |
change diagnostic index [ introduce |
|
I often use the write(str_new, "(2A)"), str1, str2 but we should stick with the str_new = str1 // str2 |
At some point, we need to take step back from development and talk about coding standards and really flesh out the wiki. Some topics that have come up while @klindsay28 and I review code:
implicit none
statement at the module level (and all modules should have this!), then we do not need additionalimplicit none
statements at the subroutine levelN
(perhapsN=1
? definitely a small number), and if more thanN
subroutines use the same variable bring it in at the module level otherwise have them at the subroutine leveluse
statements: one variable per line, or multiple?vs
I hope this issue will be a catch-all for other similar items as we encounter them, and we can close this issue when the wiki and code are both updated. This should definitely not happen until we reach a point where we can call for a code freeze, I can imagine the merge conflicts if we do this while there are still active development branches.
The text was updated successfully, but these errors were encountered: