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

Consistent file names #13

Open
mnlevy1981 opened this issue Feb 29, 2016 · 5 comments
Open

Consistent file names #13

mnlevy1981 opened this issue Feb 29, 2016 · 5 comments

Comments

@mnlevy1981
Copy link
Collaborator

We want module XYZ in XYZ.F90 (and module ABC_mod in ABC_mod.F90). I'm anticipating the following file name changes when we are ready:

$ mv ecosys_diagnostics_mod.F90 marbl_diagnostics_mod.F90 
$ mv ecosys_mod.F90 marbl_mod.F90
$ mv ecosys_restore.F90 ecosys_restore_mod.F90 
$ mv marbl_kinds.F90 marbl_kinds_mod.F90
$ mv marbl_share.F90 marbl_share_mod.F90
@matt-long
Copy link

Should the ecosys_restore be marbl_restore?


Matthew C. Long
Scientist I, Oceanography Section
Climate and Global Dynamics Laboratory
National Center for Atmospheric Research
303.497.1311 (W)
650.575.7784 (M)
http://www.cgd.ucar.edu/staff/mclong

On Mon, Feb 29, 2016 at 1:48 PM, Michael Levy [email protected]
wrote:

We want module XYZ in XYZ.F90 (and module ABC_mod in ABC_mod.F90). I'm
anticipating the following file name changes when we are ready:

$ mv ecosys_diagnostics_mod.F90 marbl_diagnostics_mod.F90
$ mv ecosys_mod.F90 marbl_mod.F90
$ mv ecosys_restore.F90 ecosys_restore_mod.F90
$ mv marbl_kinds.F90 marbl_kinds_mod.F90
$ mv marbl_share.F90 marbl_share_mod.F90


Reply to this email directly or view it on GitHub
#13.

@mnlevy1981
Copy link
Collaborator Author

It should - I was just making a list of what was needed to have the file name consistent with the module name for building, while ecosys_restore -> marbl_restore_mod would require updating the files that depend on ecosys_restore as well. That wasn't very clear in the issue ticket.

@mnlevy1981
Copy link
Collaborator Author

The following are the only source files that are not marbl_*_mod.F90 (they are missing the _mod suffix):

marbl_interface.F90
marbl_interface_constants.F90
marbl_interface_types.F90
marbl_internal_types.F90
marbl_logging.F90
marbl_oxygen.F90
marbl_parms.F90
marbl_sizes.F90

I don't know if we want to use _mod for ALL files, or if there is some criteria (maybe use _mod if the module has public subroutines or functions that are used by other modules?)

@mnlevy1981
Copy link
Collaborator Author

It seems like there are three options to consider:

  1. As mentioned in 2016, marbl_XYZ.F90 => a module that only has public variables, whereas marbl_XYZ_mod.F90 => a module with subroutines / functions
  2. Every module should have the _mod suffix, e.g. marbl_XYZ_mod.F90
  3. No module should have the _mod suffix, e.g. marbl_XYZ.F90

If the _mod designation doesn't mean anything, I would prefer option (3) to option (2). Or we can attach a meaning the the suffix as in option (1); perhaps there is a better rule to distinguish between marbl_XYZ.F90 and marbl_XYZ_mod.F90?

@mnlevy1981
Copy link
Collaborator Author

Note that with suggestion (3), it might seem like we'd need to come up with a better name for marbl_mod.F90: see #86, which I will address before this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants