-
Notifications
You must be signed in to change notification settings - Fork 50
Reduce "Explicit interface or EXTERNAL declaration is required" compiler warnings in sfcsub #312
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
Reduce "Explicit interface or EXTERNAL declaration is required" compiler warnings in sfcsub #312
Conversation
|
|
||
| end module ugwp_common | ||
| contains |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll let @mdtoyNOAA chime in, but I believe that the ugwp_common module was supposed to be used for physical constants only. I wonder if it would be preferable to have init_nazdir and init_global_gwdis put into a different module, one that already exists other than ugwp_common or a new one altogether.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@grantfirl The subroutines init_nazdir and init_global_gwdis are actually not contained within a module. I wasn't the original coder, so I don't know if this was intentional or not. Would containing these two subroutines inside a new module solve the problem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, any module will do to provide an explicit interface. It doesn't have to be this one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably OK just to leave them in ugwp_common if you've already done testing and it works, especially if no one knows of an existing module that they would fit better into.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I left my comment yesterday, I hadn't realized Nick had already moved the two subroutines within module ugwp_common. I'm OK with leaving them in ugwp_common.
grantfirl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK, although I don't see supermodule PRs. What testing has been done? Just compiling UFS to see if the warnings disappear?
|
Thanks @grantfirl ! I'm finishing to re-run ufs-weather-model RT time-outs on Ursa right now and will soon open relevant PRs. Tests are bit-for-bit and these compiler warnings are resolved Note that there are still warnings about BAOPENR ABORT GETGBH GETGB SPLAT W3MOVDAT W3DOXDAT BACLOSE. In next round, hopefully I can make better solution than declaring as external |
|
This PR is ready to merge. Testing is complete on WM parent PR #2935. |
Description of Changes:
Compiling ufs-weather-model cpld_debug_gfsv17 RT gives a number of warnings in sfcsub for these variables:
Enclosing the whole file in the module resolves many of these, except
BAOPENR ABORT GETGBH GETGB SPLAT W3MOVDAT W3DOXDAT BACLOSEas these come from elsewhere (like NCEPLIBS or compiler). So, I tried addingexternaldeclaration for the rest.For W3MOVDAT, W3DOXDAT external doesn't resolve the warning, maybe since they have dimension(8) argument. I see some previous work to deal with w3emc NCAR#1070 but don't know if there were any decisions
Tests Conducted:
cpld_debug_gfsv17 is bit-for-bit on Ursa and most compiler warnings are resolved.
TODO: "See ufs-community/ufs-weather-model#<pr_number>"
Dependencies:
TODO: parent PRs. For example:
Documentation:
N/A
Issue (optional):
Part of ufs-community/ufs-weather-model#2703 to reduce compiler warnings in GFS.v17 for operational implementation
Contributors (optional):
N/A