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

Allow for differing module/file names #636

Open
dustinswales opened this issue Feb 3, 2025 · 5 comments
Open

Allow for differing module/file names #636

dustinswales opened this issue Feb 3, 2025 · 5 comments
Labels

Comments

@dustinswales
Copy link
Collaborator

Description

In the Group Caps, The default module name used when importing DDTs is set to the source file name.
There is no way to handle instances (e.g. Scheme from UFS) where the module name and filename differ, which is allowable in fortran.

Steps to Reproduce

Create a module containing DDT definitions, but using different module/source file names, and add it to the var_compatability_test. The Group cap will have:
use source_filename, only: some_ddt WRONG
not
use module_name, only: some_ddt CORRECT

@gold2718
Copy link
Collaborator

gold2718 commented Feb 4, 2025

What is the requirement here? Is the CCPP framework supposed to handle a module that happens to differ from the filename or is it supposed to also handle multiple modules in a file?
I do not think there is any statement about this in the documentation so this would be a good place to define the required support and make sure it is tested.

@climbfuji
Copy link
Collaborator

The UFS currently requires both, but that doesn't mean we need to continue supporting both. In my opinion, we should support cases where the module name is not the same as the filename, but we don't need to support multiple modules in one file. This makes for shorter metadata files, too.

@dustinswales
Copy link
Collaborator Author

@climbfuji I didn't come across any multi-module files in the UFS, so I didn't build that into #637, just the name difference.
I don't know if this is written down anywhere? Maybe it's implicit since it's a supported Fortran feature?

@climbfuji
Copy link
Collaborator

Check GFS_debug.F90 please. This isn't tested by default in the UFS regression tests, something I have lamented about for a long time.

@gold2718
Copy link
Collaborator

gold2718 commented Feb 5, 2025

@climbfuji I didn't come across any multi-module files in the UFS, so I didn't build that into #637, just the name difference. I don't know if this is written down anywhere? Maybe it's implicit since it's a supported Fortran feature?

That was sort of my thought but if we do not want to implement multi-module tests for now, maybe we should document what the CCPP Framework does support.

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

No branches or pull requests

3 participants