edoddridge / aronnax

An idealised isopycnal model that can be run either with n+1/2 layers, or with n layers and variable bathymetry.
http://aronnax.readthedocs.io/en/latest/
MIT License
24 stars 6 forks source link

Choose a code style and make the code conform to it #17

Closed axch closed 7 years ago

axch commented 7 years ago

At minimum, we should address the following points (which have already disoriented me):

axch commented 7 years ago

We should make the decisions sooner rather than later; but I am loath to actually enforce them until the regrid branch is merged (or abandoned), and until I have a refactoring test suite to catch any mistakes I may, in my non-knowledge of Fortran, make while changing what I think is just style.

edoddridge commented 7 years ago

I agree with all of this, and am happy to go with the indentation suggested by Emacs defaults.

The prevalence of comment characters at the beginning of lines is a hangover from the F77 convention in which comments where signified by a 'c' in the first column. There is no reason to keep them like that.

axch commented 7 years ago

OK, awesome. I will try to find time this weekend to implement this, if I can. I prefer 2-space indentation (even in Python, contrary to the Python community's strong preference for 4). Do you care? The extant Fortran code is mostly indented 4 spaces; do you want to keep it that way? (We also don't have to indent Python and Fortran the same way.)

axch commented 7 years ago

Hm. I don't seem to have permissions to assign this issue to myself. Can you do that? Also Issue #6, which I want to do first.

edoddridge commented 7 years ago

I've assigned this to you, and also added you as a collaborator, so you should be able to do that yourself in the future.

I'm happy with 2 space indentation for Fortran - the current tendency towards 4 space is not especially intentional. I'd prefer to stick with 4 space indents for Python.

axch commented 7 years ago

Sounds good. The 4-space convention in Python is too strong to resist, little though I may like it.