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

Improve code documentation for MPAS dynamical core #356

Open
wants to merge 4 commits into
base: development
Choose a base branch
from

Conversation

kuanchihwang
Copy link
Collaborator

@kuanchihwang kuanchihwang commented Feb 5, 2025

Tag name (required for release branches):

None

Originator(s):

kuanchihwang

Descriptions (include the issue title, and the keyword ['closes', 'fixes', 'resolves'] followed by the issue number):

Improve code documentation for MPAS dynamical core.

  • Add license header to each module
  • Add descriptions to each module
  • Keep code comments up-to-date
  • Add support for auto-generating API documentation by using Fortran Documenter (FORD)

Describe any changes made to the build system:

None

Describe any changes made to the namelist:

None

List any changes to the defaults for the input datasets (e.g., boundary datasets):

None

List all files eliminated and why:

None

List all files added and what they do:

  • A src/dynamics/mpas/assets/ford-config.md
    • Add configuration file for Fortran Documenter (FORD)

List all existing files that have been modified, and describe the changes:

  • M src/dynamics/mpas/driver/dyn_mpas_subdriver.F90
    • Add license header to each module
    • Add descriptions to each module
    • Improve code documentation
  • M src/dynamics/mpas/dyn_comp.F90
    • Add license header to each module
    • Add descriptions to each module
    • Improve code documentation
  • M src/dynamics/mpas/dyn_coupling.F90
    • Add license header to each module
    • Add descriptions to each module
    • Improve code documentation
  • M src/dynamics/mpas/dyn_grid.F90
    • Add license header to each module
    • Add descriptions to each module
    • Improve code documentation
  • M src/dynamics/mpas/stepon.F90
    • Add license header to each module
    • Add descriptions to each module

Regression tests:

This is a documentation-only PR. No changes are expected to any existing tests.

@kuanchihwang
Copy link
Collaborator Author

kuanchihwang commented Feb 5, 2025

Note to reviewers:

A preview of the generated documentation can be seen here.

This PR not only enables documentation generation by using Fortran Documenter (FORD), but also benefits the users of code editors with Fortran Language Server (FortLS) integration. Even if we do not use those features universally, the updated code comments are still helpful and look nice as-is.

@kuanchihwang kuanchihwang force-pushed the staging/improve-code-doc branch from 31a3405 to d3a0e8c Compare February 7, 2025 19:31
@kuanchihwang kuanchihwang force-pushed the staging/improve-code-doc branch 2 times, most recently from 08c2735 to eb4a61a Compare February 20, 2025 23:39
@kuanchihwang kuanchihwang marked this pull request as ready for review February 20, 2025 23:59
@@ -1,12 +1,20 @@
! Copyright (C) 2025 U.S. National Science Foundation National Center for Atmospheric Research
Copy link
Collaborator

@mgduda mgduda Feb 21, 2025

Choose a reason for hiding this comment

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

Have we received specific guidance on who holds the copyright? If I recall correctly, in the past we had been advised that the copyright should be assigned to the University Corporation for Atmospheric Research.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The license header is mentioned in #338. Perhaps @nusbaume could give us an updated guidance on this.

Copy link
Collaborator Author

@kuanchihwang kuanchihwang Mar 4, 2025

Choose a reason for hiding this comment

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

@mgduda @nusbaume With the guidance from the general counsel, I have changed the license header as in c228f35.

* Better support for Fortran Documenter (FORD)
* Keep code comments up-to-date
This enables us to generate documentation for MPAS dynamical core.
@kuanchihwang kuanchihwang force-pushed the staging/improve-code-doc branch from eb4a61a to 9a8486e Compare March 4, 2025 23:20
Copy link
Collaborator

@nusbaume nusbaume left a comment

Choose a reason for hiding this comment

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

Thanks for the code comment and documentation updates @kuanchihwang!

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.

3 participants